A D3 module for clipping and geometric operations on spherical polygons, enabling custom map projections.
d3-geo-polygon is a JavaScript library for clipping and performing geometric operations on spherical polygons within the D3 ecosystem. It enables the creation of custom map projections that require precise spherical clipping, such as polyhedral, interrupted, and complex logarithmic projections. The module provides essential tools for advanced cartographic visualizations where standard projections are insufficient.
Data visualization developers and cartographers working with D3 who need to implement custom or specialized map projections requiring spherical polygon clipping. It's particularly useful for those creating educational, scientific, or artistic geographic visualizations.
Developers choose d3-geo-polygon because it provides mathematically rigorous spherical clipping operations that are essential for implementing complex map projections within D3. It offers unique projections not available in standard libraries and gives fine-grained control over clipping behavior for both aesthetic and functional requirements.
Clipping and geometric operations for spherical polygons.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a dozen specialized projections like Airocean and Imago, each with configurable parameters such as imago.k() for angular distortion, as detailed in the README examples.
geoClipPolygon allows clipping with arbitrary GeoJSON polygons, enabling custom interrupted and polyhedral projections with fine-grained control via clipPoint for edge cases.
Includes geoIntersectArc for accurate spherical arc intersections, essential for complex cartographic computations and referenced in external ObservableHQ examples.
Extends the D3 ecosystem, superseding projections from d3-geo-projection with improved clipping, and supports modern ES modules and legacy UMD bundles as per installation guides.
The README explicitly notes that re-clipped projections like geoInterruptedHomolosine are not supported in the legacy UMD bundle, limiting compatibility with older environments.
APIs such as geoPolyhedralVoronoi require intricate setup with tree structures and polygons, demanding deep cartographic knowledge and increasing development time.
Focused solely on advanced spherical geometry, it offers little value for common mapping tasks, resulting in a smaller community and fewer resources for support.