Custom Cartesian Projection
✓ Published0🌍 Public
Mmbostock
Last edited Oct 27, 2016
Created on Aug 13, 2013
This example displays a set of land parcel polygons from a GeoJSON file, drawn as light gray shapes with black outlines on an SVG canvas. It creates a custom Cartesian projection by implementing a `d3.geoTransform` that maps raw coordinates through two `d3.scaleLinear` scales for the x and y axes. The resulting transform feeds into a `d3.geoPath` generator, which renders the geographic features using the projected coordinates, bypassing standard geographic projections.
AI-generated descriptionThis example demonstrates how to create a custom Cartesian projection by implementing a geometry transform on top of two linear scales; the geometry transform is then used in lieu of a geographic projection, which are intended for displaying spherical geometry.
gpl-3.0 Licensed