Skip to content

Instantly share code, notes, and snippets.

@almccon
Last active November 4, 2016 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save almccon/0af7228853c736f467cae8a9b906b008 to your computer and use it in GitHub Desktop.
Save almccon/0af7228853c736f467cae8a9b906b008 to your computer and use it in GitHub Desktop.
Generalizing with MapShaper
license: mit

No code here, just a gif showing MapShaper.

Step 1: Upload a GeoJSON to MapShaper. Try this one.

Step 2: Experiment with the different simplification algorithms, use the slider to choose how simplified you want your shapes, and watch for the number of line intersections that occur.

Step 3: Export your file as a topojson.

<!DOCTYPE html>
<head>
<meta charset="utf-8">
<script src="https://d3js.org/d3.v4.min.js"></script>
<style>
body { margin:0;position:fixed;top:0;right:0;bottom:0;left:0; }
</style>
</head>
<body>
<img src="https://raw.githubusercontent.com/stamen/dwsd/master/img/mapshaper%20uk.gif">
</body>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment