Following #457, processing opendata to provide a file to qualify existing osm transmission towers gives me ideas.
It could be possible to analyze OSM distribution supports against existing osm power lines.
Lines are more widely drawn than line_management on supports.
The following processing is applicable on any OSM power line and OSM power support, from osmosis database:
Cut lines/minor_lines/cables at each intersection, default circuits=1
Remove out of service (both planned and disused) underground cables (usually disconnected from overhead lines and dismounted from towers)
Extrapolate each edge (start/end) of each line and keep circuits tag from lines.
aggregate overlapping edges on the same environment (overhead with overhead and underground with underground), make an ordered list of circuits from aggregated edges (for instance, a node connecting a line with circuits=2 and two lines with circuit=1 leads to 2-1-1 on the resulting aggregated edge).
Intersect overhead and underground edges, preserve overhead and underground circuits configs as separate attributes
Make a difference between overhead and underground to keep edges covered by a single environment (overhead only and underground only)
Union intersect and difference edges to get the final file with underground only, overhead only and common ones in the same table. Default circuit configurations to NULL.
It can be achieved by sequential SQL queries only, no need for a Python script.
CASE
WHEN config_circuits_overhead='1' AND config_circuits_underground='1' THEN 'transition'
WHEN config_circuits_overhead='2' AND config_circuits_underground='1-1' THEN 'transition'
WHEN config_circuits_overhead='1-1' AND config_circuits_underground='1' THEN 'branch'
WHEN config_circuits_overhead='1-1' AND config_circuits_underground='1-1' THEN 'split'
WHEN config_circuits_overhead='2-1-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='2-2-2' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='2-2-1-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='3-1-1-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='3-2-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='4-1-1-1-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='4-2-1-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='4-2-2' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='4-3-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='5-2-2-1' AND config_circuits_underground IS NULL THEN 'split'
WHEN config_circuits_overhead='2-2-1' THEN 'straight|branch'
WHEN config_circuits_overhead='2-2' AND config_circuits_underground='1' THEN 'straight|branch'
WHEN config_circuits_overhead='2-1-1-1' AND config_circuits_underground IS NULL THEN 'straight|branch'
WHEN config_circuits_overhead='1-1-1' AND config_circuits_underground IS NULL THEN 'branch'
WHEN config_circuits_overhead='2-1' AND config_circuits_underground='1' THEN 'split|transition'
WHEN config_circuits_overhead='1' AND config_circuits_underground NULL THEN 'termination'
ELSE NULL
END
This will lead to warning on power supports nodes respectively missing location:transition or line_management
They will look like Ỳou could add location:transition=yes here or _You may be interested by adding linemanagement=branch on this T-connection node.
It may be required to create a supplementary item beside 7040, up to @frodrigo
It is not possible to make the reverse analysis, like removing location:transition=yes or line_management when lines don't match the corresponding situation as those attributes may be used to state the presence of unknown/not drawn features, particularly underground.
Following #457, processing opendata to provide a file to qualify existing osm transmission towers gives me ideas. It could be possible to analyze OSM distribution supports against existing osm power lines. Lines are more widely drawn than line_management on supports.
The following processing is applicable on any OSM power line and OSM power support, from osmosis database:
circuits
=1circuits
tag from lines.circuits
from aggregated edges (for instance, a node connecting a line with circuits=2 and two lines with circuit=1 leads to2-1-1
on the resulting aggregated edge).It can be achieved by sequential SQL queries only, no need for a Python script.
Two OSM tagging additions can be deduced:
Line_management values (to be completed continuously):
This will lead to warning on power supports nodes respectively missing location:transition or line_management They will look like Ỳou could add location:transition=yes here or _You may be interested by adding linemanagement=branch on this T-connection node. It may be required to create a supplementary item beside 7040, up to @frodrigo
It is not possible to make the reverse analysis, like removing
location:transition=yes
orline_management
when lines don't match the corresponding situation as those attributes may be used to state the presence of unknown/not drawn features, particularly underground.