[osmosis-dev] WayKeyFilter
Andrew Byrd
andrew at fastmail.net
Thu Nov 19 12:27:31 GMT 2009
On 19 Nov 2009, at 07:30, Brett Henderson wrote:
>
> Can you please update the wiki detailed usage page to reflect the
> new task?
> http://wiki.openstreetmap.org/wiki/Osmosis/DetailedUsage
Done. I noted that it is currently only in svn.
> On this note, if anybody is keen Osmosis could really do with
> somebody to take on creating a consistent set of filtering tasks for
> all entity types (at a minimum it appears that relations are missing
> from the existing set of tasks). I'm not sure what the requirements
> would be and I don't do any filtering myself so don't have much
> experience with it. I think all existing tasks have a bug at the
> moment where they don't handle ',' characters in the key names which
> probably should also be fixed.
It should be rather simple to extend the existing filter set to
relations. I have little experience with OSM/Osmosis myself, yet the
task architecture was easy to understand. One thing needs to be
clarified, though: should entities belonging to entity types not being
filtered be passed through or thrown away? Currently, the node filters
pass only nodes through, while the way filters pass non-way entities
through unchanged. I see the practical reason for this, but it's not
consistent. Maybe there should be an option to choose between behaviors.
According to the wiki, a tag is a "Key-Value pair of Unicode strings
of up to 255 characters (full Unicode characters, not bytes)." There
is no mention of excluded list separator characters, so if it was
changed from comma to something else, there would still be a bug and
it would cause havoc with people used to using commas. One reasonable
solution is some kind of escape character (backslash?) for non-
splitting commas that are in the key name.
It would also be helpful to have a switch to invert filter logic from
accept to remove, e.g. so you can accept everything with a highway tag
then remove everything that has the highway=motorway value. This would
make for a cleaner operation (and command line) than trying to make an
exhaustive list of every key-value you want to keep.
It would be nice to have comments from users and developers about how
the filter set should be designed, and once that's clear I think the
new tasks would show up, since they are useful to a lot of people, but
not major undertakings.
-Andrew
More information about the osmosis-dev
mailing list