What do you mean by "correct information" in the context of buses that are constantly on the move?
The service itself can return the data in JSON (or XML, if you prefer), so it should be pretty straight-forward to work with in FME.
What do you mean by "correct information" in the context of buses that are constantly on the move?
The service itself can return the data in JSON (or XML, if you prefer), so it should be pretty straight-forward to work with in FME.
By correct info, I meant to extract the full information with correct lat/lon of each stop, since the lat/lon will change with the movement of the vehicle thus it would be difficult to extract the stop lat/lon.
By correct info, I meant to extract the full information with correct lat/lon of each stop, since the lat/lon will change with the movement of the vehicle thus it would be difficult to extract the stop lat/lon.
So you need to guess the bus stops from a live data feed, or do you just need the bus route?
Anyway, it is fairly easy to create a looping transformer that interrogates the webservice every second for, let's say, 24 hours and saves everything to a local database, then you can post-process the saved data the following day to assemble the bus positions into lines.
It sounds like you want the stop a bus is closest to? Maybe the closest previous or the closest next?
The API also seems to let you query a route and returns stops on that route.
So maybe it's as simple as a NeighborFinder transformer? The bus position becomes the Base feature and the stops are the Candidates. You just find the closest candidate (stop) to each base (bus).
Of course, if the route loops around the closest stop might not be the one it has just left. But it would be a start.
Or... if you did continuously monitor the bus then you would probably be able to track it from stop to stop fairly easily. Put a buffer around each stop (with the Bufferer transformer) and make a note of when the bus location falls inside that buffer (PointOnAreaOverlayer).
Maybe combine the two methods so you can tell what the next stop should be and test it with the NeighborFinder.
Lots of ways to do this, but FME Server is certainly a good tool for handling this type of live spatial data.