c2corg / c2c_ui

User interface for https://www.camptocamp.org
https://www.camptocamp.org
GNU Affero General Public License v3.0
26 stars 32 forks source link

Feature: add digitizetheplanet to the protected areas #3789

Open AntoineMarnat opened 10 months ago

AntoineMarnat commented 10 months ago

See https://content.digitizetheplanet.org/fr/rules/api/

florentcadot commented 9 months ago

If I understand correctly: We should loop to perform GET /api/protectedarea/ incrementing the page query param until we get all the protected area from their API and perform individual GET /api/protectedarea/{id} call to get the geometry for each area.

I've just registered as an API user on digitize the planet, they don't seem to gave me an API Token, maybe I have to wait a bit or ask for it ? Not blocking for the moment as I can perform API call without it but I guess I'll be blocked because of rate limiting at one point.

One question: How to be sure an area does not already exist ? A simple Regex on field 'title' from the local entity would be enough ? Or maybe checking if one geometry doesn't already exist ?

brunobesson commented 8 months ago

@AntoineMarnat ?

AntoineMUPEC commented 8 months ago

I do not know how to best handle possible doubles. Probably checking similar geometries is the best way.

I do not know if the board made direct contact with digitizetheplanet.