[josm-dev] Validator

Dermot McNally dermotm at gmail.com
Sat Aug 16 16:12:54 BST 2008


2008/8/15 Dirk Stöcker <openstreetmap at dstoecker.de>:

> The default configuration file for this is here:
> http://svn.openstreetmap.org/applications/editors/josm/plugins/validator/tagchecker.cfg

I was excited by the prospect of a smarter validator, so I tried it
out. My first impression was "oh, it looks like tertiary roads are not
considered valid, we should fix that". So I opened up the config file
and tried to make sense of it. It took me a while to see what was
going on.

Basically, the config file as it currently stands knows that nodes
tagged with highway types are bad and it knows that certain classes of
highway way that lack a ref attribute _may_ be bad. The drawback of
the current validator as implemented is that only the message "Illegal
tag/value combinations" is given. So in my case, before I read the
config file, I looked at a highway tagged only "highway=tertiary" and
had no way of knowing that the actual message is that a ref was
missing.

I think that this has the power to confuse. That said, I can't code
Java, so I can't give you patches to the code. However, let me propose
the following changes to the behaviour:


Let's take the rule that caught my tertiary road. Currently it looks like this:

way  : I : highway == tertiary && ref != *                     #
highway without a reference

I suggest that the comment on this line should actually belong to the
rule data and be used in the reporting to the user:

way  : I : highway == tertiary && ref != * : Highway without a reference

The validator would in the event of catching such a case, add a
validation violation of severity "info" with the text "Highway without
a reference" instead of "Illegal tag/value combinations"

What do you think? My fear is that if a change of this sort isn't
made, once this currently small ruleset grows to 20 times its current
size, we'll all have lots of validator violations but not know what
we're doing wrong.

Cheers,
Dermot

-- 
--------------------------------------
Iren sind menschlich




More information about the josm-dev mailing list