Polygon.GetArea Calculation

Hello,
I have 2 questions about the Ploygon.GetArea method.

  1. How is GetArea calculated, please add as much detail as possible?
  2. What are the units returned?

Thanks, Zack

@zgreenberg GetArea method can have different behavior depend on type. Please check API Reference for different types of Geometry Enum GeometryType | Aspose.GIS for .NET API Reference Could you please provide more information about polygon which area you need to calculate.

Units are used which were used to set polygon.

Good day.
In order to get a correct result of the area of geometry it is necessary to transform the geometry into a coordinate system that is used metre as a unit of measurement, these are commonly projections of the earth specially designed for limited areas of the earth to avoid inaccuracies.
For example, for central Europe it is ED 1950 Albers Europe ED 1950 Albers Europe - ESRI:102013
Here’s an example

var geom = Geometry.FromText("POLYGON ((29.9524301 52.335366, 29.9524287 52.3352916, 29.9525793 52.3352902, 29.9525779 52.3353652, 29.9524301 52.335366))",
                SpatialReferenceSystem.Wgs84);
var AlbersEurope = SpatialReferenceSystem.CreateFromEpsg(102013);
var transformation = SpatialReferenceSystem.Wgs84.CreateTransformationTo(AlbersEurope);
var transformed = transformation.Transform(geom);
var area = transformed.GetArea();

And the answer will be returned in those units of measurement that are accepted for the current spatial coordinate system

Dear customer,

thank you for sharing the detailed example. You are correct – Geometry.GetArea() returns the area expressed in the square units of the geometry’s current spatial reference system. When the geometry is defined in a geographic CRS (e.g., WGS‑84, which uses degrees), the numeric value does not represent a meaningful surface area. Therefore the usual practice is:

  1. Transform the geometry to a projected CRS that uses metres (or another linear unit) – as you did with the Albers Europe projection.
  2. Call GetArea() on the transformed geometry. The returned value will be in square metres (or square feet, etc., depending on the projection’s linear unit).

If you need the result in a specific unit, Aspose.GIS also provides an overload:

double areaInSquareKilometers = transformed.GetArea(AreaUnit.SquareKilometers);

A few practical notes:

  • The code you posted uses SpatialReferenceSystem.CreateFromEpsg(102013). The identifier 102013 is an ESRI code; the equivalent EPSG code is 3035 (ETRS89 / LAEA Europe), which is widely supported. You can use either, but be sure the library recognises the code you pass.
  • For other regions choose a projection that minimizes distortion for the area of interest (e.g., UTM zones, national Lambert Conformal Conic, etc.).
  • After transformation, you can verify the CRS of the resulting geometry with transformed.SpatialReferenceSystem to ensure the linear unit is indeed metres.

If you encounter any unexpected values or need assistance selecting an appropriate projection for a specific region, please let us know and we’ll be happy to help.