require(["esri/geometry/geodesicUtils"], function(geodesicUtils) { /* code goes here */ });
Description
(Added at v3.8)
Utility methods for various geodesic calculations.
When coding legacy (non-AMD) style, there is no need to require the module. All methods and properties are available in the namespace. For example,
esri.geometry.geodesicAreas()
.
Samples
Search for
samples that use this class.
Methods
Method Details
Determine the area for the input polygons. The input polygons must be in a geographic coordinate system.
Parameters:
<Polygon[] > polygons |
Required |
An array of polygons. |
<String > areaUnit |
Required |
The area unit. See Units for a list of valid values. |
Sample:
require([
"esri/geometry/geodesicUtils", "esri/units", ...
], function(geodesicUtils, Units, ... ) {
var areas = geodesicUtils.geodesicAreas([inputGeometry], esri.Units.ACRES);
...
});
Returns a densified geometry.
Parameters:
<Geometry > geometry |
Required |
A polyline or polygon to densify. |
<Number > maxSegmentLength |
Required |
The maximum segment length in meters. |
Sample:
require([
"esri/geometry/geodesicUtils", ...
], function(geodesicUtils, ... ) {
var clientDensifiedGeometry = new geodesicUtils.geodesicDensify(geometry, 10000);
...
});
Determine the length for the input polylines using the specified length unit. The input polylines must be in a geographic coordinate system.
Parameters:
<Polyline[] > polylines |
Required |
An array of polylines. |
<String > lengthUnit |
Required |
The length unit. See Units for a list of valid values. |
Sample:
require([
"esri/geometry/geodesicUtils", "esri/units", ...
], function(geodesicUtils, Units, ... ) {
var lengths = geodesicUtils.geodesicLengths([polyline], Units.KILOMETERS);
...
});