Generation GeoJSON des mairies avec code INSEE
✓ Published0🌍 Public
TThomasG77
Last edited Jul 21, 2022
Created on Jul 21, 2022
This example generates a GeoJSON file of French town halls (mairies) with their INSEE commune codes, distinguishing principal towns from associated communes. It uses `ogr2ogr` with an SQLite dialect to join commune boundaries with their chief-town points from the IGN ADMIN-EXPRESS dataset, applying `PointOnSurface` as a fallback when no official point exists. The resulting output is written with RFC 7946 compliance for modern web mapping. The script downloads a 7z archive and extracts the necessary shapefiles before performing the spatial join.
AI-generated description