.. _api-classes: Classes ======= .. raw:: html

ZOO

Summary
ZOO
Constants
SERVICE_ACCEPTED{Integer} used for
SERVICE_STARTED{Integer} used for
SERVICE_PAUSED{Integer} used for
SERVICE_SUCCEEDED{Integer} used for
SERVICE_FAILED{Integer} used for
Functions
removeItemRemove an object from an array.
indexOf
extendCopy all properties of a source object to a destination object.
rad
distVincentyGiven two objects representing points with geographic coordinates, this calculates the distance between those points on the surface of an ellipsoid.
ClassMethod used to create ZOO classes.
UpdateStatusMethod used to update the status of the process
ZOO.StringContains convenience methods for string manipulation
Functions and Properties
startsWithTest whether a string starts with another string.
containsTest whether a string contains another string.
trimRemoves leading and trailing whitespace characters from a string.
camelizeCamel-case a hyphenated string.
tokenRegExUsed to find tokens in a string.
numberRegExUsed to test strings as numbers.
isNumericDetermine whether a string contains only a numeric value.
numericIfConverts a string that appears to be a numeric value into a number.
ZOO.RequestContains convenience methods for working with ZOORequest which replace XMLHttpRequest.
Functions
GETSend an HTTP GET request.
POSTSend an HTTP POST request.
ZOO.BoundsInstances of this class represent bounding boxes.
Properties
left{Number} Minimum horizontal coordinate.
bottom{Number} Minimum vertical coordinate.
right{Number} Maximum horizontal coordinate.
top{Number} Maximum vertical coordinate.
Functions
ZOO.BoundsConstruct a new bounds object.
cloneCreate a cloned instance of this bounds.
equalsTest a two bounds for equivalence.
toString{String} String representation of bounds object.
toBBOX
toGeometryCreate a new polygon geometry based on this bounds.
getWidth{Float} The width of the bounds
getHeight{Float} The height of the bounds (top minus bottom).
add
extendExtend the bounds to include the point, lonlat, or bounds specified.
intersectsBoundsDetermine whether the target bounds intersects this bounds.
containsBoundsDetermine whether the target bounds is contained within this bounds.
ZOO.ProjectionClass for coordinate transforms between coordinate systems.
Properties
proj{Object} Proj4js.Proj instance.
projCode{String}
Functions
ZOO.ProjectionThis class offers several methods for interacting with a wrapped zoo-pro4js projection object.
getCodeGet the string SRS code.
getUnitsGet the units string for the projection -- returns null if zoo-proj4js is not available.
toStringConvert projection to string (getCode wrapper).
equalsTest equality of two projection instances.
destroyDestroy projection object.
transformTransform a point coordinate from one projection to another.
ZOO.FormatBase class for format reading/writing a variety of formats.
Properties
options{Object} A reference to options passed to the constructor.
externalProjection{ZOO.Projection} When passed a externalProjection and internalProjection, the format will reproject the geometries it reads or writes.
internalProjection{ZOO.Projection} When passed a externalProjection and internalProjection, the format will reproject the geometries it reads or writes.
data{Object} When keepData is true, this is the parsed string sent to read.
keepData{Object} Maintain a reference (data) to the most recently read data.
Functions
ZOO.FormatInstances of this class are not useful.
destroyClean up.
readRead data from a string, and return an object whose type depends on the subclass.
writeAccept an object, and return a string.
ZOO.Format.WKTClass for reading and writing Well-Known Text.
Functions and Properties
ZOO.Format.WKTCreate a new parser for WKT
readDeserialize a WKT string and return a vector feature or an array of vector features.
writeSerialize a feature or array of features into a WKT string.
extractObject with properties corresponding to the geometry types.
parseObject with properties corresponding to the geometry types.
parse.pointReturn point feature given a point WKT fragment.
parse.multipointReturn a multipoint feature given a multipoint WKT fragment.
parse.linestringReturn a linestring feature given a linestring WKT fragment.
parse.multilinestringReturn a multilinestring feature given a multilinestring WKT fragment.
parse.polygonReturn a polygon feature given a polygon WKT fragment.
parse.multipolygonReturn a multipolygon feature given a multipolygon WKT fragment.
parse.geometrycollectionReturn an array of features given a geometrycollection WKT fragment.
ZOO.Format.JSONA parser to read/write JSON safely.
Properties
indent{String} For “pretty” printing, the indent string will be used once for each indentation level.
space{String} For “pretty” printing, the space string will be used after the “:” separating a name/value pair.
newline{String} For “pretty” printing, the newline string will be used at the end of each name/value pair or array item.
level{Integer} For “pretty” printing, this is incremented/decremented during serialization.
pretty{Boolean} Serialize with extra whitespace for structure.
Functions
ZOO.Format.JSONCreate a new parser for JSON.
readDeserialize a json string.
writeSerialize an object into a JSON string.
writeIndentOutput an indentation string depending on the indentation level.
writeNewlineOutput a string representing a newline if in pretty printing mode.
writeSpaceOutput a string representing a space if in pretty printing mode.
Properties
serializeObject with properties corresponding to the serializable data types.
Functions
serialize.objectTransform an object into a JSON string.
serialize.arrayTransform an array into a JSON string.
serialize.stringTransform a string into a JSON string.
serialize.numberTransform a number into a JSON string.
serialize.booleanTransform a boolean into a JSON string.
serialize.dateTransform a date into a JSON string.
ZOO.Format.GeoJSONRead and write GeoJSON.
Functions
ZOO.Format.GeoJSONCreate a new parser for GeoJSON.
readDeserialize a GeoJSON string.
isValidTypeCheck if a GeoJSON object is a valid representative of the given type.
parseFeatureConvert a feature object from GeoJSON into an ZOO.Feature.
parseGeometryConvert a geometry object from GeoJSON into an ZOO.Geometry.
Properties
parseCoordsObject with properties corresponding to the GeoJSON geometry types.
Functions
parseCoords.pointConvert a coordinate array from GeoJSON into an ZOO.Geometry.Point.
parseCoords.multipointConvert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPoint.
parseCoords.linestringConvert a coordinate array from GeoJSON into an ZOO.Geometry.LineString.
parseCoords.multilinestringConvert a coordinate array from GeoJSON into an ZOO.Geometry.MultiLineString.
parseCoords.polygonConvert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
parseCoords.multipolygonConvert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPolygon.
parseCoords.boxConvert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
writeSerialize a feature, geometry, array of features into a GeoJSON string.
createCRSObjectCreate the CRS object for an object.
Properties
extractObject with properties corresponding to the GeoJSON types.
Functions
extract.featureReturn a partial GeoJSON object representing a single feature.
extract.geometryReturn a GeoJSON object representing a single geometry.
extract.pointReturn an array of coordinates from a point.
extract.multipointReturn an array of coordinates from a multipoint.
extract.linestringReturn an array of coordinate arrays from a linestring.
extract.multilinestringReturn an array of linestring arrays from a linestring.
extract.polygonReturn an array of linear ring arrays from a polygon.
extract.multipolygonReturn an array of polygon arrays from a multipolygon.
extract.collectionReturn an array of geometries from a geometry collection.
ZOO.Format.KMLRead/Write KML.
Properties and Functions
kmlns{String} KML Namespace to use.
foldersName{String} Name of the folders.
foldersDesc{String} Description of the folders.
placemarksDesc{String} Name of the placemarks.
extractAttributes{Boolean} Extract attributes from KML.
ZOO.Format.KMLCreate a new parser for KML.
parseFeaturesLoop through all Placemark nodes and parse them.
parseFeatureThis function is the core of the KML parsing code in ZOO.
parseGeometryProperties of this object are the functions that parse geometries based on their type.
parseGeometry.pointGiven a KML node representing a point geometry, create a ZOO point geometry.
parseGeometry.linestringGiven a KML node representing a linestring geometry, create a ZOO linestring geometry.
parseGeometry.polygonGiven a KML node representing a polygon geometry, create a ZOO polygon geometry.
parseGeometry.multigeometryGiven a KML node representing a multigeometry, create a ZOO geometry collection.
parseAttributes
parseExtendedDataParse ExtendedData from KML.
writeAccept Feature Collection, and return a string.
createPlacemarkCreates and returns a KML placemark node representing the given feature.
buildGeometryNodeBuilds and returns a KML geometry node with the given geometry.
buildGeometryObject containing methods to do the actual geometry node building based on geometry type.
buildGeometry.pointGiven a ZOO point geometry, create a KML point.
buildGeometry.multipointGiven a ZOO multipoint geometry, create a KML GeometryCollection.
buildGeometry.linestringGiven a ZOO linestring geometry, create a KML linestring.
buildGeometry.multilinestringGiven a ZOO multilinestring geometry, create a KML GeometryCollection.
buildGeometry.linearringGiven a ZOO linearring geometry, create a KML linearring.
buildGeometry.polygonGiven a ZOO polygon geometry, create a KML polygon.
buildGeometry.multipolygonGiven a ZOO multipolygon geometry, create a KML GeometryCollection.
buildGeometry.collectionGiven a ZOO geometry collection, create a KML MultiGeometry.
buildCoordinatesNodeBuilds and returns the KML coordinates node with the given geometry <coordinates>...</coordinates>
ZOO.Format.GMLRead/Write GML.
Properties and Functions
schemaLocation{String} Schema location for a particular minor version.
namespaces{Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix
collectionName{String} Name of featureCollection element.
featureName{String} Element name for features.
geometryName{String} Name of geometry element.
xy{Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.
extractAttributes{Boolean} Could we extract attributes
ZOO.Format.GMLCreate a new parser for GML.
readRead data from a string, and return a list of features.
parseFeatureThis function is the core of the GML parsing code in ZOO.
parseGeometryProperties of this object are the functions that parse geometries based on their type.
parseGeometry.pointGiven a GML node representing a point geometry, create a ZOO point geometry.
parseGeometry.multipointGiven a GML node representing a multipoint geometry, create a ZOO multipoint geometry.
parseGeometry.linestringGiven a GML node representing a linestring geometry, create a ZOO linestring geometry.
parseGeometry.multilinestringGiven a GML node representing a multilinestring geometry, create a ZOO multilinestring geometry.
parseGeometry.polygonGiven a GML node representing a polygon geometry, create a ZOO polygon geometry.
parseGeometry.multipolygonGiven a GML node representing a multipolygon geometry, create a ZOO multipolygon geometry.
parseGeometry.polygonGiven a GML node representing an envelope, create a ZOO polygon geometry.
parseAttributes
writeGenerate a GML document string given a list of features.
createFeatureAccept an ZOO.Feature, and build a GML node for it.
buildGeometryNode
buildGeometryObject containing methods to do the actual geometry node building based on geometry type.
buildGeometry.pointGiven a ZOO point geometry, create a GML point.
buildGeometry.multipointGiven a ZOO multipoint geometry, create a GML multipoint.
buildGeometry.linestringGiven a ZOO linestring geometry, create a GML linestring.
buildGeometry.multilinestringGiven a ZOO multilinestring geometry, create a GML multilinestring.
buildGeometry.linearringGiven a ZOO linearring geometry, create a GML linearring.
buildGeometry.polygonGiven an ZOO polygon geometry, create a GML polygon.
buildGeometry.multipolygonGiven a ZOO multipolygon geometry, create a GML multipolygon.
buildCoordinatesNodebuilds the coordinates XmlNode
ZOO.Format.WPSRead/Write WPS.
Properties and Functions
schemaLocation{String} Schema location for a particular minor version.
namespaces{Object} Mapping of namespace aliases to namespace URIs.
read
parseExecuteResponse
parseDataObject containing methods to analyse data response.
parseData.complexdataGiven an Object representing the WPS complex data response.
parseData.literaldataGiven an Object representing the WPS literal data response.
parseData.referenceGiven an Object representing the WPS reference response.
ZOO.FeatureVector features use the ZOO.Geometry classes as geometry description.
Properties
fid{String}
geometry{ZOO.Geometry}
attributes{Object} This object holds arbitrary properties that describe the feature.
bounds{ZOO.Bounds} The box bounding that feature’s geometry, that property can be set by an ZOO.Format object when deserializing the feature, so in most cases it represents an information set by the server.
Functions
ZOO.FeatureCreate a vector feature.
destroynullify references to prevent circular references and memory leaks
cloneCreate a clone of this vector feature.
moveMoves the feature and redraws it at its new location
ZOO.GeometryA Geometry is a description of a geographic object.
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.GeometryCreates a geometry object.
destroyDestroy this geometry.
cloneCreate a clone of this geometry.
extendBoundsExtend the existing bounds to include the new bounds.
clearBoundsNullify this components bounds and that of its parent as well.
getBoundsGet the bounds for this Geometry.
calculateBoundsRecalculate the bounds for the geometry.
toStringReturns the Well-Known Text representation of a geometry
ZOO.Geometry.fromWKTGenerate a geometry given a Well-Known Text string.
ZOO.Geometry.CollectionA Collection is exactly what it sounds like: A collection of different Geometries.
Properties
components{Array(ZOO.Geometry)} The component parts of this geometry
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.CollectionCreates a Geometry Collection -- a list of geoms.
destroyDestroy this geometry.
cloneClone this geometry.
getComponentsStringGet a string representing the components for this collection
calculateBoundsRecalculate the bounds by iterating through the components and calling calling extendBounds() on each item.
addComponentAdd a new component (geometry) to the collection.
removeComponentsRemove components from this geometry.
removeComponentRemove a component from this geometry.
getLengthCalculate the length of this geometry
getCentroid{ZOO.Geometry.Point} The centroid of the collection
getGeodesicLengthCalculate the approximate length of the geometry were it projected onto the earth.
moveMoves a geometry by the given displacement along positive x and y axes.
rotateRotate a geometry around some origin
resizeResize a geometry relative to some origin.
equalsDetermine whether another geometry is equivalent to this one.
transformReproject the components geometry from source to dest.
intersectsDetermine if the input geometry intersects this one.
getVerticesReturn a list of all points in this geometry.
ZOO.Geometry.PointPoint geometry class.
Properties
x{float}
y{float}
Functions
ZOO.Geometry.PointConstruct a point geometry.
clone{ZOO.Geometry.Point} An exact clone of this ZOO.Geometry.Point
calculateBoundsCreate a new Bounds based on the x/y
equalsDetermine whether another geometry is equivalent to this one.
toShortString{String} Shortened String representation of Point object.
moveMoves a geometry by the given displacement along positive x and y axes.
rotateRotate a point around another.
getCentroid{ZOO.Geometry.Point} The centroid of the collection
resizeResize a point relative to some origin.
intersectsDetermine if the input geometry intersects this one.
transformTranslate the x,y properties of the point from source to dest.
getVerticesReturn a list of all points in this geometry.
ZOO.Geometry.SurfaceSurface geometry class.
ZOO.Geometry.MultiPointMultiPoint is a collection of Points.
Properties
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.MultiPointCreate a new MultiPoint Geometry
addPointWrapper for ZOO.Geometry.Collection.addComponent
removePointWrapper for ZOO.Geometry.Collection.removeComponent
ZOO.Geometry.CurveA Curve is a MultiPoint, whose points are assumed to be connected.
Properties
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.Curve
getLength{Float} The length of the curve
ZOO.Geometry.LineStringA LineString is a Curve which, once two points have been added to it, can never be less than two points long.
Functions
ZOO.Geometry.LineStringCreate a new LineString geometry
removeComponentOnly allows removal of a point if there are three or more points in the linestring.
intersectsTest for instersection between two geometries.
getSortedSegments{Array} An array of segment objects.
splitWithSegmentSplit this geometry with the given segment.
splitUse this geometry (the source) to attempt to split a target geometry.
splitWithSplit this geometry (the target) with the given geometry (the source).
getVerticesReturn a list of all points in this geometry.
ZOO.Geometry.LinearRingA Linear Ring is a special LineString which is closed.
Properties
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.LinearRingLinear rings are constructed with an array of points.
addComponentAdds a point to geometry components.
moveMoves a geometry by the given displacement along positive x and y axes.
rotateRotate a geometry around some origin
resizeResize a geometry relative to some origin.
transformReproject the components geometry from source to dest.
getCentroid{ZOO.Geometry.Point} The centroid of the ring
getArea
getGeodesicAreaCalculate the approximate area of the polygon were it projected onto the earth.
containsPointTest if a point is inside a linear ring.
ZOO.Geometry.MultiLineStringA MultiLineString is a geometry with multiple ZOO.Geometry.LineString components.
Functions
ZOO.Geometry.MultiLineStringConstructor for a MultiLineString Geometry.
ZOO.Geometry.PolygonPolygon is a collection of ZOO.Geometry.LinearRing.
Functions
ZOO.Geometry.PolygonConstructor for a Polygon geometry.
getAreaCalculated by subtracting the areas of the internal holes from the area of the outer hole.
containsPointTest if a point is inside a polygon.
createRegularPolygonCreate a regular polygon around a radius.
ZOO.Geometry.MultiPolygonMultiPolygon is a geometry with multiple ZOO.Geometry.Polygon components.
Functions
ZOO.Geometry.MultiPolygonCreate a new MultiPolygon geometry
ZOO.ProcessUsed to query OGC WPS process defined by its URL and its identifier.
Properties and Functions
schemaLocation{String} Schema location for a particular minor version.
namespaces{Object} Mapping of namespace aliases to namespace URIs.
url{String} The OGC’s Web PRocessing Service URL, default is http://localhost/zoo.
identifier{String} Process identifier in the OGC’s Web Processing Service.
ZOO.ProcessCreate a new Process
ExecuteQuery the OGC’s Web PRocessing Servcie to Execute the process.
buildInputObject containing methods to build WPS inputs.
buildInput.complexGiven an E4XElement representing the WPS complex data input.
buildInput.referenceGiven an E4XElement representing the WPS reference input.
buildInput.literalGiven an E4XElement representing the WPS literal data input.
buildDataInputsNodeMethod to build the WPS DataInputs element.

Constants

SERVICE_ACCEPTED

{Integer} used for

SERVICE_STARTED

{Integer} used for

SERVICE_PAUSED

{Integer} used for

SERVICE_SUCCEEDED

{Integer} used for

SERVICE_FAILED

{Integer} used for

Functions

removeItem

removeItem: function(array,
item)

Remove an object from an array.  Iterates through the array to find the item, then removes it.

Parameters

array{Array}
item{Object}

Return {Array} A reference to the array

indexOf

indexOf: function(array,
obj)

Parameters

array{Array}
obj{Object}

Returns

{Integer} The index at, which the first object was found in the array.  If not found, returns -1.

extend

extend: function(destination,
source)

Copy all properties of a source object to a destination object.  Modifies the passed in destination object.  Any properties on the source object that are set to undefined will not be (re)set on the destination object.

Parameters

destination{Object} The object that will be modified
source{Object} The object with properties to be set on the destination

Returns

{Object} The destination object.

rad

rad: function(x)

Parameters

x{Float}

Returns

{Float}

distVincenty

distVincenty: function(p1,
p2)

Given two objects representing points with geographic coordinates, this calculates the distance between those points on the surface of an ellipsoid.

Parameters

p1{ZOO.Geometry.Point} (or any object with both .x, .y properties)
p2{ZOO.Geometry.Point} (or any object with both .x, .y properties)

Returns

{Float} The distance (in km) between the two input points as measured on an ellipsoid.  Note that the input point objects must be in geographic coordinates (decimal degrees) and the return distance is in kilometers.

Class

Class: function()

Method used to create ZOO classes.  Includes support for multiple inheritance.

UpdateStatus

UpdateStatus: function(env,
value)

Method used to update the status of the process

Parameters

env{Object} The environment object
value{Float} the status value between 0 to 100

ZOO.String

Contains convenience methods for string manipulation

Summary
Functions and Properties
startsWithTest whether a string starts with another string.
containsTest whether a string contains another string.
trimRemoves leading and trailing whitespace characters from a string.
camelizeCamel-case a hyphenated string.
tokenRegExUsed to find tokens in a string.
numberRegExUsed to test strings as numbers.
isNumericDetermine whether a string contains only a numeric value.
numericIfConverts a string that appears to be a numeric value into a number.

Functions and Properties

startsWith

startsWith: function(str,
sub)

Test whether a string starts with another string.

Parameters

str{String} The string to test.
sub{Sring} The substring to look for.

Returns

{Boolean} The first string starts with the second.

contains

contains: function(str,
sub)

Test whether a string contains another string.

Parameters

str{String} The string to test.
sub{String} The substring to look for.

Returns

{Boolean} The first string contains the second.

trim

trim: function(str)

Removes leading and trailing whitespace characters from a string.

Parameters

str{String} The (potentially) space padded string.  This string is not modified.

Returns

{String} A trimmed version of the string with all leading and trailing spaces removed.

camelize

camelize: function(str)

Camel-case a hyphenated string.  Ex.  “chicken-head” becomes “chickenHead”, and “-chicken-head” becomes “ChickenHead”.

Parameters

str{String} The string to be camelized.  The original is not modified.

Returns

{String} The string, camelized

tokenRegEx

Used to find tokens in a string.  Examples: ${a}, ${a.b.c}, ${a-b}, ${5}

numberRegEx

Used to test strings as numbers.

isNumeric

isNumeric: function(value)

Determine whether a string contains only a numeric value.

Examples

ZOO.String.isNumeric("6.02e23") // true
	ZOO.String.isNumeric("12 dozen") // false
	ZOO.String.isNumeric("4") // true
	ZOO.String.isNumeric(" 4 ") // false

Returns

{Boolean} String contains only a number.

numericIf

numericIf: function(value)

Converts a string that appears to be a numeric value into a number.

Returns {Number|String} a Number if the passed value is a number, a String otherwise.

ZOO.Request

Contains convenience methods for working with ZOORequest which replace XMLHttpRequest.  Because of we are not in a browser JavaScript environment, ZOO Project provides a method to query servers which is based on curl : ZOORequest.

Summary
Functions
GETSend an HTTP GET request.
POSTSend an HTTP POST request.

Functions

GET

Send an HTTP GET request.

Parameters

url{String} The URL to request.
params{Object} Params to add to the url

Returns

{String} Request result.

POST

Send an HTTP POST request.

Parameters

url{String} The URL to request.
body{String} The request’s body to send.
headers{Object} A key-value object of headers to push to the request’s head

Returns

{String} Request result.

ZOO.Bounds

Instances of this class represent bounding boxes.  Data stored as left, bottom, right, top floats.  All values are initialized to null, however, you should make sure you set them before using the bounds for anything.

Summary
Properties
left{Number} Minimum horizontal coordinate.
bottom{Number} Minimum vertical coordinate.
right{Number} Maximum horizontal coordinate.
top{Number} Maximum vertical coordinate.
Functions
ZOO.BoundsConstruct a new bounds object.
cloneCreate a cloned instance of this bounds.
equalsTest a two bounds for equivalence.
toString{String} String representation of bounds object.
toBBOX
toGeometryCreate a new polygon geometry based on this bounds.
getWidth{Float} The width of the bounds
getHeight{Float} The height of the bounds (top minus bottom).
add
extendExtend the bounds to include the point, lonlat, or bounds specified.
intersectsBoundsDetermine whether the target bounds intersects this bounds.
containsBoundsDetermine whether the target bounds is contained within this bounds.

Properties

left

{Number} Minimum horizontal coordinate.

bottom

{Number} Minimum vertical coordinate.

right

{Number} Maximum horizontal coordinate.

top

{Number} Maximum vertical coordinate.

Functions

ZOO.Bounds

Construct a new bounds object.

Parameters

left{Number} The left bounds of the box.  Note that for width calculations, this is assumed to be less than the right value.
bottom{Number} The bottom bounds of the box.  Note that for height calculations, this is assumed to be more than the top value.
right{Number} The right bounds.
top{Number} The top bounds.

clone

clone:function()

Create a cloned instance of this bounds.

Returns

{ZOO.Bounds} A fresh copy of the bounds

equals

equals:function(bounds)

Test a two bounds for equivalence.

Parameters

bounds{ZOO.Bounds}

Returns

{Boolean} The passed-in bounds object has the same left, right, top, bottom components as this.  Note that if bounds passed in is null, returns false.

toString

toString:function()

Returns

{String} String representation of bounds object.  (ex.<i>”left-bottom=(5,42) right-top=(10,45)”</i>)

toBBOX

toBBOX:function(decimal)

Parameters

decimal{Integer} How many significant digits in the bbox coords?  Default is 6

Returns

{String} Simple String representation of bounds object.  (ex.  <i>”5,42,10,45”</i>)

toGeometry

toGeometry: function()

Create a new polygon geometry based on this bounds.

Returns

{ZOO.Geometry.Polygon} A new polygon with the coordinates of this bounds.

getWidth

getWidth:function()

Returns

{Float} The width of the bounds

getHeight

getHeight:function()

Returns

{Float} The height of the bounds (top minus bottom).

add

add:function(x,
y)

Parameters

x{Float}
y{Float}

Returns

{ZOO.Bounds} A new bounds whose coordinates are the same as this, but shifted by the passed-in x and y values.

extend

extend:function(object)

Extend the bounds to include the point, lonlat, or bounds specified.  Note, this function assumes that left < right and bottom < top.

Parameters

object{Object} Can be Point, or Bounds

intersectsBounds

intersectsBounds:function(bounds,
inclusive)

Determine whether the target bounds intersects this bounds.  Bounds are considered intersecting if any of their edges intersect or if one bounds contains the other.

Parameters

bounds{ZOO.Bounds} The target bounds.
inclusive{Boolean} Treat coincident borders as intersecting.  Default is true.  If false, bounds that do not overlap but only touch at the border will not be considered as intersecting.

Returns

{Boolean} The passed-in bounds object intersects this bounds.

containsBounds

containsBounds:function(bounds,
partial,
inclusive)

Determine whether the target bounds is contained within this bounds.

bounds{ZOO.Bounds} The target bounds.
partial{Boolean} If any of the target corners is within this bounds consider the bounds contained.  Default is false.  If true, the entire target bounds must be contained within this bounds.
inclusive{Boolean} Treat shared edges as contained.  Default is true.

Returns

{Boolean} The passed-in bounds object is contained within this bounds.

ZOO.Projection

Class for coordinate transforms between coordinate systems.  Depends on the zoo-proj4js library. zoo-proj4js library is loaded by the ZOO Kernel with zoo-api.

Summary
Properties
proj{Object} Proj4js.Proj instance.
projCode{String}
Functions
ZOO.ProjectionThis class offers several methods for interacting with a wrapped zoo-pro4js projection object.
getCodeGet the string SRS code.
getUnitsGet the units string for the projection -- returns null if zoo-proj4js is not available.
toStringConvert projection to string (getCode wrapper).
equalsTest equality of two projection instances.
destroyDestroy projection object.
transformTransform 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.

ZOO.Format

Base class for format reading/writing a variety of formats.  Subclasses of ZOO.Format are expected to have read and write methods.

Summary
Properties
options{Object} A reference to options passed to the constructor.
externalProjection{ZOO.Projection} When passed a externalProjection and internalProjection, the format will reproject the geometries it reads or writes.
internalProjection{ZOO.Projection} When passed a externalProjection and internalProjection, the format will reproject the geometries it reads or writes.
data{Object} When keepData is true, this is the parsed string sent to read.
keepData{Object} Maintain a reference (data) to the most recently read data.
Functions
ZOO.FormatInstances of this class are not useful.
destroyClean up.
readRead data from a string, and return an object whose type depends on the subclass.
writeAccept an object, and return a string.

Properties

options

{Object} A reference to options passed to the constructor.

externalProjection

{ZOO.Projection} When passed a externalProjection and internalProjection, the format will reproject the geometries it reads or writes.  The externalProjection is the projection used by the content which is passed into read or which comes out of write.  In order to reproject, a projection transformation function for the specified projections must be available.  This support is provided via zoo-proj4js.

internalProjection

{ZOO.Projection} When passed a externalProjection and internalProjection, the format will reproject the geometries it reads or writes.  The internalProjection is the projection used by the geometries which are returned by read or which are passed into write.  In order to reproject, a projection transformation function for the specified projections must be available.  This support is provided via zoo-proj4js.

data

{Object} When keepData is true, this is the parsed string sent to read.

keepData

{Object} Maintain a reference (data) to the most recently read data.  Default is false.

Functions

ZOO.Format

Instances of this class are not useful.  See one of the subclasses.

Parameters

options{Object} An optional object with properties to set on the format

Valid options

keepData{Boolean} If true, upon read, the data property will be set to the parsed object (e.g. the json or xml object).

Returns

An instance of ZOO.Format

destroy

destroy: function()

Clean up.

read

read: function(data)

Read data from a string, and return an object whose type depends on the subclass.

Parameters

data{string} Data to read/parse.

Returns

Depends on the subclass

write

write: function(data)

Accept an object, and return a string.

Parameters

object{Object} Object to be serialized

Returns

{String} A string representation of the object.

ZOO.Format.WKT

Class for reading and writing Well-Known Text.  Create a new instance with the ZOO.Format.WKT constructor.

Inherits from

Summary
Functions and Properties
ZOO.Format.WKTCreate a new parser for WKT
readDeserialize a WKT string and return a vector feature or an array of vector features.
writeSerialize a feature or array of features into a WKT string.
extractObject with properties corresponding to the geometry types.
parseObject with properties corresponding to the geometry types.
parse.pointReturn point feature given a point WKT fragment.
parse.multipointReturn a multipoint feature given a multipoint WKT fragment.
parse.linestringReturn a linestring feature given a linestring WKT fragment.
parse.multilinestringReturn a multilinestring feature given a multilinestring WKT fragment.
parse.polygonReturn a polygon feature given a polygon WKT fragment.
parse.multipolygonReturn a multipolygon feature given a multipolygon WKT fragment.
parse.geometrycollectionReturn an array of features given a geometrycollection WKT fragment.

Functions and Properties

ZOO.Format.WKT

Create a new parser for WKT

Parameters

options{Object} An optional object whose properties will be set on this instance

Returns

{ZOO.Format.WKT} A new WKT parser.

read

read: function(wkt)

Deserialize a WKT string and return a vector feature or an array of vector features.  Supports WKT for POINT, MULTIPOINT, LINESTRING, MULTILINESTRING, POLYGON, MULTIPOLYGON, and GEOMETRYCOLLECTION.

Parameters

wkt{String} A WKT string

Returns

{<ZOO.Feature.Vector>|Array} A feature or array of features for GEOMETRYCOLLECTION WKT.

write

write: function(features)

Serialize a feature or array of features into a WKT string.

Parameters

features{<ZOO.Feature.Vector>|Array} A feature or array of features

Returns

{String} The WKT string representation of the input geometries

extract

Object with properties corresponding to the geometry types.  Property values are functions that do the actual data extraction.

parse

Object with properties corresponding to the geometry types.  Property values are functions that do the actual parsing.

parse.point

Return point feature given a point WKT fragment.

Parameters

str{String} A WKT fragment representing the point Returns: {ZOO.Feature} A point feature

parse.multipoint

Return a multipoint feature given a multipoint WKT fragment.

Parameters

str{String} A WKT fragment representing the multipoint

Returns

{ZOO.Feature} A multipoint feature

parse.linestring

Return a linestring feature given a linestring WKT fragment.

Parameters

str{String} A WKT fragment representing the linestring

Returns

{ZOO.Feature} A linestring feature

parse.multilinestring

Return a multilinestring feature given a multilinestring WKT fragment.

Parameters

str{String} A WKT fragment representing the multilinestring

Returns

{ZOO.Feature} A multilinestring feature

parse.polygon

Return a polygon feature given a polygon WKT fragment.

Parameters

str{String} A WKT fragment representing the polygon

Returns

{ZOO.Feature} A polygon feature

parse.multipolygon

Return a multipolygon feature given a multipolygon WKT fragment.

Parameters

str{String} A WKT fragment representing the multipolygon

Returns

{ZOO.Feature} A multipolygon feature

parse.geometrycollection

Return an array of features given a geometrycollection WKT fragment.

Parameters

str{String} A WKT fragment representing the geometrycollection

Returns

{Array} An array of ZOO.Feature

ZOO.Format.JSON

A parser to read/write JSON safely.  Create a new instance with the ZOO.Format.JSON constructor.

Inherits from

Summary
Properties
indent{String} For “pretty” printing, the indent string will be used once for each indentation level.
space{String} For “pretty” printing, the space string will be used after the “:” separating a name/value pair.
newline{String} For “pretty” printing, the newline string will be used at the end of each name/value pair or array item.
level{Integer} For “pretty” printing, this is incremented/decremented during serialization.
pretty{Boolean} Serialize with extra whitespace for structure.
Functions
ZOO.Format.JSONCreate a new parser for JSON.
readDeserialize a json string.
writeSerialize an object into a JSON string.
writeIndentOutput an indentation string depending on the indentation level.
writeNewlineOutput a string representing a newline if in pretty printing mode.
writeSpaceOutput a string representing a space if in pretty printing mode.
Properties
serializeObject with properties corresponding to the serializable data types.
Functions
serialize.objectTransform an object into a JSON string.
serialize.arrayTransform an array into a JSON string.
serialize.stringTransform a string into a JSON string.
serialize.numberTransform a number into a JSON string.
serialize.booleanTransform a boolean into a JSON string.
serialize.dateTransform a date into a JSON string.

Properties

indent

{String} For “pretty” printing, the indent string will be used once for each indentation level.

space

{String} For “pretty” printing, the space string will be used after the “:” separating a name/value pair.

newline

{String} For “pretty” printing, the newline string will be used at the end of each name/value pair or array item.

level

{Integer} For “pretty” printing, this is incremented/decremented during serialization.

pretty

{Boolean} Serialize with extra whitespace for structure.  This is set by the write method.

Functions

ZOO.Format.JSON

Create a new parser for JSON.

Parameters

options{Object} An optional object whose properties will be set on this instance.

read

read: function(json,
filter)

Deserialize a json string.

Parameters

json{String} A JSON string
filter{Function} A function which will be called for every key and value at every level of the final result.  Each value will be replaced by the result of the filter function.  This can be used to reform generic objects into instances of classes, or to transform date strings into Date objects.

Returns

{Object} An object, array, string, or number .

write

write: function(value,
pretty)

Serialize an object into a JSON string.

Parameters

value{String} The object, array, string, number, boolean or date to be serialized.
pretty{Boolean} Structure the output with newlines and indentation.  Default is false.

Returns

{String} The JSON string representation of the input value.

writeIndent

writeIndent: function()

Output an indentation string depending on the indentation level.

Returns

{String} An appropriate indentation string.

writeNewline

writeNewline: function()

Output a string representing a newline if in pretty printing mode.

Returns

{String} A string representing a new line.

writeSpace

writeSpace: function()

Output a string representing a space if in pretty printing mode.

Returns

{String} A space.

Properties

serialize

Object with properties corresponding to the serializable data types.  Property values are functions that do the actual serializing.

Functions

serialize.object

Transform an object into a JSON string.

Parameters

object{Object} The object to be serialized.

Returns

{String} A JSON string representing the object.

serialize.array

Transform an array into a JSON string.

Parameters

array{Array} The array to be serialized

Returns

{String} A JSON string representing the array.

serialize.string

Transform a string into a JSON string.

Parameters

string{String} The string to be serialized

Returns

{String} A JSON string representing the string.

serialize.number

Transform a number into a JSON string.

Parameters

number{Number} The number to be serialized.

Returns

{String} A JSON string representing the number.

serialize.boolean

Transform a boolean into a JSON string.

Parameters

bool{Boolean} The boolean to be serialized.

Returns

{String} A JSON string representing the boolean.

serialize.date

Transform a date into a JSON string.

Parameters

date{Date} The date to be serialized.

Returns

{String} A JSON string representing the date.

ZOO.Format.GeoJSON

Read and write GeoJSON.  Create a new parser with the ZOO.Format.GeoJSON constructor.

Inherits from

Summary
Functions
ZOO.Format.GeoJSONCreate a new parser for GeoJSON.
readDeserialize a GeoJSON string.
isValidTypeCheck if a GeoJSON object is a valid representative of the given type.
parseFeatureConvert a feature object from GeoJSON into an ZOO.Feature.
parseGeometryConvert a geometry object from GeoJSON into an ZOO.Geometry.
Properties
parseCoordsObject with properties corresponding to the GeoJSON geometry types.
Functions
parseCoords.pointConvert a coordinate array from GeoJSON into an ZOO.Geometry.Point.
parseCoords.multipointConvert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPoint.
parseCoords.linestringConvert a coordinate array from GeoJSON into an ZOO.Geometry.LineString.
parseCoords.multilinestringConvert a coordinate array from GeoJSON into an ZOO.Geometry.MultiLineString.
parseCoords.polygonConvert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
parseCoords.multipolygonConvert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPolygon.
parseCoords.boxConvert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
writeSerialize a feature, geometry, array of features into a GeoJSON string.
createCRSObjectCreate the CRS object for an object.
Properties
extractObject with properties corresponding to the GeoJSON types.
Functions
extract.featureReturn a partial GeoJSON object representing a single feature.
extract.geometryReturn a GeoJSON object representing a single geometry.
extract.pointReturn an array of coordinates from a point.
extract.multipointReturn an array of coordinates from a multipoint.
extract.linestringReturn an array of coordinate arrays from a linestring.
extract.multilinestringReturn an array of linestring arrays from a linestring.
extract.polygonReturn an array of linear ring arrays from a polygon.
extract.multipolygonReturn an array of polygon arrays from a multipolygon.
extract.collectionReturn an array of geometries from a geometry collection.

Functions

ZOO.Format.GeoJSON

Create a new parser for GeoJSON.

Parameters

options{Object} An optional object whose properties will be set on this instance.

read

read: function(json,
type,
filter)

Deserialize a GeoJSON string.

Parameters

json{String} A GeoJSON string
type{String} Optional string that determines the structure of the output.  Supported values are “Geometry”, “Feature”, and “FeatureCollection”.  If absent or null, a default of “FeatureCollection” is assumed.
filter{Function} A function which will be called for every key and value at every level of the final result.  Each value will be replaced by the result of the filter function.  This can be used to reform generic objects into instances of classes, or to transform date strings into Date objects.

Returns

{Object} The return depends on the value of the type argument.  If type is “FeatureCollection” (the default), the return will be an array of ZOO.Feature.  If type is “Geometry”, the input json must represent a single geometry, and the return will be an ZOO.Geometry.  If type is “Feature”, the input json must represent a single feature, and the return will be an ZOO.Feature.

isValidType

isValidType: function(obj,
type)

Check if a GeoJSON object is a valid representative of the given type.

Returns

{Boolean} The object is valid GeoJSON object of the given type.

parseFeature

parseFeature: function(obj)

Convert a feature object from GeoJSON into an ZOO.Feature.

Parameters

obj{Object} An object created from a GeoJSON object

Returns

{ZOO.Feature} A feature.

parseGeometry

parseGeometry: function(obj)

Convert a geometry object from GeoJSON into an ZOO.Geometry.

Parameters

obj{Object} An object created from a GeoJSON object

Returns

{ZOO.Geometry} A geometry.

Properties

parseCoords

Object with properties corresponding to the GeoJSON geometry types.  Property values are functions that do the actual parsing.

Functions

parseCoords.point

Convert a coordinate array from GeoJSON into an ZOO.Geometry.Point.

Parameters

array{Object} The coordinates array from the GeoJSON fragment.

Returns

{ZOO.Geometry.Point} A geometry.

parseCoords.multipoint

Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPoint.

Parameters

array{Object} The coordinates array from the GeoJSON fragment.

Returns

{ZOO.Geometry.MultiPoint} A geometry.

parseCoords.linestring

Convert a coordinate array from GeoJSON into an ZOO.Geometry.LineString.

Parameters

array{Object} The coordinates array from the GeoJSON fragment.

Returns

{ZOO.Geometry.LineString} A geometry.

parseCoords.multilinestring

Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiLineString.

Parameters

array{Object} The coordinates array from the GeoJSON fragment.

Returns

{ZOO.Geometry.MultiLineString} A geometry.

parseCoords.polygon

Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.

Parameters

array{Object} The coordinates array from the GeoJSON fragment.

Returns

{ZOO.Geometry.Polygon} A geometry.

parseCoords.multipolygon

Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPolygon.

Parameters

array{Object} The coordinates array from the GeoJSON fragment.

Returns

{ZOO.Geometry.MultiPolygon} A geometry.

parseCoords.box

Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.

Parameters

array{Object} The coordinates array from the GeoJSON fragment.

Returns

{ZOO.Geometry.Polygon} A geometry.

write

write: function(obj,
pretty)

Serialize a feature, geometry, array of features into a GeoJSON string.

Parameters

obj{Object} An ZOO.Feature, ZOO.Geometry, or an array of features.
pretty{Boolean} Structure the output with newlines and indentation.  Default is false.

Returns

{String} The GeoJSON string representation of the input geometry, features, or array of features.

createCRSObject

createCRSObject: function(object)

Create the CRS object for an object.

Parameters

object{ZOO.Feature}

Returns

{Object} An object which can be assigned to the crs property of a GeoJSON object.

Properties

extract

Object with properties corresponding to the GeoJSON types.  Property values are functions that do the actual value extraction.

Functions

extract.feature

Return a partial GeoJSON object representing a single feature.

Parameters

feature{ZOO.Feature}

Returns

{Object} An object representing the point.

extract.geometry

Return a GeoJSON object representing a single geometry.

Parameters

geometry{ZOO.Geometry}

Returns

{Object} An object representing the geometry.

extract.point

Return an array of coordinates from a point.

Parameters

point{ZOO.Geometry.Point}

Returns

{Array} An array of coordinates representing the point.

extract.multipoint

Return an array of coordinates from a multipoint.

Parameters

multipoint{ZOO.Geometry.MultiPoint}

Returns

{Array} An array of point coordinate arrays representing the multipoint.

extract.linestring

Return an array of coordinate arrays from a linestring.

Parameters

linestring{ZOO.Geometry.LineString}

Returns

{Array} An array of coordinate arrays representing the linestring.

extract.multilinestring

Return an array of linestring arrays from a linestring.

Parameters

multilinestring{ZOO.Geometry.MultiLineString}

Returns

{Array} An array of linestring arrays representing the multilinestring.

extract.polygon

Return an array of linear ring arrays from a polygon.

Parameters

polygon{ZOO.Geometry.Polygon}

Returns

{Array} An array of linear ring arrays representing the polygon.

extract.multipolygon

Return an array of polygon arrays from a multipolygon.

Parameters

multipolygon{ZOO.Geometry.MultiPolygon}

Returns

{Array} An array of polygon arrays representing the multipolygon

extract.collection

Return an array of geometries from a geometry collection.

Parameters

collection{ZOO.Geometry.Collection}

Returns

{Array} An array of geometry objects representing the geometry collection.

ZOO.Format.KML

Read/Write KML.  Create a new instance with the ZOO.Format.KML constructor.

Inherits from

Summary
Properties and Functions
kmlns{String} KML Namespace to use.
foldersName{String} Name of the folders.
foldersDesc{String} Description of the folders.
placemarksDesc{String} Name of the placemarks.
extractAttributes{Boolean} Extract attributes from KML.
ZOO.Format.KMLCreate a new parser for KML.
parseFeaturesLoop through all Placemark nodes and parse them.
parseFeatureThis function is the core of the KML parsing code in ZOO.
parseGeometryProperties of this object are the functions that parse geometries based on their type.
parseGeometry.pointGiven a KML node representing a point geometry, create a ZOO point geometry.
parseGeometry.linestringGiven a KML node representing a linestring geometry, create a ZOO linestring geometry.
parseGeometry.polygonGiven a KML node representing a polygon geometry, create a ZOO polygon geometry.
parseGeometry.multigeometryGiven a KML node representing a multigeometry, create a ZOO geometry collection.
parseAttributes
parseExtendedDataParse ExtendedData from KML.
writeAccept Feature Collection, and return a string.
createPlacemarkCreates and returns a KML placemark node representing the given feature.
buildGeometryNodeBuilds and returns a KML geometry node with the given geometry.
buildGeometryObject containing methods to do the actual geometry node building based on geometry type.
buildGeometry.pointGiven a ZOO point geometry, create a KML point.
buildGeometry.multipointGiven a ZOO multipoint geometry, create a KML GeometryCollection.
buildGeometry.linestringGiven a ZOO linestring geometry, create a KML linestring.
buildGeometry.multilinestringGiven a ZOO multilinestring geometry, create a KML GeometryCollection.
buildGeometry.linearringGiven a ZOO linearring geometry, create a KML linearring.
buildGeometry.polygonGiven a ZOO polygon geometry, create a KML polygon.
buildGeometry.multipolygonGiven a ZOO multipolygon geometry, create a KML GeometryCollection.
buildGeometry.collectionGiven a ZOO geometry collection, create a KML MultiGeometry.
buildCoordinatesNodeBuilds and returns the KML coordinates node with the given geometry <coordinates>...</coordinates>

Properties and Functions

kmlns

{String} KML Namespace to use.  Defaults to 2.2 namespace.

foldersName

{String} Name of the folders.  Default is “ZOO export”.  If set to null, no name element will be created.

foldersDesc

{String} Description of the folders.  Default is “Exported on [date].”  If set to null, no description element will be created.

placemarksDesc

{String} Name of the placemarks.  Default is “No description available”.

extractAttributes

{Boolean} Extract attributes from KML.  Default is true.  Extracting styleUrls requires this to be set to true

ZOO.Format.KML

Create a new parser for KML.

Parameters

options{Object} An optional object whose properties will be set on this instance.

parseFeatures

parseFeatures: function(nodes)

Loop through all Placemark nodes and parse them.  Will create a list of features

Parameters

nodes{Array} of {E4XElement} data to read/parse.
options{Object} Hash of options

parseFeature

parseFeature: function(node)

This function is the core of the KML parsing code in ZOO.  It creates the geometries that are then attached to the returned feature, and calls parseAttributes() to get attribute data out.

Parameters

node{E4XElement}

Returns

{ZOO.Feature} A vector feature.

parseGeometry

Properties of this object are the functions that parse geometries based on their type.

parseGeometry.point

Given a KML node representing a point geometry, create a ZOO point geometry.

Parameters

node{E4XElement} A KML Point node.

Returns

{ZOO.Geometry.Point} A point geometry.

parseGeometry.linestring

Given a KML node representing a linestring geometry, create a ZOO linestring geometry.

Parameters

node{E4XElement} A KML LineString node.

Returns

{ZOO.Geometry.LineString} A linestring geometry.

parseGeometry.polygon

Given a KML node representing a polygon geometry, create a ZOO polygon geometry.

Parameters

node{E4XElement} A KML Polygon node.

Returns

{ZOO.Geometry.Polygon} A polygon geometry.

parseGeometry.multigeometry

Given a KML node representing a multigeometry, create a ZOO geometry collection.

Parameters

node{E4XElement} A KML MultiGeometry node.

Returns

{ZOO.Geometry.Collection} A geometry collection.

parseAttributes

parseAttributes: function(node)

Parameters

node{E4XElement}

Returns

{Object} An attributes object.

parseExtendedData

parseExtendedData: function(node)

Parse ExtendedData from KML.  Limited support for schemas/datatypes.  See http://code.google.com/apis/kml/documentation/kmlreference.html#extendeddata for more information on extendeddata.

Parameters

node{E4XElement}

Returns

{Object} An attributes object.

write

write: function(features)

Accept Feature Collection, and return a string.

Parameters

features{Array(ZOO.Feature} An array of features.

Returns

{String} A KML string.

createPlacemark

createPlacemark: function(feature)

Creates and returns a KML placemark node representing the given feature.

Parameters

feature{ZOO.Feature}

Returns

{E4XElement}

buildGeometryNode

buildGeometryNode: function(geometry)

Builds and returns a KML geometry node with the given geometry.

Parameters

geometry{ZOO.Geometry}

Returns

{E4XElement}

buildGeometry

Object containing methods to do the actual geometry node building based on geometry type.

buildGeometry.point

Given a ZOO point geometry, create a KML point.

Parameters

geometry{ZOO.Geometry.Point} A point geometry.

Returns

{E4XElement} A KML point node.

buildGeometry.multipoint

Given a ZOO multipoint geometry, create a KML GeometryCollection.

Parameters

geometry{ZOO.Geometry.MultiPoint} A multipoint geometry.

Returns

{E4XElement} A KML GeometryCollection node.

buildGeometry.linestring

Given a ZOO linestring geometry, create a KML linestring.

Parameters

geometry{ZOO.Geometry.LineString} A linestring geometry.

Returns

{E4XElement} A KML linestring node.

buildGeometry.multilinestring

Given a ZOO multilinestring geometry, create a KML GeometryCollection.

Parameters

geometry{ZOO.Geometry.MultiLineString} A multilinestring geometry.

Returns

{E4XElement} A KML GeometryCollection node.

buildGeometry.linearring

Given a ZOO linearring geometry, create a KML linearring.

Parameters

geometry{ZOO.Geometry.LinearRing} A linearring geometry.

Returns

{E4XElement} A KML linearring node.

buildGeometry.polygon

Given a ZOO polygon geometry, create a KML polygon.

Parameters

geometry{ZOO.Geometry.Polygon} A polygon geometry.

Returns

{E4XElement} A KML polygon node.

buildGeometry.multipolygon

Given a ZOO multipolygon geometry, create a KML GeometryCollection.

Parameters

geometry{ZOO.Geometry.Point} A multipolygon geometry.

Returns

{E4XElement} A KML GeometryCollection node.

buildGeometry.collection

Given a ZOO geometry collection, create a KML MultiGeometry.

Parameters

geometry{ZOO.Geometry.Collection} A geometry collection.

Returns

{E4XElement} A KML MultiGeometry node.

buildCoordinatesNode

buildCoordinatesNode: function(geometry)

Builds and returns the KML coordinates node with the given geometry <coordinates>...</coordinates>

Parameters

geometry{ZOO.Geometry}

Return

{E4XElement}

ZOO.Format.GML

Read/Write GML.  Create a new instance with the ZOO.Format.GML constructor.  Supports the GML simple features profile.

Inherits from

Summary
Properties and Functions
schemaLocation{String} Schema location for a particular minor version.
namespaces{Object} Mapping of namespace aliases to namespace URIs.
defaultPrefix
collectionName{String} Name of featureCollection element.
featureName{String} Element name for features.
geometryName{String} Name of geometry element.
xy{Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.
extractAttributes{Boolean} Could we extract attributes
ZOO.Format.GMLCreate a new parser for GML.
readRead data from a string, and return a list of features.
parseFeatureThis function is the core of the GML parsing code in ZOO.
parseGeometryProperties of this object are the functions that parse geometries based on their type.
parseGeometry.pointGiven a GML node representing a point geometry, create a ZOO point geometry.
parseGeometry.multipointGiven a GML node representing a multipoint geometry, create a ZOO multipoint geometry.
parseGeometry.linestringGiven a GML node representing a linestring geometry, create a ZOO linestring geometry.
parseGeometry.multilinestringGiven a GML node representing a multilinestring geometry, create a ZOO multilinestring geometry.
parseGeometry.polygonGiven a GML node representing a polygon geometry, create a ZOO polygon geometry.
parseGeometry.multipolygonGiven a GML node representing a multipolygon geometry, create a ZOO multipolygon geometry.
parseGeometry.polygonGiven a GML node representing an envelope, create a ZOO polygon geometry.
parseAttributes
writeGenerate a GML document string given a list of features.
createFeatureAccept an ZOO.Feature, and build a GML node for it.
buildGeometryNode
buildGeometryObject containing methods to do the actual geometry node building based on geometry type.
buildGeometry.pointGiven a ZOO point geometry, create a GML point.
buildGeometry.multipointGiven a ZOO multipoint geometry, create a GML multipoint.
buildGeometry.linestringGiven a ZOO linestring geometry, create a GML linestring.
buildGeometry.multilinestringGiven a ZOO multilinestring geometry, create a GML multilinestring.
buildGeometry.linearringGiven a ZOO linearring geometry, create a GML linearring.
buildGeometry.polygonGiven an ZOO polygon geometry, create a GML polygon.
buildGeometry.multipolygonGiven a ZOO multipolygon geometry, create a GML multipolygon.
buildCoordinatesNodebuilds the coordinates XmlNode

Properties and Functions

schemaLocation

{String} Schema location for a particular minor version.

namespaces

{Object} Mapping of namespace aliases to namespace URIs.

defaultPrefix

collectionName

{String} Name of featureCollection element.

featureName

{String} Element name for features.  Default is “sql_statement”.

geometryName

{String} Name of geometry element.  Defaults to “geometryProperty”.

xy

{Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.

extractAttributes

{Boolean} Could we extract attributes

ZOO.Format.GML

Create a new parser for GML.

Parameters

options{Object} An optional object whose properties will be set on this instance.

read

read: function(data)

Read data from a string, and return a list of features.

Parameters

data{String} data to read/parse.

Returns

{Array(ZOO.Feature)} An array of features.

parseFeature

parseFeature: function(node)

This function is the core of the GML parsing code in ZOO.  It creates the geometries that are then attached to the returned feature, and calls parseAttributes() to get attribute data out.

Parameters

node{E4XElement} A GML feature node.

parseGeometry

Properties of this object are the functions that parse geometries based on their type.

parseGeometry.point

Given a GML node representing a point geometry, create a ZOO point geometry.

Parameters

node{E4XElement} A GML node.

Returns

{ZOO.Geometry.Point} A point geometry.

parseGeometry.multipoint

Given a GML node representing a multipoint geometry, create a ZOO multipoint geometry.

Parameters

node{E4XElement} A GML node.

Returns

{ZOO.Geometry.MultiPoint} A multipoint geometry.

parseGeometry.linestring

Given a GML node representing a linestring geometry, create a ZOO linestring geometry.

Parameters

node{E4XElement} A GML node.

Returns

{ZOO.Geometry.LineString} A linestring geometry.

parseGeometry.multilinestring

Given a GML node representing a multilinestring geometry, create a ZOO multilinestring geometry.

Parameters

node{E4XElement} A GML node.

Returns

{ZOO.Geometry.MultiLineString} A multilinestring geometry.

parseGeometry.polygon

Given a GML node representing a polygon geometry, create a ZOO polygon geometry.

Parameters

node{E4XElement} A GML node.

Returns

{ZOO.Geometry.Polygon} A polygon geometry.

parseGeometry.multipolygon

Given a GML node representing a multipolygon geometry, create a ZOO multipolygon geometry.

Parameters

node{E4XElement} A GML node.

Returns

{ZOO.Geometry.MultiPolygon} A multipolygon geometry.

parseGeometry.polygon

Given a GML node representing an envelope, create a ZOO polygon geometry.

Parameters

node{E4XElement} A GML node.

Returns

{ZOO.Geometry.Polygon} A polygon geometry.

parseAttributes

parseAttributes: function(node)

Parameters

node{<E4XElement>}

Returns

{Object} An attributes object.

write

write: function(features)

Generate a GML document string given a list of features.

Parameters

features{Array(ZOO.Feature)} List of features to serialize into a string.

Returns

{String} A string representing the GML document.

createFeature

createFeature: function(feature)

Accept an ZOO.Feature, and build a GML node for it.

Parameters

feature{ZOO.Feature} The feature to be built as GML.

Returns

{E4XElement} A node reprensting the feature in GML.

buildGeometryNode

buildGeometryNode: function(geometry)

Parameters

geometry{ZOO.Geometry} The geometry to be built as GML.

Returns

{E4XElement} A node reprensting the geometry in GML.

buildGeometry

Object containing methods to do the actual geometry node building based on geometry type.

buildGeometry.point

Given a ZOO point geometry, create a GML point.

Parameters

geometry{ZOO.Geometry.Point} A point geometry.

Returns

{E4XElement} A GML point node.

buildGeometry.multipoint

Given a ZOO multipoint geometry, create a GML multipoint.

Parameters

geometry{ZOO.Geometry.MultiPoint} A multipoint geometry.

Returns

{E4XElement} A GML multipoint node.

buildGeometry.linestring

Given a ZOO linestring geometry, create a GML linestring.

Parameters

geometry{ZOO.Geometry.LineString} A linestring geometry.

Returns

{E4XElement} A GML linestring node.

buildGeometry.multilinestring

Given a ZOO multilinestring geometry, create a GML multilinestring.

Parameters

geometry{ZOO.Geometry.MultiLineString} A multilinestring geometry.

Returns

{E4XElement} A GML multilinestring node.

buildGeometry.linearring

Given a ZOO linearring geometry, create a GML linearring.

Parameters

geometry{ZOO.Geometry.LinearRing} A linearring geometry.

Returns

{E4XElement} A GML linearring node.

buildGeometry.polygon

Given an ZOO polygon geometry, create a GML polygon.

Parameters

geometry{ZOO.Geometry.Polygon} A polygon geometry.

Returns

{E4XElement} A GML polygon node.

buildGeometry.multipolygon

Given a ZOO multipolygon geometry, create a GML multipolygon.

Parameters

geometry{ZOO.Geometry.MultiPolygon} A multipolygon geometry.

Returns

{E4XElement} A GML multipolygon node.

buildCoordinatesNode

buildCoordinatesNode: function(geometry)

builds the coordinates XmlNode

<gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>

Parameters: geometry - {ZOO.Geometry}

Returns

{E4XElement} created E4XElement

ZOO.Format.WPS

Read/Write WPS.  Create a new instance with the ZOO.Format.WPS constructor.  Supports only parseExecuteResponse.

Inherits from

Summary
Properties and Functions
schemaLocation{String} Schema location for a particular minor version.
namespaces{Object} Mapping of namespace aliases to namespace URIs.
read
parseExecuteResponse
parseDataObject containing methods to analyse data response.
parseData.complexdataGiven an Object representing the WPS complex data response.
parseData.literaldataGiven an Object representing the WPS literal data response.
parseData.referenceGiven an Object representing the WPS reference response.

Properties and Functions

schemaLocation

{String} Schema location for a particular minor version.

namespaces

{Object} Mapping of namespace aliases to namespace URIs.

read

read:function(data)

Parameters

data{String} A WPS xml document

Returns

{Object} Execute response.

parseExecuteResponse

parseExecuteResponse: function(node)

Parameters

node{E4XElement} A WPS ExecuteResponse document

Returns

{Object} Execute response.

parseData

Object containing methods to analyse data response.

parseData.complexdata

Given an Object representing the WPS complex data response.

Parameters

node{E4XElement} A WPS node.

Returns

{Object} A WPS complex data response.

parseData.literaldata

Given an Object representing the WPS literal data response.

Parameters

node{E4XElement} A WPS node.

Returns

{Object} A WPS literal data response.

parseData.reference

Given an Object representing the WPS reference response.

Parameters

node{E4XElement} A WPS node.

Returns

{Object} A WPS reference response.

ZOO.Feature

Vector features use the ZOO.Geometry classes as geometry description.  They have an ‘attributes’ property, which is the data object

Summary
Properties
fid{String}
geometry{ZOO.Geometry}
attributes{Object} This object holds arbitrary properties that describe the feature.
bounds{ZOO.Bounds} The box bounding that feature’s geometry, that property can be set by an ZOO.Format object when deserializing the feature, so in most cases it represents an information set by the server.
Functions
ZOO.FeatureCreate a vector feature.
destroynullify references to prevent circular references and memory leaks
cloneCreate a clone of this vector feature.
moveMoves the feature and redraws it at its new location

Properties

fid

{String}

geometry

attributes

{Object} This object holds arbitrary properties that describe the feature.

bounds

{ZOO.Bounds} The box bounding that feature’s geometry, that property can be set by an ZOO.Format object when deserializing the feature, so in most cases it represents an information set by the server.

Functions

ZOO.Feature

Create a vector feature.

Parameters

geometry{ZOO.Geometry} The geometry that this feature represents.
attributes{Object} An optional object that will be mapped to the attributes property.

destroy

destroy: function()

nullify references to prevent circular references and memory leaks

clone

clone: function ()

Create a clone of this vector feature.  Does not set any non-standard properties.

Returns

{ZOO.Feature} An exact clone of this vector feature.

move

move: function(x,
y)

Moves the feature and redraws it at its new location

Parameters

x{Float}
y{Float}

ZOO.Geometry

A Geometry is a description of a geographic object.  Create an instance of this class with the ZOO.Geometry constructor.  This is a base class, typical geometry types are described by subclasses of this class.

Summary
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.GeometryCreates a geometry object.
destroyDestroy this geometry.
cloneCreate a clone of this geometry.
extendBoundsExtend the existing bounds to include the new bounds.
clearBoundsNullify this components bounds and that of its parent as well.
getBoundsGet the bounds for this Geometry.
calculateBoundsRecalculate the bounds for the geometry.
toStringReturns the Well-Known Text representation of a geometry
ZOO.Geometry.fromWKTGenerate 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

{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.

ZOO.Geometry.Collection

A Collection is exactly what it sounds like: A collection of different Geometries.  These are stored in the local parameter components (which can be passed as a parameter to the constructor).

As new geometries are added to the collection, they are NOT cloned.  When removing geometries, they need to be specified by reference (ie you have to pass in the exact geometry to be removed).

The <getArea> and getLength functions here merely iterate through the components, summing their respective areas and lengths.

Create a new instance with the ZOO.Geometry.Collection constructor.

Inerhits from

Summary
Properties
components{Array(ZOO.Geometry)} The component parts of this geometry
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.CollectionCreates a Geometry Collection -- a list of geoms.
destroyDestroy this geometry.
cloneClone this geometry.
getComponentsStringGet a string representing the components for this collection
calculateBoundsRecalculate the bounds by iterating through the components and calling calling extendBounds() on each item.
addComponentAdd a new component (geometry) to the collection.
removeComponentsRemove components from this geometry.
removeComponentRemove a component from this geometry.
getLengthCalculate the length of this geometry
getCentroid{ZOO.Geometry.Point} The centroid of the collection
getGeodesicLengthCalculate the approximate length of the geometry were it projected onto the earth.
moveMoves a geometry by the given displacement along positive x and y axes.
rotateRotate a geometry around some origin
resizeResize a geometry relative to some origin.
equalsDetermine whether another geometry is equivalent to this one.
transformReproject the components geometry from source to dest.
intersectsDetermine if the input geometry intersects this one.
getVerticesReturn a list of all points in this geometry.

Properties

components

{Array(ZOO.Geometry)} The component parts of this geometry

componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include.  A null value means the component types are not restricted.

Functions

ZOO.Geometry.Collection

Creates a Geometry Collection -- a list of geoms.

Parameters

components{Array(ZOO.Geometry)} Optional array of geometries

destroy

destroy: function ()

Destroy this geometry.

clone

clone: function()

Clone this geometry.

Returns

{ZOO.Geometry.Collection} An exact clone of this collection

getComponentsString

getComponentsString: function()

Get a string representing the components for this collection

Returns

{String} A string representation of the components of this geometry

calculateBounds

calculateBounds: function()

Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item.

addComponent

addComponent: function(component,
index)

Add a new component (geometry) to the collection.  If this.componentTypes is set, then the component class name must be in the componentTypes array.

The bounds cache is reset.

Parameters

component{ZOO.Geometry} A geometry to add
index{int} Optional index into the array to insert the component

Returns

{Boolean} The component geometry was successfully added

removeComponents

removeComponents: function(components)

Remove components from this geometry.

Parameters

components{Array(ZOO.Geometry)} The components to be removed

removeComponent

removeComponent: function(component)

Remove a component from this geometry.

Parameters

component{ZOO.Geometry}

getLength

getLength: function()

Calculate the length of this geometry

Returns

{Float} The length of the geometry

getCentroid

getCentroid: function()

Returns

{ZOO.Geometry.Point} The centroid of the collection

getGeodesicLength

getGeodesicLength: function(projection)

Calculate the approximate length of the geometry were it projected onto the earth.

projection{ZOO.Projection} The spatial reference system for the geometry coordinates.  If not provided, Geographic/WGS84 is assumed.

Returns

{Float} The appoximate geodesic length of the geometry in meters.

move

move: function(x,
y)

Moves a geometry by the given displacement along positive x and y axes.  This modifies the position of the geometry and clears the cached bounds.

Parameters

x{Float} Distance to move geometry in positive x direction.
y{Float} Distance to move geometry in positive y direction.

rotate

rotate: function(angle,
origin)

Rotate a geometry around some origin

Parameters

angle{Float} Rotation angle in degrees (measured counterclockwise from the positive x-axis)
origin{ZOO.Geometry.Point} Center point for the rotation

resize

resize: function(scale,
origin,
ratio)

Resize a geometry relative to some origin.  Use this method to apply a uniform scaling to a geometry.

Parameters

scale{Float} Factor by which to scale the geometry.  A scale of 2 doubles the size of the geometry in each dimension (lines, for example, will be twice as long, and polygons will have four times the area).
origin{ZOO.Geometry.Point} Point of origin for resizing
ratio{Float} Optional x:y ratio for resizing.  Default ratio is 1.

Returns

{ZOO.Geometry}The current geometry.

equals

equals: function(geometry)

Determine whether another geometry is equivalent to this one.  Geometries are considered equivalent if all components have the same coordinates.

Parameters

geom{ZOO.Geometry} The geometry to test.

Returns

{Boolean} The supplied geometry is equivalent to this geometry.

transform

transform: function(source,
dest)

Reproject the components geometry from source to dest.

Parameters

source{ZOO.Projection}
dest{ZOO.Projection}

Returns

{ZOO.Geometry}

intersects

intersects: function(geometry)

Determine if the input geometry intersects this one.

Parameters

geometry{ZOO.Geometry} Any type of geometry.

Returns

{Boolean} The input geometry intersects this one.

getVertices

getVertices: function(nodes)

Return a list of all points in this geometry.

Parameters

nodes{Boolean} For lines, only return vertices that are endpoints.  If false, for lines, only vertices that are not endpoints will be returned.  If not provided, all vertices will be returned.

Returns

{Array} A list of all vertices in the geometry.

ZOO.Geometry.Point

Point geometry class.

Inherits from

Summary
Properties
x{float}
y{float}
Functions
ZOO.Geometry.PointConstruct a point geometry.
clone{ZOO.Geometry.Point} An exact clone of this ZOO.Geometry.Point
calculateBoundsCreate a new Bounds based on the x/y
equalsDetermine whether another geometry is equivalent to this one.
toShortString{String} Shortened String representation of Point object.
moveMoves a geometry by the given displacement along positive x and y axes.
rotateRotate a point around another.
getCentroid{ZOO.Geometry.Point} The centroid of the collection
resizeResize a point relative to some origin.
intersectsDetermine if the input geometry intersects this one.
transformTranslate the x,y properties of the point from source to dest.
getVerticesReturn a list of all points in this geometry.

Properties

x

{float}

y

{float}

Functions

ZOO.Geometry.Point

Construct a point geometry.

Parameters

x{float}
y{float}

clone

clone: function(obj)

Returns

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

calculateBounds

calculateBounds: function ()

Create a new Bounds based on the x/y

equals

equals: function(geom)

Determine whether another geometry is equivalent to this one.  Geometries are considered equivalent if all components have the same coordinates.

Parameters

geom{ZOO.Geometry.Point} The geometry to test.

Returns

{Boolean} The supplied geometry is equivalent to this geometry.

toShortString

toShortString: function()

Returns

{String} Shortened String representation of Point object.  (ex.  <i>”5, 42”</i>)

move

move: function(x,
y)

Moves a geometry by the given displacement along positive x and y axes.  This modifies the position of the geometry and clears the cached bounds.

Parameters

x{Float} Distance to move geometry in positive x direction.
y{Float} Distance to move geometry in positive y direction.

rotate

rotate: function(angle,
origin)

Rotate a point around another.

Parameters

angle{Float} Rotation angle in degrees (measured counterclockwise from the positive x-axis)
origin{ZOO.Geometry.Point} Center point for the rotation

getCentroid

getCentroid: function()

Returns

{ZOO.Geometry.Point} The centroid of the collection

resize

resize: function(scale,
origin,
ratio)

Resize a point relative to some origin.  For points, this has the effect of scaling a vector (from the origin to the point).  This method is more useful on geometry collection subclasses.

Parameters

scale{Float} Ratio of the new distance from the origin to the old distance from the origin.  A scale of 2 doubles the distance between the point and origin.
origin{ZOO.Geometry.Point} Point of origin for resizing
ratio{Float} Optional x:y ratio for resizing.  Default ratio is 1.

Returns

{ZOO.Geometry}The current geometry.

intersects

intersects: function(geometry)

Determine if the input geometry intersects this one.

Parameters

geometry{ZOO.Geometry} Any type of geometry.

Returns

{Boolean} The input geometry intersects this one.

transform

transform: function(source,
dest)

Translate the x,y properties of the point from source to dest.

Parameters

source{ZOO.Projection}
dest{ZOO.Projection}

Returns

{ZOO.Geometry}

getVertices

getVertices: function(nodes)

Return a list of all points in this geometry.

Parameters

nodes{Boolean} For lines, only return vertices that are endpoints.  If false, for lines, only vertices that are not endpoints will be returned.  If not provided, all vertices will be returned.

Returns

{Array} A list of all vertices in the geometry.

ZOO.Geometry.Surface

Surface geometry class.

Inherits from

ZOO.Geometry.MultiPoint

MultiPoint is a collection of Points.  Create a new instance with the ZOO.Geometry.MultiPoint constructor.

Inherits from

Summary
Properties
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.MultiPointCreate a new MultiPoint Geometry
addPointWrapper for ZOO.Geometry.Collection.addComponent
removePointWrapper for ZOO.Geometry.Collection.removeComponent

Properties

componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include.  A null value means the component types are not restricted.

Functions

ZOO.Geometry.MultiPoint

Create a new MultiPoint Geometry

Parameters

components{Array(ZOO.Geometry.Point)}

Returns

{ZOO.Geometry.MultiPoint}

addPoint

addPoint: function(point,
index)

Wrapper for ZOO.Geometry.Collection.addComponent

Parameters

point{ZOO.Geometry.Point} Point to be added
index{Integer} Optional index

removePoint

removePoint: function(point)

Wrapper for ZOO.Geometry.Collection.removeComponent

Parameters

point{ZOO.Geometry.Point} Point to be removed

ZOO.Geometry.Curve

A Curve is a MultiPoint, whose points are assumed to be connected.  To this end, we provide a “getLength()” function, which iterates through the points, summing the distances between them.

Inherits

Summary
Properties
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.Curve
getLength{Float} The length of the curve

Properties

componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include.  A null value means the component types are not restricted.

Functions

ZOO.Geometry.Curve

Parameters

point{Array(ZOO.Geometry.Point)}

getLength

getLength: function()

Returns

{Float} The length of the curve

ZOO.Geometry.LineString

A LineString is a Curve which, once two points have been added to it, can never be less than two points long.

Inherits from

Summary
Functions
ZOO.Geometry.LineStringCreate a new LineString geometry
removeComponentOnly allows removal of a point if there are three or more points in the linestring.
intersectsTest for instersection between two geometries.
getSortedSegments{Array} An array of segment objects.
splitWithSegmentSplit this geometry with the given segment.
splitUse this geometry (the source) to attempt to split a target geometry.
splitWithSplit this geometry (the target) with the given geometry (the source).
getVerticesReturn a list of all points in this geometry.

Functions

ZOO.Geometry.LineString

Create a new LineString geometry

Parameters

points{Array(ZOO.Geometry.Point)} An array of points used to generate the linestring

removeComponent

removeComponent: function(point)

Only allows removal of a point if there are three or more points in the linestring.  (otherwise the result would be just a single point)

Parameters

point{ZOO.Geometry.Point} The point to be removed

intersects

intersects: function(geometry)

Test for instersection between two geometries.  This is a cheapo implementation of the Bently-Ottmann algorigithm.  It doesn’t really keep track of a sweep line data structure.  It is closer to the brute force method, except that segments are sorted and potential intersections are only calculated when bounding boxes intersect.

Parameters

geometry{ZOO.Geometry}

Returns

{Boolean} The input geometry intersects this geometry.

getSortedSegments

getSortedSegments: function()

Returns

{Array} An array of segment objects.  Segment objects have properties x1, y1, x2, and y2.  The start point is represented by x1 and y1.  The end point is represented by x2 and y2.  Start and end are ordered so that x1 < x2.

splitWithSegment

splitWithSegment: function(seg,
options)

Split this geometry with the given segment.

Parameters

seg{Object} An object with x1, y1, x2, and y2 properties referencing segment endpoint coordinates.
options{Object} Properties of this object will be used to determine how the split is conducted.

Valid options

edge{Boolean} Allow splitting when only edges intersect.  Default is true.  If false, a vertex on the source segment must be within the tolerance distance of the intersection to be considered a split.
tolerance{Number} If a non-null value is provided, intersections within the tolerance distance of one of the source segment’s endpoints will be assumed to occur at the endpoint.

Returns

{Object} An object with lines and points properties.  If the given segment intersects this linestring, the lines array will reference geometries that result from the split.  The points array will contain all intersection points.  Intersection points are sorted along the segment (in order from x1,y1 to x2,y2).

split

split: function(target,
options)

Use this geometry (the source) to attempt to split a target geometry.

Parameters

target{ZOO.Geometry} The target geometry.
options{Object} Properties of this object will be used to determine how the split is conducted.

Valid options

mutual{Boolean} Split the source geometry in addition to the target geometry.  Default is false.
edge{Boolean} Allow splitting when only edges intersect.  Default is true.  If false, a vertex on the source must be within the tolerance distance of the intersection to be considered a split.
tolerance{Number} If a non-null value is provided, intersections within the tolerance distance of an existing vertex on the source will be assumed to occur at the vertex.

Returns

{Array} A list of geometries (of this same type as the target) that result from splitting the target with the source geometry.  The source and target geometry will remain unmodified.  If no split results, null will be returned.  If mutual is true and a split results, return will be an array of two arrays - the first will be all geometries that result from splitting the source geometry and the second will be all geometries that result from splitting the target geometry.

splitWith

splitWith: function(geometry,
options)

Split this geometry (the target) with the given geometry (the source).

Parameters

geometry{ZOO.Geometry} A geometry used to split this geometry (the source).
options{Object} Properties of this object will be used to determine how the split is conducted.

Valid options

mutual{Boolean} Split the source geometry in addition to the target geometry.  Default is false.
edge{Boolean} Allow splitting when only edges intersect.  Default is true.  If false, a vertex on the source must be within the tolerance distance of the intersection to be considered a split.
tolerance{Number} If a non-null value is provided, intersections within the tolerance distance of an existing vertex on the source will be assumed to occur at the vertex.

Returns

{Array} A list of geometries (of this same type as the target) that result from splitting the target with the source geometry.  The source and target geometry will remain unmodified.  If no split results, null will be returned.  If mutual is true and a split results, return will be an array of two arrays - the first will be all geometries that result from splitting the source geometry and the second will be all geometries that result from splitting the target geometry.

getVertices

getVertices: function(nodes)

Return a list of all points in this geometry.

Parameters

nodes{Boolean} For lines, only return vertices that are endpoints.  If false, for lines, only vertices that are not endpoints will be returned.  If not provided, all vertices will be returned.

Returns

{Array} A list of all vertices in the geometry.

ZOO.Geometry.LinearRing

A Linear Ring is a special LineString which is closed.  It closes itself automatically on every addPoint/removePoint by adding a copy of the first point as the last point.

Also, as it is the first in the line family to close itself, a getArea() function is defined to calculate the enclosed area of the linearRing

Inherits

Summary
Properties
componentTypes{Array(String)} An array of class names representing the types of components that the collection can include.
Functions
ZOO.Geometry.LinearRingLinear rings are constructed with an array of points.
addComponentAdds a point to geometry components.
moveMoves a geometry by the given displacement along positive x and y axes.
rotateRotate a geometry around some origin
resizeResize a geometry relative to some origin.
transformReproject the components geometry from source to dest.
getCentroid{ZOO.Geometry.Point} The centroid of the ring
getArea
getGeodesicAreaCalculate the approximate area of the polygon were it projected onto the earth.
containsPointTest if a point is inside a linear ring.

Properties

componentTypes

{Array(String)} An array of class names representing the types of components that the collection can include.  A null value means the component types are not restricted.

Functions

ZOO.Geometry.LinearRing

Linear rings are constructed with an array of points.  This array can represent a closed or open ring.  If the ring is open (the last point does not equal the first point), the constructor will close the ring.  If the ring is already closed (the last point does equal the first point), it will be left closed.

Parameters

points{Array(ZOO.Geometry.Point)} points

addComponent

addComponent: function(point,
index)

Adds a point to geometry components.  If the point is to be added to the end of the components array and it is the same as the last point already in that array, the duplicate point is not added.  This has the effect of closing the ring if it is not already closed, and doing the right thing if it is already closed.  This behavior can be overridden by calling the method with a non-null index as the second argument.

Parameter

point{ZOO.Geometry.Point}
index{Integer} Index into the array to insert the component

Returns

{Boolean} Was the Point successfully added?

move

move: function(x,
y)

Moves a geometry by the given displacement along positive x and y axes.  This modifies the position of the geometry and clears the cached bounds.

Parameters

x{Float} Distance to move geometry in positive x direction.
y{Float} Distance to move geometry in positive y direction.

rotate

rotate: function(angle,
origin)

Rotate a geometry around some origin

Parameters

angle{Float} Rotation angle in degrees (measured counterclockwise from the positive x-axis)
origin{ZOO.Geometry.Point} Center point for the rotation

resize

resize: function(scale,
origin,
ratio)

Resize a geometry relative to some origin.  Use this method to apply a uniform scaling to a geometry.

Parameters

scale{Float} Factor by which to scale the geometry.  A scale of 2 doubles the size of the geometry in each dimension (lines, for example, will be twice as long, and polygons will have four times the area).
origin{ZOO.Geometry.Point} Point of origin for resizing
ratio{Float} Optional x:y ratio for resizing.  Default ratio is 1.

Returns

{ZOO.Geometry}The current geometry.

transform

transform: function(source,
dest)

Reproject the components geometry from source to dest.

Parameters

source{ZOO.Projection}
dest{ZOO.Projection}

Returns

{ZOO.Geometry}

getCentroid

getCentroid: function()

Returns

{ZOO.Geometry.Point} The centroid of the ring

getArea

getArea: function()
NoteThe area is positive if the ring is oriented CW, otherwise it will be negative.

Returns

{Float} The signed area for a ring.

getGeodesicArea

getGeodesicArea: function(projection)

Calculate the approximate area of the polygon were it projected onto the earth.  Note that this area will be positive if ring is oriented clockwise, otherwise it will be negative.

Parameters

projection{ZOO.Projection} The spatial reference system for the geometry coordinates.  If not provided, Geographic/WGS84 is assumed.

Reference

Robert.  G. Chamberlain and William H.  Duquette, “Some Algorithms for Polygons on a Sphere”, JPL Publication 07-03, Jet Propulsion Laboratory, Pasadena, CA, June 2007 http://trs-new.jpl.nasa.gov/dspace/handle/2014/40409

Returns

{float} The approximate signed geodesic area of the polygon in square meters.

containsPoint

containsPoint: function(point)

Test if a point is inside a linear ring.  For the case where a point is coincident with a linear ring edge, returns 1.  Otherwise, returns boolean.

Parameters

point{ZOO.Geometry.Point}

Returns

{Boolean | Number} The point is inside the linear ring.  Returns 1 if the point is coincident with an edge.  Returns boolean otherwise.

ZOO.Geometry.MultiLineString

A MultiLineString is a geometry with multiple ZOO.Geometry.LineString components.

Inherits from

Summary
Functions
ZOO.Geometry.MultiLineStringConstructor for a MultiLineString Geometry.

Functions

ZOO.Geometry.MultiLineString

Constructor for a MultiLineString Geometry.

Parameters

components{Array(ZOO.Geometry.LineString)}

ZOO.Geometry.Polygon

Polygon is a collection of ZOO.Geometry.LinearRing.

Inherits from

Summary
Functions
ZOO.Geometry.PolygonConstructor for a Polygon geometry.
getAreaCalculated by subtracting the areas of the internal holes from the area of the outer hole.
containsPointTest if a point is inside a polygon.
createRegularPolygonCreate a regular polygon around a radius.

Functions

ZOO.Geometry.Polygon

Constructor for a Polygon geometry.  The first ring (this.component[0])is the outer bounds of the polygon and all subsequent rings (this.component[1-n]) are internal holes.

Parameters

components{Array(ZOO.Geometry.LinearRing)}

getArea

getArea: function()

Calculated by subtracting the areas of the internal holes from the area of the outer hole.

Returns

{float} The area of the geometry

containsPoint

containsPoint: function(point)

Test if a point is inside a polygon.  Points on a polygon edge are considered inside.

Parameters

point{ZOO.Geometry.Point}

Returns

{Boolean | Number} The point is inside the polygon.  Returns 1 if the point is on an edge.  Returns boolean otherwise.

createRegularPolygon

ZOO.Geometry.Polygon.createRegularPolygon = function(origin,
radius,
sides,
rotation)

Create a regular polygon around a radius.  Useful for creating circles and the like.

Parameters

origin{ZOO.Geometry.Point} center of polygon.
radius{Float} distance to vertex, in map units.
sides{Integer} Number of sides.  20 approximates a circle.
rotation{Float} original angle of rotation, in degrees.

ZOO.Geometry.MultiPolygon

MultiPolygon is a geometry with multiple ZOO.Geometry.Polygon components.  Create a new instance with the ZOO.Geometry.MultiPolygon constructor.

Inherits from

Summary
Functions
ZOO.Geometry.MultiPolygonCreate a new MultiPolygon geometry

Functions

ZOO.Geometry.MultiPolygon

Create a new MultiPolygon geometry

Parameters

components{Array(ZOO.Geometry.Polygon)} An array of polygons used to generate the MultiPolygon

ZOO.Process

Used to query OGC WPS process defined by its URL and its identifier.  Usefull for chaining localhost process.

Summary
Properties and Functions
schemaLocation{String} Schema location for a particular minor version.
namespaces{Object} Mapping of namespace aliases to namespace URIs.
url{String} The OGC’s Web PRocessing Service URL, default is http://localhost/zoo.
identifier{String} Process identifier in the OGC’s Web Processing Service.
ZOO.ProcessCreate a new Process
ExecuteQuery the OGC’s Web PRocessing Servcie to Execute the process.
buildInputObject containing methods to build WPS inputs.
buildInput.complexGiven an E4XElement representing the WPS complex data input.
buildInput.referenceGiven an E4XElement representing the WPS reference input.
buildInput.literalGiven an E4XElement representing the WPS literal data input.
buildDataInputsNodeMethod to build the WPS DataInputs element.

Properties and Functions

schemaLocation

{String} Schema location for a particular minor version.

namespaces

{Object} Mapping of namespace aliases to namespace URIs.

url

{String} The OGC’s Web PRocessing Service URL, default is http://localhost/zoo.

identifier

{String} Process identifier in the OGC’s Web Processing Service.

ZOO.Process

Create a new Process

Parameters

url{String} The OGC’s Web Processing Service URL.
identifier{String} The process identifier in the OGC’s Web Processing Service.

Execute

Execute: function(inputs)

Query the OGC’s Web PRocessing Servcie to Execute the process.

Parameters

inputs{Object}

Returns

{String} The OGC’s Web processing Service XML response.  The result needs to be interpreted.

buildInput

Object containing methods to build WPS inputs.

buildInput.complex

Given an E4XElement representing the WPS complex data input.

Parameters

identifier{String} the input indetifier
data{Object} A WPS complex data input.

Returns

{E4XElement} A WPS Input node.

buildInput.reference

Given an E4XElement representing the WPS reference input.

Parameters

identifier{String} the input indetifier
data{Object} A WPS reference input.

Returns

{E4XElement} A WPS Input node.

buildInput.literal

Given an E4XElement representing the WPS literal data input.

Parameters

identifier{String} the input indetifier
data{Object} A WPS literal data input.

Returns

{E4XElement} The WPS Input node.

buildDataInputsNode

buildDataInputsNode:function(inputs)

Method to build the WPS DataInputs element.

Parameters

inputs{Object}

Returns

{E4XElement} The WPS DataInputs node for Execute query.

removeItem: function(array,
item)
Remove an object from an array.
indexOf: function(array,
obj)
extend: function(destination,
source)
Copy all properties of a source object to a destination object.
rad: function(x)
distVincenty: function(p1,
p2)
Given two objects representing points with geographic coordinates, this calculates the distance between those points on the surface of an ellipsoid.
Class: function()
Method used to create ZOO classes.
UpdateStatus: function(env,
value)
Method used to update the status of the process
startsWith: function(str,
sub)
Test whether a string starts with another string.
contains: function(str,
sub)
Test whether a string contains another string.
trim: function(str)
Removes leading and trailing whitespace characters from a string.
camelize: function(str)
Camel-case a hyphenated string.
isNumeric: function(value)
Determine whether a string contains only a numeric value.
numericIf: function(value)
Converts a string that appears to be a numeric value into a number.
clone:function()
Create a cloned instance of this bounds.
equals:function(bounds)
Test a two bounds for equivalence.
toString:function()
{String} String representation of bounds object.
toBBOX:function(decimal)
toGeometry: function()
Create a new polygon geometry based on this bounds.
getWidth:function()
{Float} The width of the bounds
getHeight:function()
{Float} The height of the bounds (top minus bottom).
add:function(x,
y)
extend:function(object)
Extend the bounds to include the point, lonlat, or bounds specified.
intersectsBounds:function(bounds,
inclusive)
Determine whether the target bounds intersects this bounds.
containsBounds:function(bounds,
partial,
inclusive)
Determine whether the target bounds is contained within this bounds.
getCode: function()
Get the string SRS code.
getUnits: function()
Get the units string for the projection -- returns null if zoo-proj4js is not available.
toString: function()
Convert projection to string (getCode wrapper).
equals: function(projection)
Test equality of two projection instances.
destroy: function()
Destroy projection object.
ZOO.Projection.transform = function(point,
source,
dest)
Transform a point coordinate from one projection to another.
Class for coordinate transforms between coordinate systems.
{Object} Maintain a reference (data) to the most recently read data.
read: function(data)
Read data from a string, and return an object whose type depends on the subclass.
{Object} When keepData is true, this is the parsed string sent to read.
destroy: function()
Clean up.
write: function(data)
Accept an object, and return a string.
read: function(wkt)
Deserialize a WKT string and return a vector feature or an array of vector features.
write: function(features)
Serialize a feature or array of features into a WKT string.
read: function(json,
filter)
Deserialize a json string.
write: function(value,
pretty)
Serialize an object into a JSON string.
writeIndent: function()
Output an indentation string depending on the indentation level.
writeNewline: function()
Output a string representing a newline if in pretty printing mode.
writeSpace: function()
Output a string representing a space if in pretty printing mode.
read: function(json,
type,
filter)
Deserialize a GeoJSON string.
isValidType: function(obj,
type)
Check if a GeoJSON object is a valid representative of the given type.
parseFeature: function(obj)
Convert a feature object from GeoJSON into an ZOO.Feature.
Vector features use the ZOO.Geometry classes as geometry description.
parseGeometry: function(obj)
Convert a geometry object from GeoJSON into an ZOO.Geometry.
A Geometry is a description of a geographic object.
Point geometry class.
MultiPoint is a collection of Points.
A LineString is a Curve which, once two points have been added to it, can never be less than two points long.
A MultiLineString is a geometry with multiple ZOO.Geometry.LineString components.
Polygon is a collection of ZOO.Geometry.LinearRing.
MultiPolygon is a geometry with multiple ZOO.Geometry.Polygon components.
write: function(obj,
pretty)
Serialize a feature, geometry, array of features into a GeoJSON string.
createCRSObject: function(object)
Create the CRS object for an object.
parseFeatures: function(nodes)
Loop through all Placemark nodes and parse them.
parseFeature: function(node)
This function is the core of the KML parsing code in ZOO.
parseAttributes: function(node)
parseExtendedData: function(node)
Parse ExtendedData from KML.
write: function(features)
Accept Feature Collection, and return a string.
createPlacemark: function(feature)
Creates and returns a KML placemark node representing the given feature.
buildGeometryNode: function(geometry)
Builds and returns a KML geometry node with the given geometry.
buildCoordinatesNode: function(geometry)
Builds and returns the KML coordinates node with the given geometry coordinates...</coordinates>
read: function(data)
Read data from a string, and return a list of features.
parseFeature: function(node)
This function is the core of the GML parsing code in ZOO.
parseAttributes: function(node)
write: function(features)
Generate a GML document string given a list of features.
createFeature: function(feature)
Accept an ZOO.Feature, and build a GML node for it.
buildGeometryNode: function(geometry)
buildCoordinatesNode: function(geometry)
builds the coordinates XmlNode
read:function(data)
parseExecuteResponse: function(node)
Instances of this class represent bounding boxes.
Base class for format reading/writing a variety of formats.
destroy: function()
nullify references to prevent circular references and memory leaks
clone: function ()
Create a clone of this vector feature.
move: function(x,
y)
Moves the feature and redraws it at its new location
Creates a geometry object.
destroy: function()
Destroy this geometry.
clone: function()
Create a clone of this geometry.
extendBounds: function(newBounds)
Extend the existing bounds to include the new bounds.
clearBounds: function()
Nullify this components bounds and that of its parent as well.
getBounds: function()
Get the bounds for this Geometry.
calculateBounds: function()
Recalculate the bounds for the geometry.
toString: function()
Returns the Well-Known Text representation of a geometry
ZOO.Geometry.fromWKT = function(wkt)
Generate a geometry given a Well-Known Text string.
destroy: function ()
Destroy this geometry.
clone: function()
Clone this geometry.
getComponentsString: function()
Get a string representing the components for this collection
calculateBounds: function()
Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item.
addComponent: function(component,
index)
Add a new component (geometry) to the collection.
removeComponents: function(components)
Remove components from this geometry.
removeComponent: function(component)
Remove a component from this geometry.
getLength: function()
Calculate the length of this geometry
getCentroid: function()
{ZOO.Geometry.Point} The centroid of the collection
getGeodesicLength: function(projection)
Calculate the approximate length of the geometry were it projected onto the earth.
move: function(x,
y)
Moves a geometry by the given displacement along positive x and y axes.
rotate: function(angle,
origin)
Rotate a geometry around some origin
resize: function(scale,
origin,
ratio)
Resize a geometry relative to some origin.
equals: function(geometry)
Determine whether another geometry is equivalent to this one.
transform: function(source,
dest)
Reproject the components geometry from source to dest.
intersects: function(geometry)
Determine if the input geometry intersects this one.
getVertices: function(nodes)
Return a list of all points in this geometry.
clone: function(obj)
{ZOO.Geometry.Point} An exact clone of this ZOO.Geometry.Point
Construct a point geometry.
calculateBounds: function ()
Create a new Bounds based on the x/y
equals: function(geom)
Determine whether another geometry is equivalent to this one.
toShortString: function()
{String} Shortened String representation of Point object.
move: function(x,
y)
Moves a geometry by the given displacement along positive x and y axes.
rotate: function(angle,
origin)
Rotate a point around another.
getCentroid: function()
{ZOO.Geometry.Point} The centroid of the collection
resize: function(scale,
origin,
ratio)
Resize a point relative to some origin.
intersects: function(geometry)
Determine if the input geometry intersects this one.
transform: function(source,
dest)
Translate the x,y properties of the point from source to dest.
getVertices: function(nodes)
Return a list of all points in this geometry.
addPoint: function(point,
index)
Wrapper for ZOO.Geometry.Collection.addComponent
removePoint: function(point)
Wrapper for ZOO.Geometry.Collection.removeComponent
getLength: function()
{Float} The length of the curve
removeComponent: function(point)
Only allows removal of a point if there are three or more points in the linestring.
intersects: function(geometry)
Test for instersection between two geometries.
getSortedSegments: function()
{Array} An array of segment objects.
splitWithSegment: function(seg,
options)
Split this geometry with the given segment.
split: function(target,
options)
Use this geometry (the source) to attempt to split a target geometry.
splitWith: function(geometry,
options)
Split this geometry (the target) with the given geometry (the source).
getVertices: function(nodes)
Return a list of all points in this geometry.
addComponent: function(point,
index)
Adds a point to geometry components.
move: function(x,
y)
Moves a geometry by the given displacement along positive x and y axes.
rotate: function(angle,
origin)
Rotate a geometry around some origin
resize: function(scale,
origin,
ratio)
Resize a geometry relative to some origin.
transform: function(source,
dest)
Reproject the components geometry from source to dest.
getCentroid: function()
{ZOO.Geometry.Point} The centroid of the ring
getArea: function()
getGeodesicArea: function(projection)
Calculate the approximate area of the polygon were it projected onto the earth.
containsPoint: function(point)
Test if a point is inside a linear ring.
A Linear Ring is a special LineString which is closed.
getArea: function()
Calculated by subtracting the areas of the internal holes from the area of the outer hole.
containsPoint: function(point)
Test if a point is inside a polygon.
ZOO.Geometry.Polygon.createRegularPolygon = function(origin,
radius,
sides,
rotation)
Create a regular polygon around a radius.
Execute: function(inputs)
Query the OGC’s Web PRocessing Servcie to Execute the process.
buildDataInputsNode:function(inputs)
Method to build the WPS DataInputs element.
Construct a new bounds object.
This class offers several methods for interacting with a wrapped zoo-pro4js projection object.
Create a new parser for WKT
Create a new parser for JSON.
Create a new parser for GeoJSON.
A parser to read/write JSON safely.
A Collection is exactly what it sounds like: A collection of different Geometries.
Create a new parser for KML.
Create a new parser for GML.
Read/Write WPS.
{Object} This object holds arbitrary properties that describe the feature.
Create a vector feature.
{Array(ZOO.Geometry)} The component parts of this geometry
Creates a Geometry Collection -- a list of geoms.
Create a new MultiPoint Geometry
A Curve is a MultiPoint, whose points are assumed to be connected.
Create a new MultiPolygon geometry