On Thu, Nov 19, 2009 at 11:27 PM, Andrew Byrd and...@fastmail.net wrote:
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.
Great, thanks.
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.
I think filters should behave consistently rather than having each entity
type treated differently for a particular use case convenience. Usually I
try to avoid changing existing behaviour, but only if there's a reasonable
alternative. If the current filters are inconsistent I think we should
change them. If we are going to break existing behaviour though I think we
should attempt to make all the breaking changes at once rather than
dribbling them in over a longer period.
But I didn't write the original tasks and haven't used them so I'm not well
placed to decide how they should work.
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.
Yep, I think we'd have to escape the separating character if it is included
in the key. Given the rarity of something like a ',' in a tag name, I don't
think there's an issue with requiring users to escape it when it does occur.
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.
I'm gonna take a back seat on this one :-) If you have some time to gather
some requirements, tidy up the existing tasks, and add new features then go
for it.
Don't feel the need to get full consensus before you do something.
Obviously it's a good idea to gather ideas, but feel free to come up with
what you think works well, implement it, and then get feedback.
Brett
___
osmosis-dev mailing list
osmosis-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/osmosis-dev