Skip to content

geometryEngine

const geometryEngine: object

Defined in: src/geometryEngine.ts:24

Spatial operations mirroring ArcGIS.GeometryEngine (Swift) / com.arcgismaps.geometry.GeometryEngine (Kotlin). Every call is synchronous and works on plain Geometry values (see GeometryCodec on the native side).

Planar operations (buffer, area, length, distance, …) assume a projected coordinate system; their geodesic* counterparts measure on the spheroid and take an optional unit + curve type.

area: (geometry) => number

Planar area (negative if the ring is clockwise).

Geometry

number

autoComplete: (existingPolygons, boundaries) => Geometry[]

Auto-completes polygons from existing polygon boundaries and new boundary polylines.

Geometry[]

Geometry[]

Geometry[]

boundary: (geometry) => Geometry | null

Boundary of the geometry (polygon → polyline, polyline → multipoint).

Geometry

Geometry | null

buffer: (geometry, distance) => Geometry | null

Planar buffer polygon at distance (in the geometry’s units).

Geometry

number

Geometry | null

clip: (geometry, envelope) => Geometry | null

Clips a geometry to an envelope.

Geometry

Geometry

Geometry | null

combineExtents: (a, b) => Geometry | null

Envelope that contains both geometries’ extents.

Geometry

Geometry

Geometry | null

contains: (a, b) => boolean

True if a contains b.

Geometry

Geometry

boolean

convexHull: (geometry) => Geometry | null

Smallest convex polygon that contains the geometry.

Geometry

Geometry | null

crosses: (a, b) => boolean

True if a crosses b.

Geometry

Geometry

boolean

cut: (geometry, cutter) => Geometry[]

Cuts a geometry with a polyline, returning the resulting parts.

Geometry

Geometry

Geometry[]

densify: (geometry, maxSegmentLength) => Geometry | null

Adds vertices so no segment is longer than maxSegmentLength.

Geometry

number

Geometry | null

difference: (a, b) => Geometry | null

Part of a that does not intersect b.

Geometry

Geometry

Geometry | null

disjoint: (a, b) => boolean

True if a and b are disjoint.

Geometry

Geometry

boolean

distance: (a, b) => number | null

Planar distance between two geometries.

Geometry

Geometry

number | null

ellipseGeodesic: (params) => Geometry | null

Constructs a geodesic ellipse as a polygon, polyline, or multipoint from the given params. Mirrors GeometryEngine.geodesicEllipse(parameters:) (Swift) / GeometryEngine.ellipseGeodesicOrNull(parameters) (Kotlin).

GeodesicEllipseParams

Geometry | null

equals: (a, b) => boolean

True if a and b are spatially equal.

Geometry

Geometry

boolean

extend: (polyline, extender) => Geometry | null

Extends a polyline to meet an extender polyline.

Geometry

Geometry

Geometry | null

generalize: (geometry, maxDeviation, removeDegenerateParts) => Geometry | null

Removes vertices within maxDeviation (Douglas–Peucker).

Geometry

number

boolean = false

Geometry | null

geodesicArea: (geometry, unit?, curveType?) => number

Geodesic area in unit (default squareMeters).

Geometry

AreaUnit

GeodeticCurveType

number

geodesicBuffer: (geometry, distance, unit?, curveType?, maxDeviation?) => Geometry | null

Geodesic buffer polygon at distance in unit (default meters).

Geometry

number

LinearUnit

GeodeticCurveType

number

Geometry | null

geodesicDistance: (a, b, unit?, curveType?) => GeodeticDistanceResult | null

Geodesic distance + azimuths between two points, in unit (default meters).

PointGeometry

PointGeometry

LinearUnit

GeodeticCurveType

GeodeticDistanceResult | null

geodesicLength: (geometry, unit?, curveType?) => number

Geodesic length in unit (default meters).

Geometry

LinearUnit

GeodeticCurveType

number

intersect: (a, b) => Geometry | null

Intersection (overlap) of two geometries.

Geometry

Geometry

Geometry | null

intersections: (a, b) => Geometry[]

