Open WPS Platform

ZOO.Projection

Class for coordinate transforms between coordinate systems.

Properties

NAME DESCRIPTION
proj {Number} Proj4js.Proj instance.
projCode {String}

Functions

NAME DESCRIPTION
ZOO.Projection This class offers several methods for interacting with a wrapped zoo-pro4js projection object.
getCode Get the string SRS code.
getUnits Get the units string for the projection – returns null if zoo-proj4js is not available.
toString Convert projection to string (getCode wrapper).
equals Test equality of two projection instances.
destroy Destroy projection object.
transform Transform a point coordinate from one projection to another.

Properties

proj
{Object} Proj4js.Proj instance.
projCode
{String}

Functions

ZOO.Projection

This class offers several methods for interacting with a wrapped zoo-pro4js projection object.

Parameters

projCode {String} A string identifying the Well Known Identifier for the projection.
options {Object} An optional object to set additional properties.

Returns

{ZOO.Projection} A projection object.

getCode
getCode: function()

Get the string SRS code.

Returns

{String} The SRS code.

getUnits
getUnits: function()

Get the units string for the projection – returns null if zoo-proj4js is not available.

Returns

{String} The units abbreviation.

toString
toString: function()

Convert projection to string (getCode wrapper).

Returns

{String} The projection code.

equals
equals: function(projection)

Test equality of two projection instances. Determines equality based soley on the projection code.

Returns

{Boolean} The two projections are equivalent.

destroy
destroy: function()

Destroy projection object.

transform
ZOO.Projection.transform = function(point,source,dest)

Transform a point coordinate from one projection to another. Note that the input point is transformed in place.

Parameters

point {{ZOO.Geometry.Point> | Object} An object with x and y properties representing coordinates in those dimensions.
sourceProj {ZOO.Projection} Source map coordinate system
destProj {ZOO.Projection} Destination map coordinate system

Returns

point {object} A transformed coordinate. The original point is modified.