The shapefiles are encoded as codepage 1252 and were reprojected to WGS84. All data corresponds to the 2010 census.
The shapefiles are encoded as codepage 1252 and were reprojected to WGS84. All data corresponds to the 2010 census.
Now for the ugly bits: You’ll need a recent version of innoextract, one that can work with files created by version 5.5 of Inno Setup (yes, the INEGI distributes shapefiles as windows installers), the one in Ubuntu universe is not recent enough. The version available from this repository should work.
1 2 3 4 | sudo add-apt-repository ppa:arx/release
sudo apt-get update
sudo apt-get install innoextract
chmod +x download-census-shp.sh
|
As of now, this script has not been tested on Windows and Mac systems, only on Ubuntu. This script has been tested on Ubuntu, on a Mac you should try and use ‘brew install wget’ and ‘brew install rename’ before running it, and on Windows use cygwin.
The script will create a directory called shps
where all the shapefiles are located, if something goes wrong when downloading be sure to delete it and try again. Once you finish running the script you’ll end up with about 5.5 gigabytes of shapefiles containing all available levels of geographical granularity for the 2010 Mexican census.
Census Geographies:
States -> Municipios (Counties) -> Localidades (Polygon if urban otherwise point) -> AGEB (Census Areas - Urban only) -> Manzana (Census Blocks - Urban only)
Plus, you’ll also get a bunch of shapefiles of parks, rivers, schools, etc.
Municipios (Counties)
Localidades (Urban Polygons and Rural Points)
AGEB (Census Areas)
Manzanas (Blocks)
Ejes viales (Streets)
Servicios A (polygons and lines)
Camellón, Metro Station, Hospitals, Parks, Schools, etc
Servicios L (polygons and points)
Bridges, Railways, Tren Metropolitano, Lindero, etc
Servicios P (points)
Churches, Schools, Hospitals, etc
Here’s the script you need to run to download the shapefiles:
P.S. You can contact the INEGI and tell them what you think of the way they distribute data.
P.P.S. If you need shapefiles of elevation curves, archeological sites, rivers, etc, try this other script
Update: You can also use a docker image to run the script without having to install anything
1 2 3 4 5 6 | docker pull diegovalle/scince2010-docker
# shared directory to store the output
mkdir /tmp/scince2010
# run ./download.sh within the container and the files should be ready
# in /tmp/since2010
docker run -v /tmp/scince2010:/shapefiles/shps -i -t diegovalle/scince2010-docker
|