How to get Advanced Data Sets for only one gps point - here-api

I started exploring HERE maps few days back and I want to get road specify data (tunnel, bridge, overpass, underpass, speed limit) like the one returned using "Fleet Telematics Advanced Data Sets" after using specific layer. I see that this returns list of all the points that belong to particular tile.
But just want to for gps points that my path has and not on an area. Is it possible using any HERE maps api or any manipulations to the above API or any other WAR?

It is not possible to get road geometry for a single gps point buut rather for the link/road in which the gps point is. If you want to find get road geometry details for the links/roads of a particular route you can get it by using Fleet Telematics API. Adding "attributes=ROAD_GEOM_FCn(TUNNEL,BRIDGE)" can fetch you the details whether the road is a tunnel or a bridge etc. Hope this helps!
http://cre.cit.api.here.com/2/calculateroute.json?app_id=xxxx&app_code=xxxx&mode=fastest;truck;traffic:disabled&driver_cost=10&waypoint0=55.308989,10.805059&waypoint1=55.368920,11.288338&attributes=ROAD_GEOM_FCn(TUNNEL,BRIDGE)

Related

HERE Maps Api Reverse Geocode and Street/Road Bearing

Using HERE Maps Api, for a geographic coordinate (lat, lng), I would like to find address information for the nearest routable road. Information that includes:
Address (street, house number, city, postal code, country)
Bearing/Heading of the road (0 to 360 degrees from True North)
How can I achieve this through HERE Maps API?
So far, this is what I have been able to achieve:
Calling the calculate Route API with identical start and end endpoints and mode=car will force the API to snap to the nearest routable point. This step is necessary for when the input coordinates are for a pedestrian street.
Using the nearest routable point coordinates, I can call reverse GeoCode API and I will be able to find the address information I need.
The next step is where I'm currently stuck. I'm able to find information like direction=NW, however I can't find the ~exact bearing in grad, for example bearing=265.
Is this achievable? Are 3 steps really necessary or is there a HERE Maps API endpoint that can provide all of this?
You can use the Fleet Telematics API to get the headings value for a particular road. Read more about the api here - https://developer.here.com/documentation/platform-data/topics/quick-start-view-map-data.html
You can also look at the field explanationshere - https://tcs.ext.here.com/pde/layer?region=WEU&release=19111&url_root=pde.api.here.com&layer=ADAS_ATTRIB_FC1
HEADINGS Horizontal road heading [10^-3 degree] at coordinate points along the link, when driving from Reference Node. Comma separated. Each value is relative to the previous. No values here for the ref/nonref nodes, because they are in the separate fields REFNODE_LINKCURVHEADS and NREFNODE_LINKCURVHEADS.

How to show only train/subway stations using nearby stations api?

I am using the nearby stations by geocode transit api to return a json result of 3 closest stations. I assumed these would be train/subway stations but the 3 closest to any given dynamic lat & lng are usually bus stations.
Example of my query with parameters: https://transit.api.here.com/v3/stations/by_geocoord.json?center=LAT%2CLNG&radius=350&app_id=APPID&app_code=APPCODE&max=3`
I have read in pervious posts that the ability to use modes such as mode=1 is only available whilst using one of the routing apis.
To cut down on API calls, I do not wish to call google map nearby places api for train/stations and then use those stations in another api call to Here.com to get the distances. I was hoping there was a way I can do it in one call.
I am client side filtering at the moment and only displaying name & distance. I see that if I change my max parameter to 50, i see more results further down which are tube/subway stations but unsure as to how I would go about filtering these out. Also, i see reference to icons but no url's given to access them, where are these located?
I am using ReactJS and the native fetch method for my api request.
Thanks
I expect that you have 3 requirements:
1) names and distances of stations around a specific coordinate, 2) stations should be filtered by only trains/trams(intercity or intracity) and
doesn't include buses and remaining other modes,3) Avoiding multiple API calls:
by_name or by_geocoord API restrict the search based on the modes, though it can fulfil the first requirement
Route transit API returns connection with the transit stations(by train only) and distances as well, based on the arrival and departure coordinates,
https://transit.api.here.com/v3/route.json?app_id=xxxxxxxxx&app_code=xxxxxxxx&modes=intercity_train,bus,light_rail&dep=41.9773,-87.9019&arr=41.8961,-87.6552&time=2019-06-24T07%3A30%3A00#

