Open WPS Platform

ZOO.Geometry

A Geometry is a description of a geographic object.

Properties

NAME DESCRIPTION
id {String} A unique identifier for this geometry.
parent {ZOO.Geometry}This is set when a Geometry is added as component of another geometry
bounds {ZOO.Bounds} The bounds of this geometry

Functions

NAME DESCRIPTION
ZOO.Geometry Creates a geometry object.
destroy nullify references to prevent circular references and memory leaks
clone Create a clone of this vector feature.
extendBounds Moves the feature and redraws it at its new location
clearBounds Nullify this components bounds and that of its parent as well.
getBounds Get the bounds for this Geometry.
calculateBounds Recalculate the bounds for the geometry.
toString Returns the Well-Known Text representation of a geometry
ZOO.Geometry.fromWKT Generate a geometry given a Well-Known Text string.

Properties

id
{String} A unique identifier for this geometry.
parent
{ZOO.Geometry} This is set when a Geometry is added as component of another geometry
bounds
{ZOO.Bounds} The bounds of this geometry

Functions

ZOO.Geometry
Creates a geometry object.
destroy
destroy: function()

Destroy this geometry.

clone
clone: function()

Create a clone of this geometry. Does not set any non-standard properties of the cloned geometry.

Returns

{ZOO.Geometry} An exact clone of this geometry.

extendBounds
extendBounds: function(newBounds)

Extend the existing bounds to include the new bounds. If geometry’s bounds is not yet set, then set a new Bounds.

Parameters

newBounds {ZOO.Bounds}

clearBounds
clearBounds: function()

Nullify this components bounds and that of its parent as well.

getBounds
getBounds: function()

Get the bounds for this Geometry. If bounds is not set, it is calculated again, this makes queries faster.

Returns

newBounds {ZOO.Bounds}

calculateBounds
calculateBounds: function()

Recalculate the bounds for the geometry.

toString
toString: function()

Returns the Well-Known Text representation of a geometry

Returns

{String} Well-Known Text

ZOO.Geometry.fromWKT
ZOO.Geometry.fromWKT = function(wkt)

Generate a geometry given a Well-Known Text string.

Parameters

wkt {String} A string representing the geometry in Well-Known Text.

Returns

{ZOO.Geometry} A geometry of the appropriate class.