[osmosis-dev] Cutting PBF file into 1° tiles
Sylvain Melin
s.melin at alsim.com
Mon Apr 18 09:52:24 UTC 2016
On 18/04/2016 11:00, Jochen Topf wrote:
> On Mo, Apr 18, 2016 at 10:10:06 +0200, Sylvain Melin wrote:
>> My plan is to :
>> - exploit a planet sized pbf file
>> - cut it into 1° tiles using osmosis
>> - filter and extract the data from these tiles as shapefiles using libosmium
> If you are writing your own program anyway to create those shapefiles, why
> don't you do the splitting in this step *after* creating the geometries and
> before writing them into shapefiles? That is probably much easier to do than
> based on the PBF due to the structure of the OSM data files.
>
> Jochen
Maybe I'm wrong but because I don't want to parse the full
planet.osm.pbf every time I want to extract a small set of data.
The processing time seems to grow exponentially with the size of source
file so having an intermediate level with 1° sized pbf containing
everything seems very practical to me.
Also, my osmium program loops over the target tile and parse the
appropriate pbf :
/for each j in [-90,89]//
//{//
// for each i in [-180,179]//
// {//
// create osmium::handler//
// parse i_j.pbf with osmium::io::Reader//
// extract data to single handler with osmium::apply//
// }//
////}/
Do you think it would be more efficient to have a single big PBF and
extract data to several handlers ?
Is it even possible without filling the RAM ?
/for each j in [-90,89]//
//{//
// for each i in [-180,179]//
// {//
// create osmium::handler//
// }//
//}//
//
//parse world.pbf with osmium::io::Reader//
//extract data to all handlers with osmium::apply
/Thank you for your help./
/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/osmosis-dev/attachments/20160418/92223571/attachment.html>
More information about the osmosis-dev
mailing list