@@ -13,4 +13,9 @@ For our example here, we'll download US States. (It also includes "state equival
...
@@ -13,4 +13,9 @@ For our example here, we'll download US States. (It also includes "state equival
FYI, [TIGER/Line](https://en.wikipedia.org/wiki/Topologically_Integrated_Geographic_Encoding_and_Referencing) is what the Census Bureau calls their data model. [Shapefile](https://en.wikipedia.org/wiki/Shapefile) is a file format.
FYI, [TIGER/Line](https://en.wikipedia.org/wiki/Topologically_Integrated_Geographic_Encoding_and_Referencing) is what the Census Bureau calls their data model. [Shapefile](https://en.wikipedia.org/wiki/Shapefile) is a file format.
### Step 2. Topology-aware simplification
### Step 2. Topology-aware simplification with MapShaper
\ No newline at end of file
You might have noticed the file you downloaded — which is a ZIP archive containing several files (And yes, all of them are part of the "Shapefile"; no, you can't delete everything except the .shp.) — is about 10 MB in size. If you were get ahead of our process and convert it to GeoJSON now, you'd end up with about 6.5 MB gzipped. Ooof.
Obviously, our little web map doesn't need to be quite this precise enough to see every little bend in every river that forms a state border. Fortunately, just about every GIS tool out there has tools to shrink file sizes by dramatically simplifying shapes. A good and widely available algorithm is Visvalingam’s Algorithm, for which you can find a very nice, visual explanation [here](https://bost.ocks.org/mike/simplify/).
*Un*fortunately, most of those tools are not topology-aware: they're going to process, for example, the Georgia-Alabama border once for the Georgia shape and once for the Alabama shape, possibly making slightly different decisions for each, leading to small gaps or overlaps. This is where [MapShaper](https://mapshaper.org) comes in.