0

I extracted both nodes and ways from OpenStreetMap in PostgreSQL with Osmosis. I'm looking for all restaurants in a given area. The issue is that some of them are coded in OSM as nodes and others as ways.

How is it possible to have only one point when it is represented both as a node and a way?

The intuitive answer is to intersect the ways with the nodes. If a node is inside a way, they will both count as one. Otherwise, if there is only a node or only a way without nodes inside, it's fine.

The 'geometry' column in the 'ways' table does not contain information (it has something like a geometry, but all values are similar). Or maybe it is possible to use the 'nodes' table?

The fundamental question is: How is it possible to have a proper geometry column in PostgreSQL with Osmosis?

  • PLease stop crossposting as this consumes a lot of time of our community. You have already answers over there: help.openstreetmap.org/questions/32366/… – Mapper Apr 15 '14 at 10:52
  • Is it better to post here or on help.openstreetmap in your opinion? – Antonin Apr 15 '14 at 11:46
  • 1
    Your question is focused on OSM, so I would recommend to post over there, as there are more mapper. Maybe it's also worth to ask at a mailinglist. But before you do so, I would suggest to give the answers a try and than ask for resulting problems and where you fail. – Mapper Apr 18 '14 at 8:09
  • Note that having multiple elemnts for the same feature is clearly a tagging error and should be corrected. – scai Apr 19 '14 at 12:01
  • @scai does it mean cleaning is not necessary and there should not be mistakes (or at least not so many)? I'm a bit surprised by your comments because it is also possible to read that amenities should be both, ways and nodes: help.openstreetmap.org/questions/3824/… – Antonin Apr 19 '14 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.