Class: PrjFile

PrjFile(url)

Parses a projection descriptor file.

Constructor

new PrjFile(url)

Constructs an object for a projection descriptor file at a specified URL. Applications typically do not call this constructor. It is called by Shapefile to read the projection descriptor.
Parameters:
Name Type Description
url String The location of the dBase file.
Source:
Throws:
If the specified URL is null or undefined.
Type
ArgumentError

Members

(static) COORDINATE_SYSTEM :String

A key for a coordinate system description.
Type:
  • String
Source:

(static) COORDINATE_SYSTEM_GEOGRAPHIC :String

A geographic coordinate system description.
Type:
  • String
Source:

(static) COORDINATE_SYSTEM_PROJECTED :String

A projected coordinate system description.
Type:
  • String
Source:

(static) COORDINATE_SYSTEM_UNKNOWN :String

An unknown coordinate system.
Type:
  • String
Source:

(static) GEOGCS_WKT_PATTERN

Pattern matching the geographic coordinate system keyword in an OGC coordinate system well-known text.
Source:

(static) PROJCS_WKT_PATTERN

Pattern matching the projected coordinate system keyword in an OGC coordinate system well-known text.
Source:

(static) PROJECTION_HEMISPHERE :String

The key for the hemisphere descriptor.
Type:
  • String
Source:

(static) PROJECTION_HEMISPHERE_NORTH :String

The descriptor for the northern hemisphere.
Type:
  • String
Source:

(static) PROJECTION_HEMISPHERE_SOUTH :String

The descriptor for the southern hemisphere.
Type:
  • String
Source:

(static) PROJECTION_NAME :String

The key for the name of the projection.
Type:
  • String
Source:

(static) PROJECTION_UTM :String

A UTM projection descriptor.
Type:
  • String
Source:

(static) PROJECTION_ZONE :String

The key for the UTM projection zone.
Type:
  • String
Source:

(static) UTM_NAME_WKT_PATTERN

Pattern matching the UTM name in an projected coordinate system's well-known text.
Source:

(readonly) url :String

The URL as specified to this projection file's constructor.
Type:
  • String
Source:

Methods

decodeOGCCoordinateSystem(text) → {Object}

Retrieves the coordinate system and its parameters from an OGC coordinate system encoded as well-known text. For details, see to the OGC Coordinate Transform Service (CT) specification at https://www.opengeospatial.org/standards/ct. This recognizes Geographic and UTM coordinate systems. If an exception occurs while parsing the coordinate system text, the parameter list is left unchanged.
Parameters:
Name Type Description
text String A string containing an OGC coordinate system in well-known text format.
Source:
Throws:
ArgumentError If text is null.
Returns:
An object containing key/value pairs extracted from the PRJ data.
Type
Object

isGeographicCoordinateSystem() → {Boolean}

Indicates that a geographic coordinate system was encountered.
Source:
Returns:
True if a geographic coordinate system was encountered.
Type
Boolean

isKnownCoordinateSystem() → {Boolean}

Indicates that a known coordinate system was encountered.
Source:
Returns:
True if a known coordinate system was encountered.
Type
Boolean

isProjectedCoordinateSystem() → {boolean}

Indicates that a projected coordinate system was encountered.
Source:
Returns:
True if a projected coordinate system was encountered.
Type
boolean

isUnknownCoordinateSystem() → {Boolean}

Indicates that an unknown coordinate system was encountered.
Source:
Returns:
True if an unknown coordinate system was encountered.
Type
Boolean

requestUrl(url)

TODO: this common code; refactor! Internal use only. Request data from the URL.
Parameters:
Name Type Description
url String The URL for the requested data.
Source: