Modify ↓

Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#12386 closed enhancement (fixed)

Power validation rules update

Reported by: francois.lacombe Owned by: team
Priority: normal Milestone: 16.02
Component: Core validator Version: tested
Keywords: power, presets, validation Cc:

Description (last modified by Don-vip)

Hi,

Due to recently power presets update, this ticket aims to provide updated guidelines regarding the validation of user inputs with these keys.
This comes after some objects have been broken by non-knowledgable users (substation on open poly-line, power terminal in the middle of a power way and so on...)

Here are the valid features associated with the main power keys, got from the up to date wiki

Tag (wiki) Valid features Preset object type validator rule
​Tag:power=plant area, relation ✔ ✔
​Tag:power=generator node, area ✔ not needed
​Tag:power=cable way ✔ not needed
​Tag:power=line way ✔ ✔ Done.
​Tag:power=minor_line way ✔ not needed
​Tag:power=tower node ✔ ✔ Done.(for unclosed ways only)
​Tag:power=pole node ✔ ✔
​Tag:power=terminal node Not in Preset, see #12297 -
​Tag:power=portal node, way ✔ not needed
​Tag:power=insulator node, way ✔ not needed
​Tag:power=catenary_mast node Not in Preset, see #12297 -
​Tag:power=transformer node ✔ Done. ✔ Done.
​Tag:power=switch or ​Tag:power=pole+switch=yes or ​Tag:power=tower+switch=yes node ✔ not needed
​Tag:power=substation node, area ✔ not needed (area style not closed warning for unclosed ways already there)
​Tag:power=converter node, area ✔ not needed (area style not closed warning for unclosed ways already there)
​Tag:power=compensator node, area ✔ not needed (area style not closed warning for unclosed ways already there)
​Tag:power=insulator node, way ✔ Done. not needed
​Tag:building=transformer_tower node, area ✔ not needed (area style not closed warning for unclosed ways already there)

Presets may be updated according to this table and I suggest to prompt a validation warning when such keys are used on different features than the given ones.

It may be great to update current validation rules :

Rule Update Progress
A power support is missing on a power line/power minor_line Add ​Tag:power=portal, ​Tag:power=terminal, ​Tag:power=insulator as valid supports. Furthermore, a power line/minor_line can be directly connected to a ​Tag:power=transformer. ✔ Done.

And add a few more :

Rule Description Progress
A ​Tag:power=cable without ​Key:location A power cable is a feature which must be set in a dedicated location such as indoor, underground or undersea (non exhaustive list). Any power cable object without the location key may show up a validation warning. ✔ Done. Wiki says that location=* is optional and that underground is the assumed default value for power=cable. However 5290 out of 7963 cables have the location tag (​http://overpass-turbo.eu/s/dMQ). So add this as info level.
Crossing between road, railroad, path, landuse, waterways and power ways Power lines may be long objects crossing through country and mappers can easily place nodes in common with roads or landuse areas. A validation error should be prompted to reduce the amount of such problems.
Missing voltage as important information Adding ​Key:voltage to ​Tag:power=line, ​Tag:power=minor_line, ​Tag:power=cable, ​Tag:power=generator, ​Tag:power=transformer or ​Tag:power=plant is a really useful information and miss this key should prompt an info validation message. Voltage is currently one main threshold to distinguish line from minor_line. ✔ Done.

These lists can be improved according to the experience of contributors and developers

Attachments (0)

Change History (27)

comment:1 by Don-vip, 11 years ago

Milestone: → 16.02

comment:2 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:3 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:4 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:5 by Klumbumbus, 11 years ago

In 9494/josm:

see #12386 - allow power=insulator on ways in preset; add validator warnings for power=tower on unclosed way and power=line on node

comment:6 by Klumbumbus, 11 years ago

We don't need validator rules for cases, which are nearly non existent in the database. This would only extend the validation time without a gain.

comment:7 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:8 by Klumbumbus, 11 years ago

Component: Core → Core validator

comment:9 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:10 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:11 by Klumbumbus, 11 years ago

In 9495/josm:

see #12386 - add validator info for power=cable without location

comment:12 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:13 by francois.lacombe, 11 years ago

Thank you Klumbumbus for the edits so far

Regarding power=transformer on ways/areas : mappers really shouldn't use this.
​http://wiki.openstreetmap.org/wiki/Tag:power%3Dtransformer

The 8944 instances will slowly be converted to node (sometimes in the middle of a building=* object)
Example : ​https://www.openstreetmap.org/node/3342939725
That's why a validation info or warning may really be welcome to help to down transformers as a way to 0.

comment:14 by francois.lacombe, 11 years ago

Description: modified (diff)

comment:15 by Klumbumbus, 11 years ago

In 9500/josm:

see #12386 - remove support of power=transformer on ways and add validator warning. add validator info for some power features without voltage, adjust presets, integrate separate power.mapcss in combinations.mapcss

in reply to:  13 comment:16 by Klumbumbus, 11 years ago

Replying to francois.lacombe:

Thank you Klumbumbus for the edits so far

Regarding power=transformer on ways/areas : mappers really shouldn't use this.
​http://wiki.openstreetmap.org/wiki/Tag:power%3Dtransformer

The 8944 instances will slowly be converted to node (sometimes in the middle of a building=* object)
Example : ​https://www.openstreetmap.org/node/3342939725
That's why a validation info or warning may really be welcome to help to down transformers as a way to 0.

OK, done.


I limited the missing voltage info to plants/generators with generator:output:electricity/plant:output:electricity

comment:17 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:18 by Klumbumbus, 11 years ago

Ok, the rest are java tests.

in reply to:  18 ; comment:19 by francois.lacombe, 11 years ago

Replying to Klumbumbus:

I limited the missing voltage info to plants/generators with generator:output:electricity/plant:output:electricity

This is definitely right, thank you to have noticed that

Replying to Klumbumbus:

Ok, the rest are java tests.

Do this means that the validation is hardcoded in Java instead of mapcss validator files ?

Version 0, edited 11 years ago by francois.lacombe (next)

in reply to:  19 comment:20 by Klumbumbus, 11 years ago

Replying to francois.lacombe:

Replying to Klumbumbus:

Ok, the rest are java tests.

Does this mean that the validation is hardcoded in Java instead of mapcss validator files ?

Yes. And that I'm not able to write Java code :)

comment:21 by Klumbumbus, 11 years ago

In 9506/josm:

see #12296 - add new water and waypoint icons (by zermes), move old icons to nodist folder; see also [o31996]; add warning for traffic_calming=yes; remove power.mapcss test (see #12386)

comment:22 by Klumbumbus, 11 years ago

Description: modified (diff)

comment:23 by Don-vip, 11 years ago

In 9895/josm:

see #12386 - add power=portal, power=terminal, power=insulator to allowed power tags

comment:24 by Don-vip, 11 years ago

Description: modified (diff)

comment:25 by Don-vip, 11 years ago

Resolution: → fixed
Status: new → closed

That's all for this month. Can you please create a new tickets with remaining items for next milestone?

in reply to:  25 comment:26 by francois.lacombe, 11 years ago

Replying to Don-vip:

That's all for this month. Can you please create a new tickets with remaining items for next milestone?

Hi Vincent

Here you go : #12577

Many thanks to the team, this month update sounds really good ;)

comment:27 by Klumbumbus, 8 years ago

In 14123/josm:

fix #15769, see #12297, see #12386 - Add power=catenary_mast and power=terminal

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.