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.
Assume every Shapefile is corrupt and your life will be much easier. I’m going to move to KML personally.
KML is my new SHP— James Fee (@jamesmfee) December 7, 2012
Or as a very wise man puts it:
@cageyjames ogr2ogr this is the opposite of photocopy degradation ;)— Nathaniel V. KELSO (@kelsosCorner) December 7, 2012