GeoJSON Geometry Simplifier

Simplify complex GeoJSON geometries with Visvalingam-Whyatt to reduce size

Simplify GeoJSON polygons and lines in your browser using the Visvalingam-Whyatt algorithm. Reduce vertex count and file size while keeping shape, with before and after counts. Runs locally — your GeoJSON is never uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is the Visvalingam-Whyatt algorithm?

Visvalingam-Whyatt simplifies a line or polygon by repeatedly removing the point whose effective area — the area of the triangle it forms with its two neighbours — is smallest. Points that barely change the shape go first, so the overall form is preserved as the count drops.

The GeoJSON Geometry Simplifier reduces the number of vertices in polygons and lines so that maps render faster and files transfer smaller, while keeping the geometry recognisable. It uses the Visvalingam-Whyatt algorithm, which is well suited to cartographic simplification because it preserves the visual character of a shape better than distance-based methods. Everything runs in the browser, so even large or sensitive datasets stay local.

Why simplification matters

A county boundary from an official dataset might contain tens of thousands of coordinate pairs, capturing every road corner and property boundary. For a zoomed-in cadastral map that level of detail is essential, but for a national overview map rendered at 800 px wide it adds tens of kilobytes of data that draws more slowly, transfers more expensively, and still looks identical to the eye once the excess detail is smaller than a pixel. Simplification is the process of removing vertices that do not contribute visibly at the target zoom level.

The difference in file size can be substantial. A detailed polygon for a US state from a high-resolution source can be several hundred kilobytes. The same boundary simplified for a national map overview can be 5–20 KB. For a FeatureCollection with dozens of features, this can mean the difference between a map that loads in under a second and one that takes several seconds on a mobile connection.

How it works

Visvalingam-Whyatt assigns every interior point an effective area: the area of the triangle formed by that point and its two immediate neighbours. A point with a tiny triangle barely affects the shape, so it is the safest to remove.

The algorithm works iteratively. It finds the live point with the smallest effective area, removes it, relinks its neighbours, and recomputes the effective areas of those two neighbours (because their triangles changed). It repeats until the geometry has been reduced to the target number of points you chose with the slider. Endpoints of an open line, and enough points to keep a closed ring valid, are always retained.

The tool walks the GeoJSON structure recursively, applying this to every LineString, MultiLineString, Polygon and MultiPolygon it finds, whether they sit in a single Feature or a whole FeatureCollection. It then reports the total vertex count before and after, plus the change in byte size.

Visvalingam-Whyatt vs Douglas-Peucker

Both algorithms are widely used for cartographic simplification, but they make different trade-offs. Douglas-Peucker works by measuring perpendicular distance from a chord connecting two endpoints; any point within the tolerance band is discarded. This can leave isolated spiky points where the geometry changes direction abruptly, because the algorithm is global in how it evaluates segments.

Visvalingam-Whyatt instead ranks points by the area of the triangle they form with their immediate neighbours, so it naturally preserves the overall shape of curves and bends while removing the least significant points first. At aggressive simplification levels — keeping 10–20% of vertices — it tends to produce smoother, more visually faithful results, particularly for coastlines, rivers, and administrative boundaries.

Practical guidance for choosing a simplification level

The right level depends on the zoom at which the geometry will be displayed:

  • Zoomed-out overview maps (national or continental scale): keeping 5–15% of vertices typically produces clean boundaries with strong reduction in file size.
  • Regional maps (state or province level): 20–40% of vertices retains enough local shape to be recognisable at typical zoom levels.
  • Detailed local maps (city or neighbourhood): 50–80% or no simplification at all, since the geometry will be rendered at a scale where excess vertices are visible.
  • Web map tile generation: simplify per tile zoom level, keeping more vertices for higher zoom tiles.

Starting at 30% is a good first pass for most web map use cases — inspect the before/after counts and byte sizes, then adjust.

What the tool preserves

  • Polygon rings are always kept at four or more points so they remain closed and valid GeoJSON.
  • Line endpoints are never removed.
  • Point and MultiPoint geometries have nothing to simplify and are passed through unchanged.
  • Feature properties are preserved exactly — only the coordinate arrays change.

Everything runs locally in your browser — your GeoJSON is never uploaded.