import * as geodeticAreaOperator from "@arcgis/core/geometry/operators/geodeticAreaOperator.js";
const geodeticAreaOperator = await $arcgis.import("@arcgis/core/geometry/operators/geodeticAreaOperator.js");
@arcgis/core/geometry/operators/geodeticAreaOperator
Returns the geodetic area of a 2D geometry.
Notes
- Verify that
isLoaded()returnstruebefore using this module. - Use
load()to load this module's dependencies.
Property Overview
| Name | Type | Summary | Object |
|---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | geodeticAreaOperator |
Property Details
-
Indicates if the operator supports input geometries that contain curves. The value is
nullorundefineduntil the operator is loaded, then it will always betrue.
Method Overview
| Name | Return Type | Summary | Object |
|---|---|---|---|
Calculates the geodetic area of the input Geometry. | geodeticAreaOperator | ||
Indicates if all dependencies of this module have been loaded. | geodeticAreaOperator | ||
Promise | Loads this module's dependencies. | geodeticAreaOperator |
Method Details
-
execute
Methodexecute(geometry, options){Number} -
Calculates the geodetic area of the input Geometry. Unless the
unitoption is set, the default is square-meters.ParametersSpecificationgeometry GeometryUnionThe input geometry.
options ObjectoptionalAdditional options.
SpecificationReturnsType Description Number Returns the geodetic area of the input geometry. Exampleif (!geodeticAreaOperator.isLoaded()) { await geodeticAreaOperator.load(); } // Calculate the geodetic area of a polygon. const area = geodeticAreaOperator.execute(polygon);
-
Loads this module's dependencies. This method must be called first if
isLoadedreturnsfalse.ReturnsType Description Promise Resolves when the dependencies have been loaded. - See also