NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I have found a validation test at https://wiki.openstreetmap.org/wiki/JOSM/Validator called incomplete ways which is exactly what I'm looking for to use in JOSM. However, in JOSM this validator/test does not exist. How can I find the validator or how else can a search for ways that end with one node or less?

asked 13 Jul '15, 11:13

BmanS's gravatar image

BmanS
56447
accept rate: 0%


It is possible to specify a custom rule that will flag unconnected end nodes, here's a simple version:

way[highway]>[index=1] node!:connection,
way[highway]>[index=-1] node!:connection{
    throwWarning: tr("Unconnected end node.");
}

To use such a rule in JOSM, save the above in a file with a name like my.validator.mapcss and then add it to the active rules. Edit->Preferences, Select the Checkmark, select the "Tag checker rules" tab and then click the + button on the right:

Add validation ruleset

Take a look at the docs to see about making the rule more specific.

permanent link

answered 15 Jul '15, 21:01

maxerickson's gravatar image

maxerickson
12.7k1083176
accept rate: 32%

edited 15 Jul '15, 21:02

1

This answer has helped me a lot! I am struggling a bit though for the code to be able to find the first node as well as the last node in the way as a dead end. With the code you gave it only selects the first node of the way and throws a warning for it. I tried to look into it, it seems as if it already should flag both. The index=-1 refers to the last node according to my understanding. Why would it not throw a warning for the last node in the way that is not connected to two ways?

(01 Aug '15, 20:58) BmanS

It works as I expect, if the first node is not connected it warns there, if the last node is not connected it warns there. Maybe you have a typo? I'm not sure where white space is significant and not.

I should mention, the development version of JOSM has added a new pseudoselector, :in-downloaded-area, which should cut down on spurious warnings.

(02 Aug '15, 19:31) maxerickson

I am still struggling to find both the start of a way and the end of a way as a dead end...

Another big question I hope you can help me with: How can I overlay a grid in JOSM and then run the validator individually on each grid square of the total grid. For example, by doing this it will show me the amount of errors for each square of the grid. The grid should be 1,5km^2 and should cover the area of a specified city. How can that be achieved?

(16 Sep '15, 21:31) BmanS

Well yes, I thought maxerickson could help so asked the question here as well as a separate question so I know maxerickson would read it.

Aseere: If you could help it would be really appreciated.

(16 Sep '15, 22:00) BmanS

BmanS: please place questions only at one place (that prevents double efforts) and preferably at in a new "question" entry (that helps others with the same question). Note: this new question is now answered at the linked place.

(17 Sep '15, 05:47) aseerel4c26 ♦
showing 5 of 6 show 1 more comments

This validator is a JOSM built-in and always available. You can open it by pressing the blue checkmark icon: JOSM validator checkmark icon

But incomplete ways is probably not what you are looking for. It just "checks for ways with zero or only one node". It won't tell you information like "there is street xyz but it is not mapped in OSM yet".

permanent link

answered 13 Jul '15, 12:23

scai's gravatar image

scai ♦
33.3k21309459
accept rate: 23%

edited 13 Jul '15, 12:23

There is a test in the JOSM validator options labelled "Untagged, empty and one node ways" which is perhaps what you are after.

permanent link

answered 13 Jul '15, 11:50

EdLoach's gravatar image

EdLoach ♦
19.5k16156280
accept rate: 22%

edited 13 Jul '15, 11:51

That option seems as if it might help, but it doesn't seem to identify the dead ended roads as errors/warnings? Should it not?

(14 Jul '15, 08:54) BmanS

Why should a dead end be an error?

(14 Jul '15, 09:40) scai ♦

it shouldn't be necessarily. But I'm trying to identify dead end roads to check whether they are in fact dead ends or if they are wrongly mapped.

(14 Jul '15, 10:29) BmanS

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×622
×13

question asked: 13 Jul '15, 11:13

question was seen: 4,445 times

last updated: 17 Sep '15, 05:47

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum