Five Fast and Replicable Spatial Tasks with PostGIS

There is a crisis of replicability in scientific results that involve spatial data because important calculations are often carried out by hand in proprietary software. Without code to serve as a paper trail, important steps in the analysis become difficult to check for errors, alter for testing , or even to really document adequately. Performing [...]

Spatial Hexagon Binning in POSTGIS

Hexagon binning is an important tool for visualizing spatial relationships but it’s a pain to implement. Current solutions involve partial implementations for PostGIS and work arounds based on generating hexagons in QGIS with the MMQGIS plugin. In this brief post, I provide a SQL function for quickly generating hexagon polygon layers in PostGIS of any [...]

Making GIS products for Historical Periods

Developing GIS products for older historical periods can be tricky. The further back in time you go, the less comprehensive the map coverage, the less accurate the surveying, and the more obscure the projections. In a project with Kristen Harkness and others, we are recovering and mapping events during an insurgency that took place 60 [...]

Quick Land Cover Estimates from Satellite Imagery and OpenStreetMap

Land cover (land use) estimates assign points or regions on the earth’s surface to classes like forested, farmland, urban development, etc. There are hundreds of land cover data sets and methods covering different regions, time periods, and special topics. In a paper under review, my coauthors and I test methods of estimating population density at [...]

Top 10 Finalist in the Telecom Italia Big Data Challenge for "(Dis)assembling Milan with Big Data"

Congratulations to my group at UCSD (David A. Meyer, Megha Ram, David Rideout and Dongjin Song) for being selected as a top 10 finalist out of 652 teams in the Telecom Italia Big Data Challenge 2014. Check out the UCSD press release describing the project. My corner of the project focuses on using cell phone, [...]

Fast Spatial Joins in Python with a Spatial Index

I often have to execute spatial joins between points and polygons, of say bombing events and the boundaries of the district they took place in. Quantum GIS uses ftools to execute these kinds of spatial joins, but failed on on a relatively modest join of 40k points and 9k boundaries. I could do the join [...]

Hand Vectorizing Political Boundaries from Complicated Maps

Anyone who has tried to vectorize a paper map has struggled with the fact that maps are not designed to be cleanly read by computers, they are designed to cram as much information as possible in the smallest space that the human eye can interpret. Using a freeware image tool called GIMP, I have [...]

Data from Historical Maps: Extracting Backgrounds

As I’ve written on here before, digitizing political maps is no easy task. One tough problem is digitizing background colors which identify things like land cover. Consider this section from a Vietnam War era military map of South Vietnam. There are three background regions, a dark green for forested area, a slightly lighter green for [...]

Converting Military Grid Reference System Coordinates (MGRS)

Converting MGRS coordinates isn’t directly supported by most GIS applications since it’s not part of the popular PROJ.4 Cartographic Projections Library.

You can convert MGRS one at a time or in batch with GeoTrans.

There’s mgrs specific python wrapper for Geotrans mgrs 1.1.0

Another alternative is GeographicLib which has standalone utilities for converting MGRS along [...]