osm-fr / osmose-backend

Part of osmose that runs the analysis, and send the results to the frontend.
GNU General Public License v3.0
90 stars 114 forks source link

French power TSO location:transition towers #457

Open flacombe opened 5 years ago

flacombe commented 5 years ago

Hi all,

A recently recommended trick from the French TSO GIS team regarding the "air to ground" connections between power lines and underground cables. They publish a layer called "underground crossing points" which I thought mentions the air to ground towers but actually not.

It may be possible to add a check on power=tower + location:transition=yes by finding connections between towers, underground cables and overhead lines layers. All matching connections should be tagged with location:transition=yes on OSM. See : https://wiki.openstreetmap.org/wiki/Tag:location:transition%3Dyes

Osmose already warns about missing towers from the same tower layers on item #8290 class 1. Missing location:transition=yes should be added on the same items with such a query :

WITH air_to_ground_connections AS (select ST_Intersection(cable.geom, line.geom) AS point FROM power_lines line JOIN power_cables cable ON ST_Touches(line.geom, cable.geom))
SELECT towers.* FROM towers JOIN air_to_ground_connections ON ST_Contains(ST_Buffer(towers.geom::geography,5)::geometry, air_to_ground_connections.point)

Let me know if you have any issue regarding this point. TSO doesn't plan to publish additional data-set or additional attribute on towers layer to cover this use case.

All the best

frodrigo commented 5 years ago

You want to add the location:transition=yes tag on power=tower where data from two other datasets only touch ? (where "Lignes souterraines" touch "Lignes aériennes")

If it is this. We can't do it in Osmose using the opendata framework. For now we can use only one points layer dataset.

flacombe commented 5 years ago

Understood and legit

Can't you produce the points dataset only by using ST_Intersection postgis function?

Something like INSERT INTO location_transitions (geom) SELECT ST_Intersection(line.geom,cable.geom) FROM rte_lines line INNER JOIN rte_cable cable ON ST_Intersects(line.geom,cable.geom);

frodrigo commented 5 years ago

No. We can not use extra layer in Osmose with the framework.

The solution is to prepare the data manually or with code. There is no so advanced data preparation in Omsose, yet.

flacombe commented 5 years ago

Ok it's not so time consuming to produce data manually. I'll look for it shortly

flacombe commented 1 year ago

Well... shortly meant 4 years!

I've now a file with 20k rows matching with power=tower features. How can I make it available to osmose to create a new merge analysis?

It will allow to complete location:transition and line_management as well.

frodrigo commented 1 year ago

How can I make it available to osmose to create a new merge analysis?

I guess you can put your script to produce the data, and the data on a github project.

flacombe commented 1 year ago

No script, it was made one shot in qgis. Can I put the data on data.gouv instead of github?

frodrigo commented 1 year ago

No script, it was made one shot in qgis.

I suggest anyway to describe what do you made, to be able to produce a update in the future.

Can I put the data on data.gouv instead of github?

Yes.

flacombe commented 1 year ago

I suggest anyway to describe what do you made, to be able to produce a update in the future.

Methodology is described in #2004

flacombe commented 1 year ago

Here we go: https://www.data.gouv.fr/fr/datasets/reseau-de-transport-delectricite-pylones-speciaux/

I'll make a PR for a dedicated merge analysis for that. Is item 8290 with class 2 or 10 suitable for that @frodrigo ?

frodrigo commented 1 year ago

Here we go: https://www.data.gouv.fr/fr/datasets/reseau-de-transport-delectricite-pylones-speciaux/

I suggests you to not use date in name. It is better to make transparent update.

Is item 8290 with class 2 or 10 suitable for that @frodrigo ? http://osmose.openstreetmap.fr/fr/issues/open?item=8290

2 is free, 10 not.

frodrigo commented 1 year ago

We got no result http://osmose.openstreetmap.fr/en/issues/open?item=8290&class=2

flacombe commented 1 year ago

Worrying. Can it be caused by X/Y swap or wrong decimal separator, maybe? However Load_XY("X", "Y") sounds correct.

frodrigo commented 1 year ago

You cannot use possible_merge without a ref (with the current code).

-        self.def_class_possible_merge(item = 8290, id = 2, level = 3, tags = ['merge', 'power', 'fix:chair'],
+        self.def_class_missing_official(item = 8290, id = 1, level = 3, tags = ['merge', 'power', 'fix:chair'],
flacombe commented 1 year ago

I see this warning in particular that was caused by conflation more than ref (original OSM feature doesn't have ref:FR:RTE on it) https://osmose.openstreetmap.fr/fr/issue/4f07d9dc-27e1-ce8b-4651-354a277fb8a3

How Osmose was able to propose a fix if the possible merge is only done with ref:FR:RTE?

frodrigo commented 1 year ago

ref is for update. Here it possible_merge.

flacombe commented 1 year ago

My analysis 8290/2 and previous example are both possible_merge, both without ref.