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 Afigeo fire hydrants files #413

Open flacombe opened 5 years ago

flacombe commented 5 years ago

Afigéo association published a minimal data model to share data about fire hydrants. Consumers may be interested to get data from OSM and contributors may want to improve OSM with French SDIS opendata files wich conform to this model.

Wiki now give the matching between Afigéo and OSM tags as of 2018-11-25. https://wiki.openstreetmap.org/wiki/FR:Tag:emergency%3Dfire_hydrant#Correspondance_avec_le_mod.C3.A8le_PEI_de_l.27Afigeo

Could Osmose be updated to be ready to import French SDIS files please? Example files on this list : https://docs.google.com/spreadsheets/d/1UBlX52Of20q4HnAFTyxrfX75vZrUtXDxwXP6j6_kUp4/edit#gid=0

All the best

wetneb commented 4 years ago

Here is a draft of Python script to translate Geojson files from Afigeo to OSM tags: https://gist.github.com/wetneb/a39aaacb4526e67b93580185fc372320

wetneb commented 4 years ago

It's not clear to me how to tackle this issue: I assume I could define a generic Afigeo translator (as a Generator) in some file, and then create a merge analyzer for each SDIS Geojson file, which would all use the same Afigeo generator? How should the generator be shared, in terms of file structure?

frodrigo commented 4 years ago

You script look simple, it would not be an issue to make the same in Osmose-QA Merge. You can use inheritance to reuse same code.

There is no example of standard format shared across area. But the results should be close to something like this : https://github.com/osm-fr/osmose-backend/blob/master/analysers/analyser_merge_public_transport_FR_stif.py

wetneb commented 4 years ago

@flacombe we have implemented this for Afigéo files for Saône-et-Loire (71), and it should not be too hard to adapt it to other Afigéo-based datasets.

flacombe commented 4 years ago

That sounds really good thank you It's great to have such a reusable analyzer on many open data files. I note to update this for additional analysis elsewhere.

Have you tested it on an osmose front already?

wetneb commented 4 years ago

No I haven't tested with a frontend. Also it currently assumes that the data is in GeoJSON, there might be slight adaptations to use SHP instead (which could be more widespread?)

frodrigo commented 4 years ago

Results are online http://osmose.openstreetmap.fr/fr/errors/?item=8090&useDevItem=all http://osmose.openstreetmap.fr/fr/map/#item=&useDevItem=all&zoom=13&lat=46.4228&lon=4.4138&level=1%2C2%2C3&tags=&fixable=

The item is still hidden for the public (&useDevItem=all).

wetneb commented 4 years ago

@frodrigo nice!

I played a bit with it. Any idea why conflation fails here: http://osmose.openstreetmap.fr/fr/map/#item=xxxx&useDevItem=all&zoom=18&lat=46.427079&lon=4.661121&level=1%2C2%2C3&tags=&fixable= One node very close node is already marked as emergency=fire_hydrant (and it has an issue of its own, so it can be seen in Osmose directly), but there is still an issue generated by the merge analyzer very close to it.

frodrigo commented 4 years ago

The join is made on the ref, and it is required.

See item 8091 for merge http://osmose.openstreetmap.fr/fr/map/#item=8091&useDevItem=all&zoom=18&lat=46.427493&lon=4.661435&level=1%2C2%2C3&tags=&fixable=

wetneb commented 4 years ago

Ok, so I really should do a first pass of conflation in JOSM with conservative settings to import all hydrants which closely match existing OSM nodes, I guess.

matthieu-martin commented 1 year ago

Hello,

I have tried to integrate fire hydrants with SDIS 21 data on Osmose but I think that the join is not with the right data field. I have surveyed some fire hydrants around the department of Côte-d'Or (21) and the physical ref= written on them is not in Osmose the tag ref= but in the tag ref:FR:SDIS21=* after the "Code Commune INSEE".

Exemple: OSM https://www.openstreetmap.org/node/8500980555 colour=red emergency=fire_hydrant fire_hydrant:position=street fire_hydrant:type=pillar ref=312 water_source=main

Osmose emergency = fire_hydrant fire_hydrant:diameter = 100 firehydrant:type = pillar ref = 3184 ref:FR:SDIS21 = 212310312 source = Service départemental d'incendie et de secours 21 - 2022-03

Thanks for all :) Matthieu

frodrigo commented 1 year ago

Looking at https://taginfo.openstreetmap.fr/tags/emergency=fire_hydrant#combinations there is various usage. Is more a question for the French community.

matthieu-martin commented 1 year ago

On the french wiki it is stated that it's the field reference in the ref=* tag : "Référence visible sur le terrain". https://wiki.openstreetmap.org/wiki/FR:Tag:emergency%3Dfire_hydrant

Attribut OSM Table Afigéo Attribut Afigéo Commentaire
ref=* hydrants ref_terr Référence visible sur le terrain

I will post on the french forum if a confirmation is needed.

matthieu-martin commented 1 year ago

Or the issue is from the Afigeo file and "ref_terr" for the SDIS21, I will check.

matthieu-martin commented 1 year ago

I have checked, I think it is from the data source. I will send an email to the SDIS 21.