Calculating areas
Areas are calculated using the geoPath.area(object) method, which returns a value in square pixels, or d3.geoArea(object), which returns a value in square radians (steradians), that can be used to obtain the actual area in square kilometers or square miles. They each take a GeoJSON object.
Areas in square pixels and steradians should be proportional in an equal-area projection of the globe. Conformal projections, like Mercator, distort area in order to preserve shapes. In a Mercator projection, Greenland appears with a projected area superior to South America, but in reality it is smaller than the Democratic Republic of the Congo, which is 15 times smaller in the same projection, as illustrated below. With an equal-area ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access