Class: GeoJSONCRS

GeoJSONCRS(type, properties)

Contains the data associated with a GeoJSON Coordinate Reference System object. The coordinate reference system (CRS) of a GeoJSON object is determined by its "crs" member (referred to as the CRS object below). If an object has no crs member, then its parent or grandparent object's crs member may be acquired. If no crs member can be so acquired, the default CRS shall apply to the GeoJSON object. The default CRS is a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees.

There are two types of CRS objects:

  • Named CRS
  • Linked CRS
In this implementation we consider only named CRS. In this case, the value of its "type" member must be the string "name". The value of its "properties" member must be an object containing a "name" member. The value of that "name" member must be a string identifying a coordinate reference system. OGC CRS URNs such as "urn:ogc:def:crs:OGC:1.3:CRS84" shall be preferred over legacy identifiers such as "EPSG:4326".

For reprojecton is used Proj4js JavaScript library.

Constructor

new GeoJSONCRS(type, properties)

Constructs a GeoJSON CRS object. Applications typically do not call this constructor. It is called by GeoJSONGeometry, GeoJSONGeometryCollection, GeoJSONFeature or GeoJSONFeatureCollection.
Parameters:
Name Type Description
type String A string, indicating the type of CRS object.
properties Object An object containing the properties of CRS object.
Source:
Throws:
If the specified type or properties are null or undefined.
Type
ArgumentError

Members

(readonly) properties :Object

The GeoJSON CRS object properties as specified to this GeoJSON CRS's constructor.
Type:
  • Object
Source:

(readonly) type :String

The GeoJSON CRS object type as specified to this GeoJSON CRS's constructor.
Type:
  • String
Source:

Methods

isCRSSupported() → {Boolean}

Indicates whether the CRS is supported by proj4js.
Source:
Returns:
True if the CRS is supported by proj4js
Type
Boolean

isDefault() → {Boolean}

Indicates whether this CRS is the default GeoJSON one, respectively a geographic coordinate reference system, using the WGS84 datum, and with longitude and latitude units of decimal degrees.
Source:
Returns:
True if the CRS is the default GeoJSON CRS
Type
Boolean

isLinked() → {Boolean}

Indicates whether the type of this CRS object is linked CRS.
Source:
Returns:
True if the type of CRS object is linked CRS
Type
Boolean

isNamed() → {Boolean}

Indicates whether the type of this CRS object is named CRS.
Source:
Returns:
True if the type of CRS object is named CRS
Type
Boolean