[gdal-dev] Alternative to GPKG format

jratike80 jukka.rahkonen at maanmittauslaitos.fi
Thu Nov 1 03:13:39 PDT 2018


Hi,

That is probably another problem, OSM pbf format does not support effective
selection by region so selecting a subarea from europe-latest.osm.pbf may be
almost as slow as processing the whole dataset. I would try if
osmium-extract https://docs.osmcode.org/osmium/latest/osmium-extract.html
could do the clipping  faster.

-Jukka Rahkonen-


koji higuchi wrote
> Hi, my source file is too big, around 19gb (europe-latest.osm.pbf)
> I also tried ogr2ogr for clipping into region as follows.
> ogr2ogr -f,  gpkg,  -clipdst, str(ulx), str(lry), str(lrx), str(uly), fo,
> fi
> but it was also very slow.
> 
> 
> On Thu, Nov 1, 2018 at 6:55 PM jratike80 <

> jukka.rahkonen@

>> wrote:
> 
>> koji higuchi wrote
>> > Hi, following is the code I used:
>> >
>> > Import os, osmium, fiona
>> >
>> > fi = 'europe-latest.osm.pbf'
>> > fo = 'europe-latest.dpkg'
>> >
>> > drv = 'DPKG'
>>
>> Hi,
>>
>> I am not able to evaluate if your code is effective or not. However, I
>> can
>> give you some numbers for comparison.
>>
>> Test data http://download.geofabrik.de/europe/finland-latest.osm.pbf
>> - 322 MB as .pbf
>> - 770725 points
>> - 1778917 lines
>> - 3128 multilinestrings
>> - 2087911 multipolygons
>> - 6985 other relations
>>
>> Command:
>> ogr2ogr -f gpkg finland.gpkg finland-latest.osm.pbf
>>
>> Execution time on Windows laptop:
>> 2 minutes and 20 seconds
>>
>> If you experience some slower performance it is probably not because of
>> SQLite/GeoPackage as a format is slow but because something is not done
>> in
>> a
>> way that is not optimal for the format. Could you also define your source
>> data and the performance that you have measured?
>>
>> -Jukka Rahkonen-
>>





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html


More information about the gdal-dev mailing list