Contains information about coordinate systems, as well as methods to register new coordinate systems.

Constructors

  • Parameters

    • params: {
          definition?: string;
          horizontal?: {
              unit: Unit;
          };
          id?: string;
          name: string;
          srid?: SRID;
          vertical?: {
              unit: LinearUnit;
          };
      }
      • Optionaldefinition?: string

        The WKT definition of the coordinate system.

      • Optionalhorizontal?: {
            unit: Unit;
        }

        The horizontal component of the coordinate system.

      • Optionalid?: string

        The id of this coordinate system. If unspecified, will use the SRID or name, if available.

      • name: string

        The name of the coordinate system.

      • Optionalsrid?: SRID

        The optional SRID of this coordinate system.

      • Optionalvertical?: {
            unit: LinearUnit;
        }

        The vertical component of the coordinate system.

    Returns core.geographic.CoordinateSystem

Properties

definition?: string

The WKT definition of this coordinate system.

horizontal?: {
    unit: Unit;
}

Contains metadata about the horizontal component of this coordinate system.

name: string

The readable name of this coordinate system.

srid?: SRID

The SRID of this coordinate system.

vertical?: {
    unit: LinearUnit;
}

Contains metadata about the vertical component of this coordinate system.

The EPSG:3857 / pseudo-mercator coordinate systems.

equirectangular: core.geographic.CoordinateSystem = ...

A special coordinate system used for spherical projections.

Accessors

  • get id(): string
  • The internal identifier of this coordinate system. Used as a key in the coordinate system registry. By order of priority, will return: the custom identifier, the SRID, then the name.

    Returns string

Methods

  • Returns true if this coordinate system is the special equirectangular coordinate system (used for spherical mapping).

    Returns boolean

  • Returns true if this coordinate system is the special unknown coordinate system (used for non-georeferenced scenes).

    Returns boolean

  • Registers a coordinate system with the underlying proj and OpenLayers libraries.

    Note: it is recommended to provide WKT definitions instead of proj strings, since they provide more metadata about the CRS (such as name, SRID, etc).

    Note 2: some coordinate systems definitions (such as WKT 2's COMPOUNDCRS) are not supported by the underlying proj library. However, if you are not planning to use any feature of Giro3D that requires the proj library, you may ignore failures and warnings.

    Parameters

    • id: string

      The id of the coordinate system.

    • definition: string

      The WKT or proj definition.

    • Optionaloptions: {
          throwIfFailedToRegisterWithProj?: boolean;
      }

      Registration options.

      • OptionalthrowIfFailedToRegisterWithProj?: boolean

        If true, any error that occurs when registering the coordinate system definition with proj4.js is re-thrown. Otherwise, a simple warning is logged instead.

    Returns core.geographic.CoordinateSystem

    A CoordinateSystem instance.

    const wkt = `
    PROJCS["RGF93 v1 / Lambert-93",
    GEOGCS["RGF93 v1",
    DATUM["Reseau_Geodesique_Francais_1993_v1",
    SPHEROID["GRS 1980",6378137,298.257222101],
    TOWGS84[0,0,0,0,0,0,0]],
    PRIMEM["Greenwich",0,
    AUTHORITY["EPSG","8901"]],
    UNIT["degree",0.0174532925199433,
    AUTHORITY["EPSG","9122"]],
    AUTHORITY["EPSG","4171"]],
    PROJECTION["Lambert_Conformal_Conic_2SP"],
    PARAMETER["latitude_of_origin",46.5],
    PARAMETER["central_meridian",3],
    PARAMETER["standard_parallel_1",49],
    PARAMETER["standard_parallel_2",44],
    PARAMETER["false_easting",700000],
    PARAMETER["false_northing",6600000],
    UNIT["metre",1,
    AUTHORITY["EPSG","9001"]],
    AXIS["Easting",EAST],
    AXIS["Northing",NORTH],
    AUTHORITY["EPSG","2154"]]
    `;

    const crs = CoordinateSystem.register('EPSG:2154', wkt);
    console.log(crs.name);