osm-fr / osmose-backend

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

Support polygon primitive for opendata conflation #2387

Open flacombe opened 1 week ago

flacombe commented 1 week ago

Dear maintainers,

Currently Osmose only supports points and lines as data primitive coming from open data sources, to be conflated with OpenStreetMap data.

However in the past, some needs raised to process open data polygons, like in #511.

Thus it would be great to add support for such polygons, to be checked against OSM nodes or areas (#511 would require support of open data against OSM nodes for instance). I'm not sure if open data polygons against OSM lines would be relevant.

Best regards

Famlam commented 1 week ago

Just to be sure, isn't this what you're referring to? https://github.com/osm-fr/osmose-backend/blob/master/analysers/analyser_merge_forest_compartment_FR.py#L48

flacombe commented 1 week ago

Not really, you are pointing to the OSM primitive side of the conflation.

This analyzer is a good example, here: https://github.com/osm-fr/osmose-backend/blob/master/analysers/analyser_merge_forest_compartment_FR.py#L45C28-L45C46 we are using ST_Pointonsurface to convert polygons from opendata into points since Osmose only supports points and ways.

The goal is to support polygons from opendata and conflate them to OSM polygons just like we are doing on ways.