osm-fr / osmose-backend

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

Repair analyser_merge_defibrillators_FR.py #2268

Open johanricher opened 1 month ago

johanricher commented 1 month ago

The French national database for defibrillators is published in JSON on data.gouv.fr: https://www.data.gouv.fr/fr/datasets/geodae-base-nationale-des-defibrillateurs/#/resource-86ea48a0-dd94-4a23-b71c-80d3041d7db2.

In the Osmose project, analysers/analyser_merge_defibrillators_FR.py was made to help reconcile and merge this data into OSM.

However, the structure of the JSON file seems to have changed since then. Geo coordinates are not in geom_x, geom_y fields but rather c_lat_coor1 and c_long_coor1.

Osmose integration of defibrillators should be repaired to help add this data into OSM

frodrigo commented 1 month ago

It not looks broken to me. The analyser use GeoJSON format, not JSON.

https://osmose.openstreetmap.fr/en/issues/open?item=8370

johanricher commented 1 month ago

analysers/analyser_merge_defibrillators_FR.py references the id (86ea48a0-dd94-4a23-b71c-80d3041d7db2) of the geodae.json file published on data.gouv.fr (which is the only one on the dataset page, the other is a CSV file).

As far as I can tell, there are more than 132k unique defibrillators in geodae.json. It doesn't seem like they are all in Osmose. For example, in geodae.json there are 6 defibrillators for the commune of Chaufailles (filtering the c_com_insee field with the 71170 value), whereas Osmose shows nothing for this area.

Of course, it's extremely possible that my comprehension of how Osmose works is very bad. :) In any case I'll learn something, thank you for your help!

frodrigo commented 1 month ago

Right, results are provided by this one analyser_merge_defibrillators_FR_aedmap.py.

The other one reports nothing

https://osmose.openstreetmap.fr/en/issues/open?item=8370&class=120