Hi,

I am new here so maybe I am missing something that is basic.

I have a latitude and longitude data(specific point and not an box) and I want to know which place is it was.

From my basic knowledge with osm, maybe i am looking for tags map(http://wiki.openstreetmap.org/wiki/Map_Features#Building )?

I will be also glad to have some basic tutorial how to work with osm through java/c# .

Thanks for any help...

asked 27 Jan '17, 09:59

adirsolo's gravatar image

adirsolo
11113
accept rate: 0%

edited 30 Jan '17, 18:23

aseerel4c26's gravatar image

aseerel4c26 ♦
31.9k16237548

First of all thank you both a lot. By saying POI my final goal is to represent a place with tags for example: for the coordinates: 51.56100, 10.83576 it will be classify as "Home" and for 51.56100, 11.83576 it will be classify as "Work". I wand to this with some extra information about the coordinates (Node tags?), and not to get the full address. How can i do it? thanks again.

(30 Jan '17, 11:55) adirsolo

See my answer. With Overpass API you can retrieve all "extra information" available in OSM.

(30 Jan '17, 12:13) scai ♦

It sounds as if you might be looking for Reverse Geocoding, something you can do with Nominatim. Nominatim has a JSON API, so you can use standard web access methods to call it from Java or C#.

If you plan to publish software that makes frequent use of Nominatim, you should probably set up your own Nominatim server instead of relying on the donation-funded server operated by OSM itself - see the usage policy.

permanent link

answered 27 Jan '17, 10:51

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
69.9k806321095
accept rate: 24%

Do you want to get the POI(s) or "know which place is" the coordinates describe?

For retrieving all POIs of this area: Use Overpass API. Let's say your coordinates are lat 51.56100 and lon 10.83576. The following Overpass API query will return all OSM elements within 25 of these coordinates:

[out:json][timeout:25];
(
  node(around:25.0,51.56100,10.83576);
  way(around:25.0,51.56100,10.83576);
  relation(around:25.0,51.56100,10.83576);
);
out body;
>;
out skel qt;

You can view the result at overpass turbo. Note that you can retrieve these results programmatically (example) because overpass turbo is just a nice web frontend to Overpass API.

For knowing which place/address the coordinates describe: Use the reverse-geocoding of Nominatim or one of the other OSM-based search engines. Example call for Nominatim for the same coordinates as above: https://nominatim.openstreetmap.org/reverse?format=xml&lat=51.56100&lon=10.83576&addressdetails=1

permanent link

answered 27 Jan '17, 11:05

scai's gravatar image

scai ♦
31.1k18281434
accept rate: 23%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×158
×117
×72
×8

question asked: 27 Jan '17, 09:59

question was seen: 4,848 times

last updated: 30 Jan '17, 18:23

powered by OSQA