Simplifying and cleaning Shapefiles.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
us.coordinates = us.coordinates.map(function(polygon) { | |
return polygon.map(function(lineString) { | |
return lineString.map(function(point) { | |
return point.map(function(coordinate) { | |
return d3.round(coordinate, 2); | |
}); | |
}); | |
}) | |
}); | |
d3.select("body").text(JSON.stringify(us)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment