Scripts to merge local electoral districts in Mexico
✓ Published0🌍 Public
GGeoWill
Last edited Apr 19, 2018
Created on Apr 19, 2018
This example shows a shell script that merges 32 individual shapefiles of Mexico’s local electoral districts into a single national layer. The script uses GDAL’s `ogr2ogr` command-line utility, with two variants: one that reprojects each source file to EPSG:4326 (WGS84) during the merge, and another that preserves the original projection. It reads the shapefiles directly from zipped remote archives via the `/vsizip//vsicurl/` virtual file system, downloading each state’s `DISTRITO_LOCAL.shp` from the IFE cartography server. The first execution creates the output file, while subsequent iterations append data to it, building the combined dataset.
AI-generated description