Code Monkey home page Code Monkey logo

Comments (1)

ThomasG77 avatar ThomasG77 commented on August 23, 2024

La source pour les contours géographiques est http://etalab-datasets.geo.data.gouv.fr/contours-administratifs/2023/geojson/
Elle est générée depuis https://github.com/etalab/contours-administratifs. Nous calculons le centroïde en utilisant Turf.js dans l'API Géo mais nous ne mettons pas cette version des fichiers. L'API Géo permet maintenant de retourner les mairies et ces données sont disponibles via http://etalab-datasets.geo.data.gouv.fr/contours-administratifs/2023/geojson/mairies.geojson.

Si vous tenez vraiment à avoir les centroïdes (en fait les "points dans les polygones" plutôt car un centroide selon la forme peut être en dehors de la surface) et que vous avez GDAL d'installé, cela se fait en une ligne via

ogr2ogr -f GeoJSON "communes-5m-centroid.geojson" /vsigzip//vsicurl/http://etalab-datasets.geo.data.gouv.fr/contours-administratifs/2023/geojson/communes-5m.geojson.gz -dialect SQLite -sql 'SELECT code, nom, departement, region, epci, plm, commune, PointOnSurface(geometry) AS geometry FROM "communes-5m.geojson"' -lco RFC7946=YES -lco WRITE_NAME=NO

Merci de réouvrir si notr réponse ne vous parait pas pertinente

from decoupage-administratif.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.