Reputation: 1
I am looking to get the list of all transit (subway/rail/bus) lines within a given area with all the stations/stops served by each. I am not looking for the best possible route based on start and end point. What I'd envision is only selecting/inputting the line # and get as an output all stations/stops served by that line.
Is this something Here can provide? Either through an API or static feed.
Thanks, Eric
Upvotes: 0
Views: 46
Reputation:
Search Stations By Location
If you you want to search for stations within a certain distance from their current geographic location.
Search stations through a single GET request. The only required parameter in specifies the center of the searching area which is defined as a pair of WGS84 coordinates in the form ,. The optional parameter r specifies the radius in meters specifies the size of the searching area. By default, r=500. The following request will search for stations within 500 meters from your location:
GET https://transit.hereapi.com/v8/stations ?in=41.90123,12.50091
The response to the request contains the following information blocks:
a maximum of 50 station identifiers are allowed in a single query.
each station element in stations response object includes the following high-level elements:
- place with station/stop information such as name, location, ID, type.
- transports with information about the transports serving the station. Add return=transport in request to enable it.
- accessPoints with information about points that are used to access the station/stop.
{ "stations": [ { "place": { "name": "Piazza Dei Cinquecento", "type": "station", "location": { "lat": 41.901297, "lng": 12.50042 }, "id": "415701325" }, "transports": [ { "mode": "bus", "name": "P02", "color": "#4C8DC1", "textColor": "#000000", "headsign": "Piazza Dei Cinquecento" } ], "accessPoints": [ { "location": { "lat": 41.901298, "lng": 12.500427 }, "name": "West Entrance", "type": "accessPoint" }, { "location": { "lat": 41.901299, "lng": 12.500429 }, "name": "Piazza Mall", "type": "accessPoint" } ] } ] }
Upvotes: 0