Skip to content

Conversation

nlehuby
Copy link
Contributor

@nlehuby nlehuby commented Oct 1, 2025

This PR add a mapcss ruleset about power grid & power generation, that is already packaged and available for JOSM.

source code: https://github.com/open-energy-transition/validate-my-grid
doc: https://wiki.openstreetmap.org/wiki/Power_networks/Quality_Assurance

The translations for the rules and the Osmose doc is intended to be in the validate-my-grid repo too, following the same models as Jungle Bus transport_mapcss ruleset (but I will come eventually, there are no translations in the repo for now)

#MapYourGrid

'Unsuitable value for transformer=* tag': 2,
'power=circuit relations should have a topology tag with value linear or branched': 209,
'wires tag should be on the power line and not on the circuit relation': 210},
'item': 9042,
Copy link
Contributor Author

@nlehuby nlehuby Oct 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the item number was chosen randomly

@nlehuby
Copy link
Contributor Author

nlehuby commented Oct 1, 2025

I had troubles with the rules that use the link selector, that is apparently not supported in Osmose mapcss:

even with the -osmoseItemClassLevel: none; flag, I got the following error at compilation:

line 315:30 no viable alternative at input '[role!~'
line 315:30 mismatched input '!~' expecting {',', '{'}

mapcss:

relation[power=circuit] >[role!~/^(section|substation)$/] way {  
   throwError: tr("Wrong role for way in power=circuit relations");
   suggestAlternative: "section/substation";
   -osmoseItemClassLevel: none; /* The rule involves multiple objects, which is not yet supported by Osmose */
}

source: https://github.com/open-energy-transition/validate-my-grid/blob/gh-pages/powerQA.validator.mapcss#L315

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant