[OSM-dev] osmconvert bounding polygon

Bradley Kleiboer bkleiboer at rideco.com
Tue Jun 22 20:11:28 UTC 2021


Just wanted to loop back here about this.
This solution proposed by Gerd worked for me to still use osmconvert. As a
note I also tried the osmium command suggested by Frederik.
The problem seemed to only happen with a large amount of map data which
explains why the --hash-memory option was useful.

Thank you all for your help,
Brad


On Wed, Jun 9, 2021 at 2:01 AM Gerd Petermann <
gpetermann_muenchen at hotmail.com> wrote:

> Hi,
>
> the solution for osmconvert is the --hash-memory option. Try e.g.
> --hash-memory=3000
> See also this thread in the German forum
> https://forum.openstreetmap.org/viewtopic.php?id=65102
>
> Gerd
>
> ________________________________________
> Von: Bradley Kleiboer <bkleiboer at rideco.com>
> Gesendet: Mittwoch, 9. Juni 2021 00:50
> An: dev at openstreetmap.org
> Betreff: [OSM-dev] osmconvert bounding polygon
>
> Hello,
>
> I have encountered a bug with osmconvert (version 0.8.7) with regards to
> cutting out a polygon (a .poly file) from map data.
> After running the command there are small bits of map data outside of the
> bounding polygon that are not removed and I was wondering if anyone has
> seen this behaviour before.
> Here a sample of the command I am running:
> osmconvert \
>         --verbose \
>         --drop-author \
>         --drop-version \
>         --complex-ways \
>         --complete-ways \
>         --out-o5m \
>         -B=sample_polygon_file.poly \
>         -o=output_file.o5m \
>         input_file.pbf
>
> Also, I am able to successfully cut out the polygon file using an osmosis
> command but it is MUCH slower so I was hoping to get the osmconvert command
> to work.
> Sample command:
> osmosis \
>         -verbose \
>         --read-pbf-fast file="input_file.pbf" workers=4 \
>         --bounding-polygon file=sample_polygon_file.poly completeWays=yes \
>         --write-pbf file=output_file.pbf omitmetadata=true
>
> Thanks,
> Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20210622/8e6b932f/attachment.htm>


More information about the dev mailing list