[josm-dev] [OSM-dev] JOSM Jumbo patch v8 (JOSM and validator enhancements)

Andrew M. Bishop amb at gedanken.demon.co.uk
Wed Jan 30 19:27:43 GMT 2008


Dave Hansen <dave at sr71.net> writes:

> So, if you have any horribly repetitive tasks in JOSM that you'd like to
> automate, I want to hear about it.  I'd be happy to add things to this.

I thought you would never ask :-)

> Binaries and patches here:
> 
> 	http://dev.openstreetmap.org/~daveh/josm/008/
> 
> Please give it a try if you like, and let me know if you have any
> troubles.  I'll be happy to investigate and fix bugs. 

I have downloaded and tried version 10 and version 11 but they both
fail in the validator with a Java error:

java.lang.NoSuchMethodError: org.openstreetmap.josm.data.osm.Node.waysUsing()Ljava/util/Collection;
        at org.openstreetmap.josm.plugins.validator.tests.DuplicateNode.visit(DuplicateNode.java:121)
        at org.openstreetmap.josm.data.osm.Node.visit(Node.java:44)
        at org.openstreetmap.josm.plugins.validator.Test.visit(Test.java:126)
        at org.openstreetmap.josm.plugins.validator.ValidateAction.doValidate(ValidateAction.java:93)
        at org.openstreetmap.josm.plugins.validator.ValidateAction.actionPerformed(ValidateAction.java:41)
        at org.openstreetmap.josm.plugins.validator.ValidatorDialog.actionPerformed(ValidatorDialog.java:200)

If I disable all tests on nodes then it is OK but this means the
motorway tests and the duplicated nodes tests.


> Validator:
> * New checks:
>    * Empty ways (ways with 0 nodes) (fixable)
>    * MotorwayLinksMustTouchMotorways, don't let motorway_links exist
>      unless touching a motorway (lots of these in TIGER)
>    * MotorwayIntersections: motorways may only touch motorway_links
>      and other motorways, except at their endpoints (fixable)
>    * DuplicateSegment: for ways that re-use the same node pair
> * Rewrote coastlines checks:
>    * check for "forks" in coastline
>    * ensure coastline is ordered (these are fixable now)
>    * check for "ends" of coastline inside the current layer
> * consider TIGER tags in UntaggedNodes
> * Basically rewrote DuplicatedNodes to allow multiple nodes at the same
>   spot if they are different types (highway, power, railway, etc...)
> * Use new granular Commands from core
> * Make OverLapping ways fixable

What does fixable mean here?  I thought that the validator "fix"
button would work on overlapping ways but it doesn't.

Obviously if the two ways are identical (in nodes that are used and
the attributes that JOSM shows) then it is always possible to replace
them with a single way.  In some places this would fix dozens of
duplicated ways at a stroke.

If the ways are not identical in attributes but they use the same set
of nodes (in forward or reverse order) and the attributes don't clash
then merging is, or might be, possible.  The same sort of process as
for joining ways could be used to prompt for clashing attributes.

> * Take different types of ways into account in CrossingWays

Can there be a validator check for bridges and tunnels without a layer
tag.  This would remove the warnings about crossing ways where a
bridge without a layer tag crosses a river for example.

On the subject of layers how about a warning for areas that have a
negative layer value.  This is, I think, a method people use of
putting areas like forests at layer -1 to ensure that roads get drawn
on top.

What about a new tag that can be added to ways to indicate that they
overlap another way and that it has been checked to be OK.  I refer
here to places where there are two areas that share edges which raise
so many false positives that it is impossible to find the real
overlapping ways.  This would mean that the second time validator is
run the overlapping ways can be ignored.

What about adding items to the overlapping ways list only once per
group of ways and not once per "segment".  Also adding pairs of ways
to the crossing ways list once per pair and not once for each way.

What about nodes that have tags that only apply to ways (like oneway
which is my favourite) or ways that have tags that only apply to nodes
etc.

Don't get me wrong, I do like the validator plugin.  I think that
everybody should use it.  There are one or two things that I see
coming up often that make it tedious to use sometimes.

-- 
Andrew.
----------------------------------------------------------------------
Andrew M. Bishop                             amb at gedanken.demon.co.uk
                                      http://www.gedanken.demon.co.uk/




More information about the josm-dev mailing list