Subject: [geometry] Units of area (with strategy)
From: Fernando Pelliccioni (fpelliccioni_at_[hidden])
Date: 2014-04-07 09:28:16
I run the "area (with strategy)" example shown on
I'm interested in getting the geodetic area (the second one of the code
namespace bg = boost::geometry;
// Calculate the area of a spherical polygon (for latitude: 0 at
bg::cs::spherical_equatorial<bg::degree> > > sph_poly;
bg::read_wkt("POLYGON((0 0,0 45,45 0,0 0))", sph_poly);
double area = bg::area(sph_poly);
std::cout << "Area: " << area << std::endl;
The code above prints out:
In this case, what is the unit of the area?
The documentation states that:
Returns the area on a unit sphere (or another sphere, if specified as such
in the constructor of the strategy)
Sorry, but my knowledge of geography is limited.
How can I transform that number to square kilometers, square miles, ...?
Thank you very much.
Geometry list run by mateusz at loskot.net