All intersection geometries of two geometries (points, lines and/or polygons).

Geometry

Geometry

Geometry[]

intersects: (a, b) => boolean

True if a and b intersect.

Geometry

Geometry

boolean

isSimple: (geometry) => boolean

True if the geometry is topologically simple.

Geometry

boolean

labelPoint: (polygon) => Geometry | null

Interior point suitable for placing a label inside a polygon.

Geometry

Geometry | null

length: (geometry) => number

Planar length / perimeter.

Geometry

number

move: (geometry, deltaX, deltaY) => Geometry | null

Moves a geometry by (deltaX, deltaY).

Geometry

number

number

Geometry | null

nearestCoordinate: (geometry, point) => ProximityResult | null

Nearest point on the geometry to point.

Geometry

PointGeometry

ProximityResult | null

nearestVertex: (geometry, point) => ProximityResult | null

Nearest vertex of the geometry to point.

Geometry

PointGeometry

ProximityResult | null

normalizeCentralMeridian: (geometry) => Geometry | null

Normalizes a geometry that crosses the antimeridian back into the −180…180 range.

Geometry

Geometry | null

offset: (geometry, distance, offsetType?, bevelRatio, flattenError) => Geometry | null

Offsets a geometry by distance with the given join style.

Geometry

number

GeometryOffsetType

number = 0

number = 0

Geometry | null

overlaps: (a, b) => boolean

True if a and b overlap.

Geometry

Geometry

boolean

project: (geometry, spatialReference) => Geometry | null

Re-projects a geometry into another coordinate system (by WKID).

Geometry

number

Geometry | null

relate: (a, b, relation) => boolean

True if a and b satisfy the DE-9IM relation string.

Geometry

Geometry

string

boolean

reshape: (geometry, reshaper) => Geometry | null

Reshapes a polyline/polygon using a reshaper polyline.

Geometry

Geometry

Geometry | null

rotate: (geometry, angle, origin?) => Geometry | null

Rotates a geometry by angle degrees around origin (default: its centroid).

Geometry

number

PointGeometry

Geometry | null

scale: (geometry, factorX, factorY, origin?) => Geometry | null

Scales a geometry by (factorX, factorY) relative to origin (default: its centroid).

Geometry

number

number

PointGeometry

Geometry | null

sectorGeodesic: (params) => Geometry | null

Constructs a geodesic sector (pie slice) from the given params. Mirrors GeometryEngine.geodesicSector(parameters:) (Swift) / GeometryEngine.sectorGeodesicOrNull(parameters) (Kotlin).

GeodesicSectorParams

Geometry | null

simplify: (geometry) => Geometry | null

Returns a topologically simple, valid copy of the geometry.

Geometry

Geometry | null

symmetricDifference: (a, b) => Geometry | null

Parts of a and b that do not intersect each other.

Geometry

Geometry

Geometry | null

touches: (a, b) => boolean

True if a and b touch only at a boundary.

Geometry

Geometry

boolean

union: (geometries) => Geometry | null

Union of all input geometries.

Geometry[]

Geometry | null

within: (a, b) => boolean

True if a is within b.

Geometry

Geometry

boolean

withM: (geometry, m) => Geometry | null

Returns a copy of the geometry with m set as the M (measure) value on all vertices. Mirrors GeometryEngine.makeGeometry(from:m:) (Swift) / GeometryEngine.createWithMOrNull(geometry, m) (Kotlin).

Geometry

number

Geometry | null

withZ: (geometry, z) => Geometry | null

Returns a copy of the geometry with z set as the Z (elevation) value on all vertices. Mirrors GeometryEngine.makeGeometry(from:z:) (Swift) / GeometryEngine.createWithZOrNull(geometry, z) (Kotlin).

Geometry

number

Geometry | null

withZAndM: (geometry, z, m) => Geometry | null

Returns a copy of the geometry with both z (elevation) and m (measure) set on all vertices. Mirrors GeometryEngine.makeGeometry(from:z:m:) (Swift) / GeometryEngine.createWithZAndMOrNull(geometry, z, m) (Kotlin).

Geometry

number

number

Geometry | null