ogr2ogr every Shapefile

Earlier this week I was working on a map in TileMill and ran into an issue with a layer. At the time I couldn’t figure out which layer but Dane was good enough to help track it down. It ended up being an issue with the shapefile spec being vague and the Natural Earth shapefile being problematic. Mapnik and thus TileMill were not at fault, but the shapefile itself.

Shapefiles are used because they basically are the interchange file for GIS information. Others have tried with SpatiaLite and File Geodatabases, but neither has been accepted at large by the community. After spending half a day debugging my Carto for no reason, I’ve come to the conclusion that you must run ogr2ogr on every shapefile you share and every shapefile you consume.

Freaking Sweet

https://gist.github.com/cageyjames/4236796.js

Assume every Shapefile is corrupt and your life will be much easier. I’m going to move to KML personally.

//platform.twitter.com/widgets.js

Or as a very wise man puts it:

//platform.twitter.com/widgets.js

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s