• Convert a standard GeoJSON geometry back into Esri-JSON geometry, the inverse of esriGeometryToGeoJSON. GeometryCollection is not representable as a single Esri geometry and yields null.

    Polygon/MultiPolygon rings are rewound to the Esri winding convention (clockwise exterior, counter-clockwise holes) and MultiPolygons are flattened into a single { rings } list, matching how Esri encodes multi-part polygons.

    Parameters

    • geometry: undefined | null | GeoJsonGeometry

      A GeoJSON geometry, or null/undefined.

    • OptionalspatialReference: HonuaSpatialReference

      Optional spatial reference stamped onto the emitted Esri geometry (Esri geometries are CRS-tagged; GeoJSON is implicitly WGS84).

    Returns EsriGeometry | null

    The equivalent Esri geometry, or null when the input is empty or unrepresentable.