geoffmcl / osm2shp

Fork: Convert large OpenStreetMap files to shapefiles Uses sqlite3 storage
1 stars 0 forks source link

Big problems with shp creation, additions... #3

Open geoffmcl opened 6 years ago

geoffmcl commented 6 years ago

When run this on say a file like

2018-09-06  23:24       339,336,242 central-america-latest.osm.pbf

downloaded from the site http://download.geofabrik.de/ you get a larger sqlite file

2018-09-09  00:31     1,281,806,336 tmpnodes-4848.sqlite

you get a promising shp output -

 Directory of G:\D\data\OSM\pbf\c-amer\shp

2018-09-09  00:30    <DIR>          .
2018-09-09  00:30    <DIR>          ..
2018-09-09  00:31            14,366 city_point.dbf
2018-09-09  00:30               412 city_point.prj
2018-09-09  00:31             6,288 city_point.shp
2018-09-09  00:30               100 city_point.shx
2018-09-09  00:30               412 railway_line.prj
2018-09-09  00:30               100 railway_line.shp
2018-09-09  00:30               100 railway_line.shx
2018-09-09  00:30               412 roadbig_line.prj
2018-09-09  00:30               100 roadbig_line.shp
2018-09-09  00:30               100 roadbig_line.shx
2018-09-09  00:30               412 roadmedium_line.prj
2018-09-09  00:31               420 roadmedium_line.shp
2018-09-09  00:30               100 roadmedium_line.shx
2018-09-09  00:30               412 roadsmall_line.prj
2018-09-09  00:30               100 roadsmall_line.shp
2018-09-09  00:30               100 roadsmall_line.shx
2018-09-09  00:31            97,891 suburb_point.dbf
2018-09-09  00:30               412 suburb_point.prj
2018-09-09  00:31            42,268 suburb_point.shp
2018-09-09  00:30               100 suburb_point.shx
2018-09-09  00:31           113,166 town_point.dbf
2018-09-09  00:30               412 town_point.prj
2018-09-09  00:31            48,848 town_point.shp
2018-09-09  00:30               100 town_point.shx
2018-09-09  00:31           403,846 village_point.dbf
2018-09-09  00:30               412 village_point.prj
2018-09-09  00:31           174,064 village_point.shp
2018-09-09  00:30               100 village_point.shx
2018-09-09  00:30               412 water_area.prj
2018-09-09  00:30               100 water_area.shp
2018-09-09  00:30               100 water_area.shx
2018-09-09  00:30               412 water_line.prj
2018-09-09  00:30               100 water_line.shp
2018-09-09  00:30               100 water_line.shx
              34 File(s)        906,777 bytes

But it seems these shapefiles are invalid - no bounding box set - so there seems a problem...

Any help always most appreciated... thanks...

geoffmcl commented 6 years ago

After this fix seems the shapefiles are much more promising ...

 Directory of X:\osm2shp\build.x64\test-pbf\shp

2018-09-11  02:42    <DIR>          .
2018-09-11  02:42    <DIR>          ..
2018-09-11  02:36            14,496 city_point.dbf
2018-09-11  02:34               412 city_point.prj
2018-09-11  02:36             6,316 city_point.shp
2018-09-11  02:36             1,876 city_point.shx
2018-09-11  02:34               412 railway_line.prj
2018-09-11  02:36         1,297,620 railway_line.shp
2018-09-11  02:36            44,628 railway_line.shx
2018-09-11  02:34               412 roadbig_line.prj
2018-09-11  02:36         2,750,516 roadbig_line.shp
2018-09-11  02:36            78,532 roadbig_line.shx
2018-09-11  02:34               412 roadmedium_line.prj
2018-09-11  02:36         6,697,500 roadmedium_line.shp
2018-09-11  02:36           159,884 roadmedium_line.shx
2018-09-11  02:34               412 roadsmall_line.prj
2018-09-11  02:36        10,603,860 roadsmall_line.shp
2018-09-11  02:36           195,492 roadsmall_line.shx
2018-09-11  02:36            98,021 suburb_point.dbf
2018-09-11  02:34               412 suburb_point.prj
2018-09-11  02:36            42,296 suburb_point.shp
2018-09-11  02:36            12,156 suburb_point.shx
2018-09-11  02:36           113,296 town_point.dbf
2018-09-11  02:34               412 town_point.prj
2018-09-11  02:36            48,876 town_point.shp
2018-09-11  02:36            14,036 town_point.shx
2018-09-11  02:36           403,976 village_point.dbf
2018-09-11  02:34               412 village_point.prj
2018-09-11  02:36           174,092 village_point.shp
2018-09-11  02:36            49,812 village_point.shx
2018-09-11  02:34               412 water_area.prj
2018-09-11  02:36        12,877,588 water_area.shp
2018-09-11  02:36           166,900 water_area.shx
2018-09-11  02:42        20,389,411 water_area.xg
2018-09-11  02:34               412 water_line.prj
2018-09-11  02:36        26,190,284 water_line.shp
2018-09-11  02:36           152,988 water_line.shx
2018-09-11  02:40        43,430,104 water_line.xg
              36 File(s)    126,018,676 bytes

And the output on processing central-america pbf is interesting...

45651674 nodes processed, 0 no id, 45444996 no nm, 196993 skipped, 9685 nodes exported
6515220 ways processed, 37 ways akipped, 6415455 way missed, 99728 ways exported
Total exported nodes: 9685
Total exported ways:  99728
Done processing 0
Clean exit
Difference 93.16 seconds, or 00:01:33.16 ...

Still lots to explore...