Question

I am very new to geocode and quite overwhelmed with all the information. I have seen similar questions to the one I have but I haven't been able to figure out the solution. I hope you'll can help.

I have a .csv file that is populated with over thousand coordinates (Lat, Long, Alt).

I want to be able process the coordinates on an Open Source service (OSM) to be able to understand on what type of street the vehicle is.

Eg. (53.0066,-2.0031) scanned though OSM database to find nearest mapped coordinate:

<node id="781098178" visible="true" version="2" changeset="11563939" timestamp="2012-05-11T00:04:35Z" user="Mauls" uid="24119" lat="53.0002499" lon="-2.0056501"/>

which is then tagged as <tag k="highway" v="bus_stop"/>

It is the highway and bus_stop information I am interested in as the output.

I have read and had a go with the MapQuest API's available but I am unable to make the reverse geocode display the tag information rather than the whole address. Also I'm not sure how to make the matlab script work.

I really hope you'll can help. Sorry if I have sounded stupid!

Thank you ever so much....

Was it helpful?

Solution

You need two steps for this.

The first step is doing a reverse geocoding call to Nominatim, OSM's most popular geocoding service. Be aware that OSM's official Nominatim instance has a rather strict usage policy because it runs on funded servers. But you can use MapQuest's Nominatim instance as an alternative and even install your own instance. Because Nominatim only stores the post-processed data it doesn't have any information about the original tags.

The second step is extracting the osm_type (which is the type of the element and can be either node, way or relation) and the osm_id (which uniquely identifies the element) from Nominatim's result. With these information you have to make a call to the OSM API to get all information about the corresponding element. This includes all tags.

Note that there is a similar Question&Answer platform for OSM which allows you to reach a much larger part of the OSM community.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top