toSpatialFromGcs Method

Convert geographic coordinates into points in this iModel's spatial coordinate system using a GeoConverter or the iModel's EcefLocation.

toSpatialFromGcs(geoCoords: Readonly<WritableXYAndZ>[], datumOrGCRS?: string | GeographicCRSProps): Promise<Point3d[]>

@returns The geographics coordinates converted to spatial coordinates, of the same length and order as geographics.

@throws IModelError if IModelConnection.isGeoLocated is false or any point could not be converted.

Parameter Type Description
geoCoords Readonly<WritableXYAndZ>[] Coordinates to be converted are in the coordinate system described by the datumOrGCRS parameter. Defaults iModel's spatial coordinate system otherwise.
datumOrGCRS string | GeographicCRSProps Datum name or Geographic CRS object definition to use for the conversion.

Returns - Promise<Point3d[]>

The geographics coordinates converted to spatial coordinates, of the same length and order as geographics.

Defined in

Last Updated: 25 April, 2024