Skip to main content
100%

Spherical extent

✓ Published0🌍 Public
PPhilippe Rivière
Last edited Mar 3, 2017
Created on Mar 2, 2017

This example demonstrates a spherical Voronoi diagram, computed from 200 random points, projected through a Mercator projection for clipping and an orthographic projection for display. The clipping process ensures features remain in spherical coordinates while the visual extent reflects a paper-like boundary, using `d3.geoProject` with custom `d3.geoTransform` and `d3.geoIdentity` configured with `clipExtent`. Sites are rendered unclipped, while those outside the clipping region are marked in olive, using `d3.geoPath` for rendering.

AI-generated description

Computing the extent for a spherical Voronoi diagram.

The pain point here was that we're filtering a GeoJSON object, and want the results to stay in spherical coordinates. However the clipping should reflect the way features will be printed on paper (or on screen), i.e. in the final projection (Mercator).

Next steps: make this a configurable function and one that preserves the features’ properties.

by Philippe Rivière.

forked from <a href='http://bl.ocks.org/Fil/'>Fil</a>'s block: <a href='http://bl.ocks.org/Fil/a9ba8d0d023752aa580bd95480b7de60'>geoVoronoi polygons()</a>

mit Licensed

Similar vizzes