[OSM-dev] Osmosis patch for filtering ways
siliconfiend at gmail.com
Wed Mar 26 12:22:51 GMT 2008
I have in the works another method to filter ways based on tag content.
Cristoph's method is straightforward and simple and can be completely
contained on the command line, which is nice. Mine is file-based because I
plan to use the same file to control how tiling works and also how routable
Garmin GPS maps are generated. With this method you could have a single rule
file which could be used for all these things--filtering to select the
elements you want, slicing an OSM file into tiles, then creating routable
maps from those tiles.
I have my work-in-progress rule file format here:
There are a few things I don't really like about it, and I'm definitely open
to suggestions. I'm thinking the filter would operate on the tests in the
<match> elements that are an immediate child of the <action> definition.
Anyway, I just wanted to make you aware of my (pending) alternate
implementation when you're looking to incorporate this patch.
On Wed, Mar 26, 2008 at 5:48 AM, Brett Henderson <brett at bretth.com> wrote:
> Hi Christoph,
> Thanks for the patch. I haven't had a chance to look at it yet but I
> will get to it eventually.
> Christoph Sommer wrote:
> > Dear all,
> > I recently needed to filter OSM data to only include motorways and trunk
> > roads. Finding no easy way to achieve that in a batch run, I extended
> > Osmosis to be able to filter ways and nodes to achieve this. Maybe the
> > patch is of use to someone:
> > <
> > Osmosis can then be run like this:
> > java -jar osmosis.jar --read-xml file="input.osm" --way-key-value
> > keyValueList="highway.motorway,highway.motorway_link,highway.trunk,
> > --used-node --write-xml file="output.osm"
> > It will filter ways to only output those with given key.valuecombinations,
> > then discard unused nodes.
> > Regards,
> > Christoph
> > _______________________________________________
> > dev mailing list
> > dev at openstreetmap.org
> > http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
> dev mailing list
> dev at openstreetmap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dev