api for retrieving object at a specific gps coordinate - google-maps-api-3

I have been reading the google maps api and the openstreetmap api, but i cannot find if they offer the following functionality:
I need to find out if at a specific gps coordinate there is a building or a street.
Do you know of any api offering this?
Thanks.

I wonder how you could missed that if you already did look at the documentation.
Of course OpenStreetMap can do this. There is the main API (which is primarily for editing and not for bulk querying!) where you can retrieve all map data within a specified bounding box.
Example:
http://api.openstreetmap.org/api/0.6/map?bbox=13.76500,51.05600,13.76515,51.05615
This will return all objects between latitude 51.05600 and 51.05615 and longitude 13.76500 and 13.76515. For how to interpret the returned XML file read OSM XML in the OSM wiki.
In order to know if a specific object is a building, a street or something else you have to look at the tags. Buildings are usually tagged using the building key and can either be a single node, a way or (rarely) a relation. Streets are usually ways and are tagged using the highway key.

Related

How to get accurate/fresh POIs with Map tiles REST API?

A tile sent from Nokia Here-Map tiles API, contains at least two POIs that do not exists in real life and also not on other Map services like Google Maps and OpenStreetMap. How can i get accurate/fresh POIs with the Map Tiles Api?
I'm using the service with LeafletJs, and i use a hybrid.day base map and a base one, with the pois parameter set to true and map version set to "newest". The tiles i'm getting effectively contains POIs but it doesn't seem accurate. I wrote to the sales support at Nokia Here, i'm not sure they can help me, but the website also indicate to use stackoverflow for technical questions. Mine doesn't seem like a sales related question or a technical one but i see no other alternative contact.
This is a link to get a tile with incorrect POIs:
https://4.base.maps.cit.api.here.com/maptile/2.1/maptile/bd9e007617/normal.day/17/59178/60113/256/png8?app_id=mVrBstuYsfUVga31l6IX&app_code=xphvU-Uj071dI-UkNaxMrg&lg=fre&pois=true&style=default
The tile contains two POIs that do not exists in real life or on other map services like OpenStreetMap. The two are: "Ecobank" and "Restorant Aku".
The place the map shows is around these coordinates: lat:14.729235451930021
lng:-17.46165559897639
The returned tile shouldn't contains inexistant POIs.
This is an error in HERE database. You should report it through HERE Map Creator
It will go through some kind of quality moderation, so it may take a few weeks. Maybe adding a fresh photo would speed up things.

How to get Advanced Data Sets for only one gps point

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)

How to get place information using Google Knowledge Graph using Latitude and Longitude ?

I want business description using google API or wikidata API.
As shown in above image I want to access description (which is highlighted in red circle.) and store it into application database.
What I tried till now, I used google place API to get the place information, using that I am able to get information like review,rating,opening hours. But I am not able to get that information which I have mention in above image. But I do not know how to get that information using Wikidata api or Google Knowledge Graph api.
Can any one suggest me that how can I use that API to get that information.
Any help would be highly appreciated !
Thanks,
I'd also be keen to know if this is possible. For example, with a bounding box. 4 coordinates, might it be possible for Google Knowledge or another API to give me a summing up of the place.
For example: bbox=4.721375,52.290843,5.070190,52.399905
Might return information and history on the city of Amsterdam. Like when you type into Google Search "Amsterdam".
Just a thought. I have previously accomplished this with a very manual combination of Overpass API (related to OSM) and Freebase.
I just found this: Find a place description in Freebase using latitude and longitude?
So, it can be done. And it is already documented.

Check if a railway track is near location

I've been looking into this for quite a bit, but couldn't find a solution. Is there a way to find out whether railway tracks are near a users position?
The APIs don't provide a places search like this (see Google Places supported types for this). One possibility would be to download the OpenStreetMap dataset for your region, import it in a database and extract the datasets Railways. Then you could pass the users position to your database (PostGIS) and check if there is a railways matching your filters.
Moreover there is the OpenRailwayMap, if you just need a possibility to do some visual identification of railway tracks. See OpenRailwayMap API site for further usage information.

Google places API: from CID to reference?

My objective: populate a database with known business places in order to generate maps with those places. I insist on "known places", because my users will only search for the places that are in the database.
I don't want to recreate business places as markers on the map (so latitude and longitude is not enough to id a place), because the places are already available on Google Maps with interesting information (address, comments, ratings, pictures...).
The natural reference is to use the CID and store it in the database.
Now imagine the database is populate with places and their CID, and I want to generate maps with those places as click-able markers. When the user clicks on the marker, she access the business place's page, e.g. http://maps.google.com/maps/place?cid=998657413562662319. Great!
But how to generate those maps? I don't have the coordinates in the database (assumption). And I cannot use Google Places API (which would give me the coordinates), because it uses a different reference, to retrieve the location of the business so as to generate the maps.
Any ideas?
Thanks a lot!
To clarify: I want to use Google Maps API to generate a map with many business places of which I know the CID. It is comparable to "my maps" in Google. Only that I want to store the places in my database.
Potential solution: For each business in the database, store the name, CID, and coordinates. Write a script that uses Google Places to find businesses at specific coordinates. Loop through the response array (JSON/XML) until the response with the CID corresponding to the searched business is found. Store the Google Places reference into the database. Repeat this script for each newly added business. Cumbersome...
Is this what you are looking for?
http://maps.google.com/maps?cid=998657413562662319
It looks like your best option if you want more than one cid on a map is to use:
http://maps.google.com/maps?cid=998657413562662319&q=a&output=json

Resources