Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Object: esri/geometry/geodesicUtils

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

NameReturn typeSummary
geodesicAreas(polygons, areaUnit)Number[]Determine the area for the input polygons.
geodesicDensify(geometry, maxSegmentLength)GeometryReturns a densified geometry.
geodesicLengths(polylines, lengthUnit)Number[]Determine the length for the input polylines using the specified length unit.
Method Details

geodesicAreas(polygons, areaUnit)

Determine the area for the input polygons. The input polygons must be in a geographic coordinate system.
Return type: Number[]
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);
  ...
});

geodesicDensify(geometry, maxSegmentLength)

Returns a densified geometry.
Return type: 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);
  ...
});

geodesicLengths(polylines, lengthUnit)

Determine the length for the input polylines using the specified length unit. The input polylines must be in a geographic coordinate system.
Return type: Number[]
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);
  ...
});
Show Modal