Optionaldefinition?: stringThe WKT definition of the coordinate system.
Optionalhorizontal?: { The horizontal component of the coordinate system.
Optionalid?: stringThe id of this coordinate system. If unspecified, will use the SRID or name, if available.
The name of the coordinate system.
Optionalsrid?: SRIDThe optional SRID of this coordinate system.
Optionalvertical?: { The vertical component of the coordinate system.
Optional ReadonlydefinitionThe WKT definition of this coordinate system.
Optional ReadonlyhorizontalContains metadata about the horizontal component of this coordinate system.
ReadonlynameThe readable name of this coordinate system.
Optional ReadonlysridThe SRID of this coordinate system.
Optional ReadonlyverticalContains metadata about the vertical component of this coordinate system.
Static Readonlyepsg3857The EPSG:3857 / pseudo-mercator coordinate systems.
Static Readonlyepsg4326Static Readonlyepsg4978Static Readonlyepsg4979Static ReadonlyequirectangularA special coordinate system used for spherical projections.
Static ReadonlyunknownThe 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 the conversion factor between horizontal units and meters.
Returns the conversion factor between vertical units and meters.
Returns true if the two coordinate systems are equal.
StaticfromCreates a CoordinateSystem from its WKT definition.
Note: this does not register the coordinate system with proj4.js. Use register instead.
The WKT 1 or WKT 2 definition.
Optionaloverrides: { Optionalid?: stringThe created coordinate system, or throws an error if the definition could not be parsed.
StaticgetStaticregisterRegisters 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.
The id of the coordinate system.
The WKT or proj definition.
Optionaloptions: { Registration options.
OptionalthrowIf true, any error that occurs when registering the coordinate system definition with proj4.js is re-thrown. Otherwise, a simple warning is logged instead.
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);
Contains information about coordinate systems, as well as methods to register new coordinate systems.