Skip to main content
100%

Simplify GeoJSON using d3-plugins/simplify (thanks @jasondavies for preserving topology!)

✓ Published0🌍 Public
RRandomEtc
Last edited Oct 26, 2012
Created on Oct 26, 2012

This example demonstrates how to simplify complex GeoJSON geometry while preserving topological relationships, using the `d3.simplify` API from the d3-plugins/simplify package. It shows a command-line conversion workflow that reads a GeoJSON input file, applies a simplification algorithm with zero area tolerance and topology-aware processing, and writes the simplified output to a new file. The implementation uses Node.js file I/O with `fs`, JSON parsing, and a custom projection function that passes coordinates through unchanged, making it a practical tool for reducing map data size without breaking shared boundaries.

AI-generated description

Similar vizzes