Hello,

I'm going to use Photon as a search engine. In a result, Photon give the id of the node / way / relation.

How can I get the associated point / roads / polygon in my OSM DB (I don't have a Nominatim DB)? Is it always -1*<id>? Am I sure to get a result?

Thanks in advance

asked 10 Jul, 12:41

Tim%20Autin's gravatar image

Tim Autin
1614
accept rate: 0%


  • If Photon gives you a node, it will either be in planet_osm_point with its ID, or not present at all.
  • If Photon gives you a way, it will either be in planet_osm_line with its ID, or in planet_osm_polygon with its ID, nor not present at all.
  • If Photon gives you a relation, it will either be in planet_osm_line with -ID, or in planet_osm_polygon with -ID, or not present at all.
permanent link

answered 10 Jul, 12:44

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
70.1k806341097
accept rate: 24%

Thank you very much for the very clear answer! The links between relations/line, relations/polygons, way/line & node/point are still a bit obscure to me. If a relation is updated/deleted/added, does the polygon (or line) also get updated/deleted/added?

(10 Jul, 12:49) Tim Autin

If you do process updates with your database (osm2pgsql -a), then yes, the polygon or line will get updated when the relation changes.

(10 Jul, 15:13) Frederik Ramm ♦
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:

×102
×74
×36
×1

question asked: 10 Jul, 12:41

question was seen: 159 times

last updated: 10 Jul, 15:13

powered by OSQA