NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

i've import some osm data in my db with bulkDB.pl When i do a query i find a relation, then i find the ways in the relation and then i find nodes in the ways. For each nodes i get coordinates and with mapbox i try to make a map. It seems that the order of my nodes is incorrect. Which is the correct order of the nodes to have a layer with a correct line?

Thank you

asked 29 Nov '17, 15:24

Maurizio%20Proietti's gravatar image

Maurizio Pro...
11112
accept rate: 0%


I am not familiar with bulkDB.pl - Are you talking about this collection of scripts? http://wiki.openstreetmap.org/wiki/OsmDB.pm

If so, it looks like there is a table named waynodes which maps nodes to ways. The second column in this table (named "s" which is not very descriptive) indicates the order of the nodes in the way, starting at 0. So whatever query you are using to get the nodes out of the database needs to somehow include a sort by s clause in it.

permanent link

answered 29 Nov '17, 16:01

ToeBee's gravatar image

ToeBee
976920
accept rate: 27%

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:

×236
×205
×167
×17

question asked: 29 Nov '17, 15:24

question was seen: 2,903 times

last updated: 29 Nov '17, 16:01

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum