Many organizations use ArcGIS, from ESRI, as the main geospatial analysis tool. This post is about how quickly you can turn your machine equipped with PostGIS and GDAL into a geodata crunching monster.
For those on MacOS X, consider using homebrew to install the following
CREATE EXTENSION postgisusing the psql command line promt.
ogr2ogr -f "PostgreSQL" PG:"dbname=chibuildings" ~/Downloads/Building_Footprints/buildings.shp -skipfailures -append. This will load all the buildings into a table called buildings, while appending to the existing rows, along with ignoring all failures.
SELECT bldg_condi,COUNT(*) as `NUM` FROM buildings GROUP BY bldg_condi;
This command selects the building condition for each building, ads it to the count, and then groups by condition. The output should look something like this.
bldg_condi | num --------------------+-------- | 376763 SOUND | 379195 NEEDS MINOR REPAIR | 73137 UNINHABITABLE | 1152 UNNHABITABLE | 5 NEEDS MAJOR REPAIR | 10639 (6 rows)
This shows you how with fewer than 3 commands, you can compute interesting statistics about geographies. Furthermore, you now have access to the entire Chicago buildings database, making it easy to compute things like total building square footage, for example.