[OSM-dev] area filtering on change streams?

Brian Cavagnolo bcavagnolo at gmail.com
Mon Jan 21 06:54:33 GMT 2013

On Sun, Jan 20, 2013 at 10:00 AM, Frederik Ramm <frederik at remote.org> wrote:
> Hi,
> On 20.01.2013 18:49, Stephan Knauss wrote:
>>> I'd like to maintain an updatable database of OSM data clipped by a
>>> polygon.  I understand how to initialize the database using osmosis'
>>> --bounding-polygon task.  But this task does not seem to operate on a
>>> change stream.  Any recommendations on trimming a change set down?
>> As you already noticed only nodes have a coordinate and can be used for
>> filtering.
>> Select your bounds a bit bigger and filter later in the database. I'm
>> using a cron job to clean it up.
> Alternatively, if you don't need minutely updates, download and clip the
> full area of interest in regular intervals, run a --derive-change task
> against the new extract and the earlier version, and load the resulting .osc
> into the database.

I'm kinda hooked on the appeal of only working with the changeset.  I
poked around the osmosis source and learned a bit about the change
format.  It looks like changes could be filtered using the same code
used for the polygon and bounding box filters.  Does this sound
intuitively correct?


More information about the dev mailing list