Class for coordinate transforms between coordinate systems.
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
Functions
This class offers several methods for interacting with a wrapped zoo-pro4js projection object.
Parameters
Returns
{ZOO.Projection} A projection object.
getCode: function()
Get the string SRS code.
Returns
{String} The SRS code.
getUnits: function()
Get the units string for the projection – returns null if zoo-proj4js is not available.
Returns
{String} The units abbreviation.
toString: function()
Convert projection to string (getCode wrapper).
Returns
{String} The projection code.
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: function()
Destroy projection object.
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
Returns
point {object} A transformed coordinate. The original point is modified.