Drag route anywhere using Maps API

I want to write an application that gives me the exact route of a subway.
When you use Google Maps it just connects two stops linearly, but not the actual way.
Is there a way to move a route anywhere on a map without being bound to roads?
If there's any solution (doesn't have to be with the Google Maps API) please let me know.
Edit:
Example
Google shows the train route like the brown line, but the train actually drives the blue line. What I would like to do is get the blue line so that I can get the coordinates of the route and calculate the curves and elevation.
I know that I could add like 50 waypoint and get get a "fake" route with them, but I would like to have it automatic and not done by hand.
To show the transit directions (subway, bus, tram, etc.) Google Maps uses the data provided by transit agencies in the form of GTFS feeds. This is a responsibility of the agency to provide a detailed shape of the route for the transport according to the GTFS specification. You can have a look at GTFS documentation to figure out how does it work:
https://developers.google.com/transit/gtfs/
https://developers.google.com/transit/gtfs/reference/#general_transit_feed_specification_reference
I hope this helps.

Here API: Map NAVTECH edge numbers to latitude/longitude?

I am using the Here API to search for roads where traffic accidents occur in my home town. My aim is to extract the full road coordinates (as sequence of of lat/lons) where the accident is active in order to draw that road on a reasonable scale.
Using the traffic/6.1/incidents API, I query for the data using a geographical bounding box. An accident in the response is described by one pair of TMC locations as well as one pair of lat/lon geographical points. This data is too coarse-grained for plotting the roadway. (Please correct me if I am wrong here, but I would like to add some more detail about turns of the road.)
My question regards what I found when I turned to examine the rest of the accident/incident response, containing so-called NAVTECH data on this (XML) form:
<NAVTECH><EDGE><EDGE_ID>1150578390</EDGE_ID><EDGE_ID>1150578391</EDGE_ID>
<EDGE_ID>...</EDGE_ID>
<VERSION_ID>201604</VERSION_ID></NAVTECH>
My question is: Is there any available method to map the NAVTECH edges to pairs of lat/lon coordinates?
I have searched Here.com, the here-api stackoverflow tag and tried to Google for an answer, but I find so little documentation on this type of data. I am looking for all information I can find to (i) Describe the NAVTECH edges and their meaning, (ii) How to map NAVTECH to geographical coordinates. In general, (iii) Can I use the Here API to get more geographical information than this about roads where there are accidents?
Kind regards,
Vilhelm from Sweden
You can pass a lat/lon to their routing API and get back the shape point coordinates (and other attributes) for the road edge at that location, like this:
https://route.cit.api.here.com/routing/7.2/getlinkinfo.xml?waypoint=43.066628,-71.471729&app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&linkattributes=all
Unfortunately, though, this may not be a long term solution, as seaBass states here:
getlinkinfo will depreciated March 31, 2017. In order to get speed limit information you will have to use PDE (Platform Data Extension) which requires an APP ID and Code

Google Maps API - Get accurate coordinates with business/building name.

I am developing a website in ASP.NET in which I need accurate coordinates of properties and populate their markers on Google Maps. I read the Google Maps API documentation and it doesn't accept business names or house numbers. So if I add 5 properties on Moseley Road with postal code WR2 6NJ, they all receive the same coordinates at the beginning of the road, where as they're all separate properties with separate coordinates, for example: Arthur Amos Associates Ltd, Moseley Farms etc.
How can I increase the accuracy so each address gets it's own coordinates? I tried the ROOFTOP and street_address parameters but they didn't help. Do I need to get Google Maps API for Work to get this level of accuracy?
Thanks.

Resources