3

I imported to SQLServer the map of Europe taken from Geofabrik (in pbf format). I preserved the order of nodes assigned to ways and the order of ways assigned to relations. The issue is the order of ways I see on OpenStreetMap website for relations differs from the data I have in db (so in pbf file). The issue is the ways are not in the order they can be linked together to create chain of points to draw some shape. OpenStreetMap website shows proper order of ways (from top to bottom), when pbf has random order of these ways. I noticed it when I was trying to create multipolygon object from Polish border data. The original shape is here.

The data in the table below show that the way/line on position 982 has common points with ways on position 546 and 547, so the way 982 should be between 546 and 547:

enter image description here

Does it mean that OpenStreetMap website reorders ways to show them in correct order or the export from Geofabrik destroyed the order of ways belonging to relations?

Recently I had the issue with wrong order of points belonging to ways forming some shape. The issue has been described here.

3

1 Answer 1

1

I received an answer on OSM forum the order of ways on releation members doesn't matter.
More info is here...

2
  • 1
    The answer there is only half-right. If you have a public transport route relation, the stops should be ordered in the way they are served. But for multipolygon relations it does not matter.
    – AndreJ
    Jul 21, 2016 at 13:37
  • I had an issue with the order when I decided to build a LineString for a Relation. In any case, you'll end up with MultiLineString because there can be breaks and overlaps. Feb 16, 2023 at 11:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.