Fix order of node, way and relation blocks generated by shp2osm script
ClosedPublic

Authored by tandon on Jul 23 2016, 3:42 PM.

Details

Summary

Previously all the ID values were negative resulting in a descending order of IDs for each of the node, way and relation blocks. This fix corrects this so that all the ID's are positive resulting in a non decreasing order of IDs for each the blocks. This ordering is required for some external osm file processing tools like osmconvert.

Diff Detail

Repository
R34 Marble
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
tandon updated this revision to Diff 5464.Jul 23 2016, 3:42 PM
tandon retitled this revision from to Fix order of node, way and relation blocks generated by shp2osm script.
tandon updated this object.
tandon edited the test plan for this revision. (Show Details)
tandon added reviewers: nienhueser, rahn, Marble.
tandon set the repository for this revision to R34 Marble.
tandon updated this revision to Diff 5473.EditedJul 24 2016, 2:13 AM

Fix
This diff keeps the ID's as negative so as to prevent collision with OSM IDs while keeping the order within each block as non decreasing.

Errors/Warnings
While creating tiles using this fix, we don't get the sequence errors as before but get

Running 1 slices with tiny_planet_1 base filename against shapefile /root/Downloads/ne_110m_admin_0_boundary_lines_land/ne_110m_admin_0_boundary_lines_land.shp
Tiny planetosm for Level = 1 complete.

osmconvert Error: use border format:  -b="x1,y1,x2,y2"
chmod: cannot access ‘./1/2/0.o5m’: No such file or directory
osmconvert Error: use border format:  -b="x1,y1,x2,y2"
chmod: cannot access ‘./1/2/1.o5m’: No such file or directory
osmconvert Error: use border format:  -b="x1,y1,x2,y2"
chmod: cannot access ‘./1/2/2.o5m’: No such file or directory

This error even occurs if we create tiles using previous versions of shp2osm

nienhueser accepted this revision.Jul 24 2016, 6:25 AM
nienhueser edited edge metadata.

Please push.

This revision is now accepted and ready to land.Jul 24 2016, 6:25 AM
This revision was automatically updated to reflect the committed changes.