GeodesicPolygonAreaSqMeters
Page properties, Measurement and Geospatial
Description
Measures the smaller area enclosed by a polygon with WGS 84 geodesic edges
Syntax
Delphi
Function TPDFlib.GeodesicPolygonAreaSqMeters(Const Latitudes, Longitudes: Array Of Double): Double;
DLL
int DLGeodesicPolygonAreaSqMeters(int InstanceID, PDouble Latitudes, PDouble Longitudes, int Count, PDouble Area);
The export is available in the Windows DLL, the macOS Dylib and the Linux shared library
ActiveX
Function PDFlib::GeodesicPolygonAreaSqMeters(Latitudes As Variant, Longitudes As Variant) As Double
Available on IPDFlibrary22. Delphi clients using the generated type-library unit can obtain it with CoPDFlibrary.CreateEditionTools22
Supply matching one-dimensional arrays of Double or Variant arrays containing values convertible to Double. Include at least three vertices. Arrays may have nonzero lower bounds. The result is the area directly, or zero for invalid input, unmeasurable edges or a degenerate polygon
Parameters
| Latitudes | One latitude per vertex, from −90 to 90 degrees |
|---|---|
| Longitudes | One longitude per vertex, from −180 to 180 degrees |
| Count | Number of elements in each DLL input array. Supply at least three vertices |
| Area | Receives the result in square metres through the DLL function |
Return values
Pascal and ActiveX return the area in square metres or zero if the polygon is degenerate or cannot be measured. The DLL function returns 1 when the computation completes, even for zero area. Invalid input or an unsupported edge returns 0 and sets a writable area result to zero
Remarks
The polygon closes automatically, and vertex order does not change the magnitude. It may cross the antimeridian or surround a pole. Use a simple boundary. Antipodal edges or edges for which the inverse solution does not converge are rejected. No document is required
See also
PagePointToLatLon · LatLonToPagePoint · GeodesicDistanceMeters · PageGeoViewportDistanceMeters