Skip to main content
100%

Simple shell script to merge shapefiles from INE

✓ Published0🌍 Public
GGeoWill
Last edited May 8, 2018
Created on Apr 18, 2018

This example shows a shell script that downloads, reprojects, and merges Mexican electoral geography shapefiles from the INE’s distritación 2017 federal collection into a single output file. It processes layers such as `SECCION`, `ENTIDAD`, and `DISTRITO` for all 32 states, using `ogr2ogr` from GDAL to reproject each source into EPSG:4326 and append the features. The script handles a structural anomaly for file number 06 by adjusting the source path, and it relies on `/vsizip//vsicurl/` for remote zip access. The merged result is saved as a new shapefile named with the layer and `-wgs84` suffix.

AI-generated description

Similar vizzes