Packagecom.esri.ags.utils
Classpublic class GeometryUtil
InheritanceGeometryUtil Inheritance Object

Since : ArcGIS API for Flex 2.3

The GeometryUtil utility class is an all-static class with methods for working with geometries.



Public Methods
 MethodDefined By
  
geodesicAreas(polygons:Array, areaUnit:String):Array
[static] Gets the area array of the input polygon array with the specified area unit.
GeometryUtil
  
geodesicDensify(geometry:Geometry, maxSegmentLength:Number = 10000):Geometry
[static] Returns a densified polyline or a polygon (depending on the input geometry).
GeometryUtil
  
geodesicLengths(polylines:Array, lengthUnit:String):Array
[static] Gets the length array of the input polyline array with the specified length unit.
GeometryUtil
  
normalizeCentralMeridian(geometries:Array, geometryService:GeometryService, responder:IResponder):void
[static] Normalizes geometries that intersect the central meridian or fall outside the valid world extent so they stay within the current coordinate system.
GeometryUtil
  
[static] Returns true when the ring of the polygon intersect itself.
GeometryUtil
Method Detail
geodesicAreas()method
public static function geodesicAreas(polygons:Array, areaUnit:String):Array

Gets the area array of the input polygon array with the specified area unit. The input polygon must be in a geographic coordinate system. The area will be calculated using a custom cylindrical equal-area projection. Note that the polygons cannot be self-intersecting. The method polygonSelfIntersecting is provided to check the self-intersecting. If the polygons are self-intersecting, use the geometry service to simplify the polygon before calculating the area.

Parameters

polygons:Array — The input polygons whose areas are to be calculated.
 
areaUnit:String — The area unit for the returned areas.

Returns
Array — Array of areas corresponding to input Array.

See also

geodesicDensify()method 
public static function geodesicDensify(geometry:Geometry, maxSegmentLength:Number = 10000):Geometry

Returns a densified polyline or a polygon (depending on the input geometry). The input polyline or polygon must be in a geographic coordinate system.

Parameters

geometry:Geometry — The polyline or polygon to densify.
 
maxSegmentLength:Number (default = 10000) — Maximum segment length for the densified geometry, as specified in meters.

Returns
Geometry — A geodesic densified polyline or polygon.

See also

geodesicLengths()method 
public static function geodesicLengths(polylines:Array, lengthUnit:String):Array

Gets the length array of the input polyline array with the specified length unit. The input polyline must be in a geographic coordinate system. The length will be calculated using a custom cylindrical equal-area projection.

Parameters

polylines:Array — The input polylines whose lengths are to be calculated.
 
lengthUnit:String — The length unit for the returned lengths.

Returns
Array — Array of lengths corresponding to input Array.

See also

normalizeCentralMeridian()method 
public static function normalizeCentralMeridian(geometries:Array, geometryService:GeometryService, responder:IResponder):void

Normalizes geometries that intersect the central meridian or fall outside the valid world extent so they stay within the current coordinate system. Only supported for Web Mercator and geographic coordinates.

Parameters

geometries:Array — The input geometries to be normalized.
 
geometryService:GeometryService — The geometry service instance to use.
 
responder:IResponder — The responder to call on result or fault.

polygonSelfIntersecting()method 
public static function polygonSelfIntersecting(polygon:Polygon):Boolean

Returns true when the ring of the polygon intersect itself. When true, consider simplifying the polygon to make sure it becomes topologically consistent. This can be done using the simplify method of the GeometryService.

Parameters

polygon:Polygon — The polygon to be tested for self-intersection.

Returns
Boolean — Returns true if the ring of the polygon intersects itself; false otherwise.

See also