Class: Go3dUtils

Go3dUtils

A utility class for handling geographical coordinate transformations and projections for GeoJSON data.

new Go3dUtils()

GoMap/Utils/index.ts, line 7

Methods

staticGo3dUtils.changeCoordinatesProjection(geojson){GeoJSON}

GoMap/Utils/index.ts, line 34

Converts the projection of GeoJSON coordinates from EPSG:3857 to EPSG:4326.

Name Type Description
geojson GeoJSON

The GeoJSON object with features in EPSG:3857 projection.

Returns:
Type Description
GeoJSON
  • The updated GeoJSON object with features converted to EPSG:4326 projection.

staticGo3dUtils.toExternalProjection(coords){Array.<number>}

GoMap/Utils/index.ts, line 58

Transforms coordinates from EPSG:4326 to EPSG:3857 projection.

Name Type Description
coords Array.<number>

The coordinates in EPSG:4326 projection to be transformed.

Returns:
Type Description
Array.<number>
  • The transformed coordinates in EPSG:3857 projection.

staticGo3dUtils.toMapProjection(coordinates){any}

GoMap/Utils/index.ts, line 49

Recursively converts coordinates from EPSG:3857 to EPSG:4326 projection.

Name Type Description
coordinates any

The coordinates to be transformed. Can be a nested array of numbers.

Returns:
Type Description
any
  • The transformed coordinates in EPSG:4326 projection.