[OSM-dev] area filtering on change streams?

Svavar Kjarrval svavar at kjarrval.is
Fri Jan 18 18:21:00 GMT 2013

This is roughly the line I use to update iceland.osm with the most
recent updates:
/path/to/osmosis --rri --simc --rx iceland.osm --ac --bp
file="iceland.poly" --wx iceland2.osm;

'iceland.osm' has an area already clipped using the bp polygon. Then
write over 'iceland.osm' with 'iceland2.osm' and repeat on the next update.

If you want the changeset for that area, you can instruct osmosis to
create a changeset file between those two files before the overwrite.
Maybe something like this:
/path/to/osmosis --read-xml file="iceland2.osm" --read-xml
file="iceland.osm" --derive-change --write-xml-change

For some reason, it matters to read 'iceland2.osm' into osmosis first,
otherwise one will get a change file to change from iceland2.osm into

I don't know a method to filter the change file itself according to a
certain polygon but you can use this if you don't find a better way to
do it.

With regards,
Svavar Kjarrval

On 18/01/13 17:53, Brian Cavagnolo wrote:
> Hello,
> 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?
> Thanks,
> Brian
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/dev

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20130118/d8069aa4/attachment.pgp>

More information about the dev mailing list