[OSM-dev] Bounding Box Filter w/Osmium

Spencer Gardner spencergardner at gmail.com
Sat Aug 17 01:18:16 UTC 2019


I'm working with pyOsmium for parsing OSM and things are working pretty
well. One problem I'm having is that I need to be able to apply a bounding
box filter to handle cases where an unnecessarily large extract is used.
(For example, a user downloads the extract for their entire country but is
only working within a single city).

I can't find this addressed in the Osmium documentation. Does this
functionality exist? If not, are there clever ways to achieve this? At the
moment I've created a shapely feature representing the bounding box and am
comparing nodes and ways for an intersection. This is highly inefficient
and I'm sure there's a better way. Thanks for any advice.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20190816/62def880/attachment.html>


More information about the dev mailing list