.. _api-classes: Classes ======= .. raw:: html
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 | |
removeItem | Remove an object from an array. |
indexOf | |
extend | Copy all properties of a source object to a destination object. |
rad | |
distVincenty | Given two objects representing points with geographic coordinates, this calculates the distance between those points on the surface of an ellipsoid. |
Class | Method used to create ZOO classes. |
UpdateStatus | Method used to update the status of the process |
ZOO. | Contains convenience methods for string manipulation |
Functions and Properties | |
startsWith | Test whether a string starts with another string. |
contains | Test whether a string contains another string. |
trim | Removes leading and trailing whitespace characters from a string. |
camelize | Camel-case a hyphenated string. |
tokenRegEx | Used to find tokens in a string. |
numberRegEx | Used to test strings as numbers. |
isNumeric | Determine whether a string contains only a numeric value. |
numericIf | Converts a string that appears to be a numeric value into a number. |
ZOO. | Contains convenience methods for working with ZOORequest which replace XMLHttpRequest. |
Functions | |
GET | Send an HTTP GET request. |
POST | Send an HTTP POST request. |
ZOO. | Instances 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. | Construct a new bounds object. |
clone | Create a cloned instance of this bounds. |
equals | Test a two bounds for equivalence. |
toString | {String} String representation of bounds object. |
toBBOX | |
toGeometry | Create 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 | |
extend | Extend the bounds to include the point, lonlat, or bounds specified. |
intersectsBounds | Determine whether the target bounds intersects this bounds. |
containsBounds | Determine whether the target bounds is contained within this bounds. |
ZOO. | Class for coordinate transforms between coordinate systems. |
Properties | |
proj | {Object} Proj4js.Proj instance. |
projCode | {String} |
Functions | |
ZOO. | This class offers several methods for interacting with a wrapped zoo-pro4js projection object. |
getCode | Get the string SRS code. |
getUnits | Get the units string for the projection -- returns null if zoo-proj4js is not available. |
toString | Convert projection to string (getCode wrapper). |
equals | Test equality of two projection instances. |
destroy | Destroy projection object. |
transform | Transform a point coordinate from one projection to another. |
ZOO. | Base 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. | Instances of this class are not useful. |
destroy | Clean up. |
read | Read data from a string, and return an object whose type depends on the subclass. |
write | Accept an object, and return a string. |
ZOO. | Class for reading and writing Well-Known Text. |
Functions and Properties | |
ZOO. | Create a new parser for WKT |
read | Deserialize a WKT string and return a vector feature or an array of vector features. |
write | Serialize a feature or array of features into a WKT string. |
extract | Object with properties corresponding to the geometry types. |
parse | Object with properties corresponding to the geometry types. |
parse. | Return point feature given a point WKT fragment. |
parse. | Return a multipoint feature given a multipoint WKT fragment. |
parse. | Return a linestring feature given a linestring WKT fragment. |
parse. | Return a multilinestring feature given a multilinestring WKT fragment. |
parse. | Return a polygon feature given a polygon WKT fragment. |
parse. | Return a multipolygon feature given a multipolygon WKT fragment. |
parse. | Return an array of features given a geometrycollection WKT fragment. |
ZOO. | A 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. | Create a new parser for JSON. |
read | Deserialize a json string. |
write | Serialize an object into a JSON string. |
writeIndent | Output an indentation string depending on the indentation level. |
writeNewline | Output a string representing a newline if in pretty printing mode. |
writeSpace | Output a string representing a space if in pretty printing mode. |
Properties | |
serialize | Object with properties corresponding to the serializable data types. |
Functions | |
serialize. | Transform an object into a JSON string. |
serialize. | Transform an array into a JSON string. |
serialize. | Transform a string into a JSON string. |
serialize. | Transform a number into a JSON string. |
serialize. | Transform a boolean into a JSON string. |
serialize.date | Transform a date into a JSON string. |
ZOO. | Read and write GeoJSON. |
Functions | |
ZOO. | Create a new parser for GeoJSON. |
read | Deserialize a GeoJSON string. |
isValidType | Check if a GeoJSON object is a valid representative of the given type. |
parseFeature | Convert a feature object from GeoJSON into an ZOO.Feature. |
parseGeometry | Convert a geometry object from GeoJSON into an ZOO.Geometry. |
Properties | |
parseCoords | Object with properties corresponding to the GeoJSON geometry types. |
Functions | |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.Point. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPoint. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.LineString. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiLineString. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPolygon. |
parseCoords.box | Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon. |
write | Serialize a feature, geometry, array of features into a GeoJSON string. |
createCRSObject | Create the CRS object for an object. |
Properties | |
extract | Object with properties corresponding to the GeoJSON types. |
Functions | |
extract. | Return a partial GeoJSON object representing a single feature. |
extract. | Return a GeoJSON object representing a single geometry. |
extract. | Return an array of coordinates from a point. |
extract. | Return an array of coordinates from a multipoint. |
extract. | Return an array of coordinate arrays from a linestring. |
extract. | Return an array of linestring arrays from a linestring. |
extract. | Return an array of linear ring arrays from a polygon. |
extract. | Return an array of polygon arrays from a multipolygon. |
extract. | Return an array of geometries from a geometry collection. |
ZOO. | Read/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. | Create a new parser for KML. |
parseFeatures | Loop through all Placemark nodes and parse them. |
parseFeature | This function is the core of the KML parsing code in ZOO. |
parseGeometry | Properties of this object are the functions that parse geometries based on their type. |
parseGeometry. | Given a KML node representing a point geometry, create a ZOO point geometry. |
parseGeometry. | Given a KML node representing a linestring geometry, create a ZOO linestring geometry. |
parseGeometry. | Given a KML node representing a polygon geometry, create a ZOO polygon geometry. |
parseGeometry. | Given a KML node representing a multigeometry, create a ZOO geometry collection. |
parseAttributes | |
parseExtendedData | Parse ExtendedData from KML. |
write | Accept Feature Collection, and return a string. |
createPlacemark | Creates and returns a KML placemark node representing the given feature. |
buildGeometryNode | Builds and returns a KML geometry node with the given geometry. |
buildGeometry | Object containing methods to do the actual geometry node building based on geometry type. |
buildGeometry. | Given a ZOO point geometry, create a KML point. |
buildGeometry. | Given a ZOO multipoint geometry, create a KML GeometryCollection. |
buildGeometry. | Given a ZOO linestring geometry, create a KML linestring. |
buildGeometry. | Given a ZOO multilinestring geometry, create a KML GeometryCollection. |
buildGeometry. | Given a ZOO linearring geometry, create a KML linearring. |
buildGeometry. | Given a ZOO polygon geometry, create a KML polygon. |
buildGeometry. | Given a ZOO multipolygon geometry, create a KML GeometryCollection. |
buildGeometry. | Given a ZOO geometry collection, create a KML MultiGeometry. |
buildCoordinatesNode | Builds and returns the KML coordinates node with the given geometry <coordinates>...</coordinates> |
ZOO. | Read/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. | Create a new parser for GML. |
read | Read data from a string, and return a list of features. |
parseFeature | This function is the core of the GML parsing code in ZOO. |
parseGeometry | Properties of this object are the functions that parse geometries based on their type. |
parseGeometry. | Given a GML node representing a point geometry, create a ZOO point geometry. |
parseGeometry. | Given a GML node representing a multipoint geometry, create a ZOO multipoint geometry. |
parseGeometry. | Given a GML node representing a linestring geometry, create a ZOO linestring geometry. |
parseGeometry. | Given a GML node representing a multilinestring geometry, create a ZOO multilinestring geometry. |
parseGeometry. | Given a GML node representing a polygon geometry, create a ZOO polygon geometry. |
parseGeometry. | Given a GML node representing a multipolygon geometry, create a ZOO multipolygon geometry. |
parseGeometry. | Given a GML node representing an envelope, create a ZOO polygon geometry. |
parseAttributes | |
write | Generate a GML document string given a list of features. |
createFeature | Accept an ZOO.Feature, and build a GML node for it. |
buildGeometryNode | |
buildGeometry | Object containing methods to do the actual geometry node building based on geometry type. |
buildGeometry. | Given a ZOO point geometry, create a GML point. |
buildGeometry. | Given a ZOO multipoint geometry, create a GML multipoint. |
buildGeometry. | Given a ZOO linestring geometry, create a GML linestring. |
buildGeometry. | Given a ZOO multilinestring geometry, create a GML multilinestring. |
buildGeometry. | Given a ZOO linearring geometry, create a GML linearring. |
buildGeometry. | Given an ZOO polygon geometry, create a GML polygon. |
buildGeometry. | Given a ZOO multipolygon geometry, create a GML multipolygon. |
buildCoordinatesNode | builds the coordinates XmlNode |
ZOO. | Read/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 | |
parseData | Object containing methods to analyse data response. |
parseData. | Given an Object representing the WPS complex data response. |
parseData. | Given an Object representing the WPS literal data response. |
parseData. | Given an Object representing the WPS reference response. |
ZOO. | Vector 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. | Create a vector feature. |
destroy | nullify references to prevent circular references and memory leaks |
clone | Create a clone of this vector feature. |
move | Moves the feature and redraws it at its new location |
ZOO. | A 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. | Creates a geometry object. |
destroy | Destroy this geometry. |
clone | Create a clone of this geometry. |
extendBounds | Extend the existing bounds to include the new bounds. |
clearBounds | Nullify this components bounds and that of its parent as well. |
getBounds | Get the bounds for this Geometry. |
calculateBounds | Recalculate the bounds for the geometry. |
toString | Returns the Well-Known Text representation of a geometry |
ZOO. | Generate a geometry given a Well-Known Text string. |
ZOO. | A 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. | Creates a Geometry Collection -- a list of geoms. |
destroy | Destroy this geometry. |
clone | Clone this geometry. |
getComponentsString | Get a string representing the components for this collection |
calculateBounds | Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item. |
addComponent | Add a new component (geometry) to the collection. |
removeComponents | Remove components from this geometry. |
removeComponent | Remove a component from this geometry. |
getLength | Calculate the length of this geometry |
getCentroid | {ZOO.Geometry.Point} The centroid of the collection |
getGeodesicLength | Calculate the approximate length of the geometry were it projected onto the earth. |
move | Moves a geometry by the given displacement along positive x and y axes. |
rotate | Rotate a geometry around some origin |
resize | Resize a geometry relative to some origin. |
equals | Determine whether another geometry is equivalent to this one. |
transform | Reproject the components geometry from source to dest. |
intersects | Determine if the input geometry intersects this one. |
getVertices | Return a list of all points in this geometry. |
ZOO. | Point geometry class. |
Properties | |
x | {float} |
y | {float} |
Functions | |
ZOO. | Construct a point geometry. |
clone | {ZOO.Geometry.Point} An exact clone of this ZOO.Geometry.Point |
calculateBounds | Create a new Bounds based on the x/y |
equals | Determine whether another geometry is equivalent to this one. |
toShortString | {String} Shortened String representation of Point object. |
move | Moves a geometry by the given displacement along positive x and y axes. |
rotate | Rotate a point around another. |
getCentroid | {ZOO.Geometry.Point} The centroid of the collection |
resize | Resize a point relative to some origin. |
intersects | Determine if the input geometry intersects this one. |
transform | Translate the x,y properties of the point from source to dest. |
getVertices | Return a list of all points in this geometry. |
ZOO. | Surface geometry class. |
ZOO. | MultiPoint 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. | Create a new MultiPoint Geometry |
addPoint | Wrapper for ZOO.Geometry.Collection.addComponent |
removePoint | Wrapper for ZOO.Geometry.Collection.removeComponent |
ZOO. | A 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. | |
getLength | {Float} The length of the curve |
ZOO. | A LineString is a Curve which, once two points have been added to it, can never be less than two points long. |
Functions | |
ZOO. | Create a new LineString geometry |
removeComponent | Only allows removal of a point if there are three or more points in the linestring. |
intersects | Test for instersection between two geometries. |
getSortedSegments | {Array} An array of segment objects. |
splitWithSegment | Split this geometry with the given segment. |
split | Use this geometry (the source) to attempt to split a target geometry. |
splitWith | Split this geometry (the target) with the given geometry (the source). |
getVertices | Return a list of all points in this geometry. |
ZOO. | A 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. | Linear rings are constructed with an array of points. |
addComponent | Adds a point to geometry components. |
move | Moves a geometry by the given displacement along positive x and y axes. |
rotate | Rotate a geometry around some origin |
resize | Resize a geometry relative to some origin. |
transform | Reproject the components geometry from source to dest. |
getCentroid | {ZOO.Geometry.Point} The centroid of the ring |
getArea | |
getGeodesicArea | Calculate the approximate area of the polygon were it projected onto the earth. |
containsPoint | Test if a point is inside a linear ring. |
ZOO. | A MultiLineString is a geometry with multiple ZOO.Geometry.LineString components. |
Functions | |
ZOO. | Constructor for a MultiLineString Geometry. |
ZOO. | Polygon is a collection of ZOO.Geometry.LinearRing. |
Functions | |
ZOO. | Constructor for a Polygon geometry. |
getArea | Calculated by subtracting the areas of the internal holes from the area of the outer hole. |
containsPoint | Test if a point is inside a polygon. |
createRegularPolygon | Create a regular polygon around a radius. |
ZOO. | MultiPolygon is a geometry with multiple ZOO.Geometry.Polygon components. |
Functions | |
ZOO. | Create a new MultiPolygon geometry |
ZOO. | Used 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. | Create a new Process |
Execute | Query the OGC’s Web PRocessing Servcie to Execute the process. |
buildInput | Object containing methods to build WPS inputs. |
buildInput. | Given an E4XElement representing the WPS complex data input. |
buildInput. | Given an E4XElement representing the WPS reference input. |
buildInput. | Given an E4XElement representing the WPS literal data input. |
buildDataInputsNode | Method to build the WPS DataInputs element. |
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.
destination | {Object} The object that will be modified |
source | {Object} The object with properties to be set on the destination |
{Object} The destination object.
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.
p1 | {ZOO.Geometry.Point} (or any object with both .x, .y properties) |
p2 | {ZOO.Geometry.Point} (or any object with both .x, .y properties) |
{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.
Contains convenience methods for string manipulation
Functions and Properties | |
startsWith | Test whether a string starts with another string. |
contains | Test whether a string contains another string. |
trim | Removes leading and trailing whitespace characters from a string. |
camelize | Camel-case a hyphenated string. |
tokenRegEx | Used to find tokens in a string. |
numberRegEx | Used to test strings as numbers. |
isNumeric | Determine whether a string contains only a numeric value. |
numericIf | Converts a string that appears to be a numeric value into a number. |
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.
Properties | |
left | {Number} Minimum horizontal coordinate. |
bottom | {Number} Minimum vertical coordinate. |
right | {Number} Maximum horizontal coordinate. |
top | {Number} Maximum vertical coordinate. |
Functions | |
ZOO. | Construct a new bounds object. |
clone | Create a cloned instance of this bounds. |
equals | Test a two bounds for equivalence. |
toString | {String} String representation of bounds object. |
toBBOX | |
toGeometry | Create 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 | |
extend | Extend the bounds to include the point, lonlat, or bounds specified. |
intersectsBounds | Determine whether the target bounds intersects this bounds. |
containsBounds | Determine whether the target bounds is contained within this bounds. |
Construct a new bounds object.
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:function()
Create a cloned instance of this bounds.
{ZOO.Bounds} A fresh copy of the bounds
equals:function( bounds )
Test a two bounds for equivalence.
bounds | {ZOO.Bounds} |
{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.
toGeometry: function()
Create a new polygon geometry based on this bounds.
{ZOO.Geometry.Polygon} A new polygon with the coordinates of this bounds.
add:function( x, y )
x | {Float} |
y | {Float} |
{ZOO.Bounds} A new bounds whose coordinates are the same as this, but shifted by the passed-in x and y values.
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.
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. |
{Boolean} The passed-in bounds object intersects this bounds.
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. |
{Boolean} The passed-in bounds object is contained within this bounds.
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.
Properties | |
proj | {Object} Proj4js.Proj instance. |
projCode | {String} |
Functions | |
ZOO. | This class offers several methods for interacting with a wrapped zoo-pro4js projection object. |
getCode | Get the string SRS code. |
getUnits | Get the units string for the projection -- returns null if zoo-proj4js is not available. |
toString | Convert projection to string (getCode wrapper). |
equals | Test equality of two projection instances. |
destroy | Destroy projection object. |
transform | Transform a point coordinate from one projection to another. |
This class offers several methods for interacting with a wrapped zoo-pro4js projection object.
projCode | {String} A string identifying the Well Known Identifier for the projection. |
options | {Object} An optional object to set additional properties. |
{ZOO.Projection} A projection object.
ZOO.Projection.transform = function( point, source, dest )
Transform a point coordinate from one projection to another. Note that the input point is transformed in place.
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 |
point | {object} A transformed coordinate. The original point is modified. |
Base class for format reading/writing a variety of formats. Subclasses of ZOO.Format are expected to have read and write methods.
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. | Instances of this class are not useful. |
destroy | Clean up. |
read | Read data from a string, and return an object whose type depends on the subclass. |
write | Accept an object, and return a string. |
{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.
{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.
{Object} Maintain a reference (data) to the most recently read data. Default is false.
Instances of this class are not useful. See one of the subclasses.
options | {Object} An optional object with properties to set on the format |
keepData | {Boolean} If true, upon read, the data property will be set to the parsed object (e.g. the json or xml object). |
An instance of ZOO.Format
Class for reading and writing Well-Known Text. Create a new instance with the ZOO.Format.WKT constructor.
Functions and Properties | |
ZOO. | Create a new parser for WKT |
read | Deserialize a WKT string and return a vector feature or an array of vector features. |
write | Serialize a feature or array of features into a WKT string. |
extract | Object with properties corresponding to the geometry types. |
parse | Object with properties corresponding to the geometry types. |
parse. | Return point feature given a point WKT fragment. |
parse. | Return a multipoint feature given a multipoint WKT fragment. |
parse. | Return a linestring feature given a linestring WKT fragment. |
parse. | Return a multilinestring feature given a multilinestring WKT fragment. |
parse. | Return a polygon feature given a polygon WKT fragment. |
parse. | Return a multipolygon feature given a multipolygon WKT fragment. |
parse. | Return an array of features given a geometrycollection WKT fragment. |
Create a new parser for WKT
options | {Object} An optional object whose properties will be set on this instance |
{ZOO.Format.WKT} A new WKT parser.
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.
wkt | {String} A WKT string |
{<ZOO.Feature.Vector>|Array} A feature or array of features for GEOMETRYCOLLECTION WKT.
Return point feature given a point WKT fragment.
str | {String} A WKT fragment representing the point Returns: {ZOO.Feature} A point feature |
Return a multipoint feature given a multipoint WKT fragment.
str | {String} A WKT fragment representing the multipoint |
{ZOO.Feature} A multipoint feature
Return a linestring feature given a linestring WKT fragment.
str | {String} A WKT fragment representing the linestring |
{ZOO.Feature} A linestring feature
Return a multilinestring feature given a multilinestring WKT fragment.
str | {String} A WKT fragment representing the multilinestring |
{ZOO.Feature} A multilinestring feature
Return a polygon feature given a polygon WKT fragment.
str | {String} A WKT fragment representing the polygon |
{ZOO.Feature} A polygon feature
Return a multipolygon feature given a multipolygon WKT fragment.
str | {String} A WKT fragment representing the multipolygon |
{ZOO.Feature} A multipolygon feature
A parser to read/write JSON safely. Create a new instance with the ZOO.Format.JSON constructor.
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. | Create a new parser for JSON. |
read | Deserialize a json string. |
write | Serialize an object into a JSON string. |
writeIndent | Output an indentation string depending on the indentation level. |
writeNewline | Output a string representing a newline if in pretty printing mode. |
writeSpace | Output a string representing a space if in pretty printing mode. |
Properties | |
serialize | Object with properties corresponding to the serializable data types. |
Functions | |
serialize. | Transform an object into a JSON string. |
serialize. | Transform an array into a JSON string. |
serialize. | Transform a string into a JSON string. |
serialize. | Transform a number into a JSON string. |
serialize. | Transform a boolean into a JSON string. |
serialize.date | Transform a date into a JSON string. |
{Boolean} Serialize with extra whitespace for structure. This is set by the write method.
read: function( json, filter )
Deserialize a json string.
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. |
{Object} An object, array, string, or number .
write: function( value, pretty )
Serialize an object into a JSON string.
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. |
{String} The JSON string representation of the input value.
Read and write GeoJSON. Create a new parser with the ZOO.Format.GeoJSON constructor.
Functions | |
ZOO. | Create a new parser for GeoJSON. |
read | Deserialize a GeoJSON string. |
isValidType | Check if a GeoJSON object is a valid representative of the given type. |
parseFeature | Convert a feature object from GeoJSON into an ZOO.Feature. |
parseGeometry | Convert a geometry object from GeoJSON into an ZOO.Geometry. |
Properties | |
parseCoords | Object with properties corresponding to the GeoJSON geometry types. |
Functions | |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.Point. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPoint. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.LineString. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiLineString. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon. |
parseCoords. | Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPolygon. |
parseCoords.box | Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon. |
write | Serialize a feature, geometry, array of features into a GeoJSON string. |
createCRSObject | Create the CRS object for an object. |
Properties | |
extract | Object with properties corresponding to the GeoJSON types. |
Functions | |
extract. | Return a partial GeoJSON object representing a single feature. |
extract. | Return a GeoJSON object representing a single geometry. |
extract. | Return an array of coordinates from a point. |
extract. | Return an array of coordinates from a multipoint. |
extract. | Return an array of coordinate arrays from a linestring. |
extract. | Return an array of linestring arrays from a linestring. |
extract. | Return an array of linear ring arrays from a polygon. |
extract. | Return an array of polygon arrays from a multipolygon. |
extract. | Return an array of geometries from a geometry collection. |
read: function( json, type, filter )
Deserialize a GeoJSON string.
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. |
{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.
parseFeature: function( obj )
Convert a feature object from GeoJSON into an ZOO.Feature.
obj | {Object} An object created from a GeoJSON object |
{ZOO.Feature} A feature.
parseGeometry: function( obj )
Convert a geometry object from GeoJSON into an ZOO.Geometry.
obj | {Object} An object created from a GeoJSON object |
{ZOO.Geometry} A geometry.
Convert a coordinate array from GeoJSON into an ZOO.Geometry.Point.
array | {Object} The coordinates array from the GeoJSON fragment. |
{ZOO.Geometry.Point} A geometry.
Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPoint.
array | {Object} The coordinates array from the GeoJSON fragment. |
{ZOO.Geometry.MultiPoint} A geometry.
Convert a coordinate array from GeoJSON into an ZOO.Geometry.LineString.
array | {Object} The coordinates array from the GeoJSON fragment. |
{ZOO.Geometry.LineString} A geometry.
Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiLineString.
array | {Object} The coordinates array from the GeoJSON fragment. |
{ZOO.Geometry.MultiLineString} A geometry.
Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
array | {Object} The coordinates array from the GeoJSON fragment. |
{ZOO.Geometry.Polygon} A geometry.
Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPolygon.
array | {Object} The coordinates array from the GeoJSON fragment. |
{ZOO.Geometry.MultiPolygon} A geometry.
Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
array | {Object} The coordinates array from the GeoJSON fragment. |
{ZOO.Geometry.Polygon} A geometry.
write: function( obj, pretty )
Serialize a feature, geometry, array of features into a GeoJSON string.
obj | {Object} An ZOO.Feature, ZOO.Geometry, or an array of features. |
pretty | {Boolean} Structure the output with newlines and indentation. Default is false. |
{String} The GeoJSON string representation of the input geometry, features, or array of features.
createCRSObject: function( object )
Create the CRS object for an object.
object | {ZOO.Feature} |
{Object} An object which can be assigned to the crs property of a GeoJSON object.
Return a partial GeoJSON object representing a single feature.
feature | {ZOO.Feature} |
{Object} An object representing the point.
Return a GeoJSON object representing a single geometry.
geometry | {ZOO.Geometry} |
{Object} An object representing the geometry.
Return an array of coordinates from a point.
point | {ZOO.Geometry.Point} |
{Array} An array of coordinates representing the point.
Return an array of coordinates from a multipoint.
multipoint | {ZOO.Geometry.MultiPoint} |
{Array} An array of point coordinate arrays representing the multipoint.
Return an array of coordinate arrays from a linestring.
linestring | {ZOO.Geometry.LineString} |
{Array} An array of coordinate arrays representing the linestring.
Return an array of linestring arrays from a linestring.
multilinestring | {ZOO.Geometry.MultiLineString} |
{Array} An array of linestring arrays representing the multilinestring.
Return an array of linear ring arrays from a polygon.
polygon | {ZOO.Geometry.Polygon} |
{Array} An array of linear ring arrays representing the polygon.
Return an array of polygon arrays from a multipolygon.
multipolygon | {ZOO.Geometry.MultiPolygon} |
{Array} An array of polygon arrays representing the multipolygon
Return an array of geometries from a geometry collection.
collection | {ZOO.Geometry.Collection} |
{Array} An array of geometry objects representing the geometry collection.
Read/Write KML. Create a new instance with the ZOO.Format.KML constructor.
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. | Create a new parser for KML. |
parseFeatures | Loop through all Placemark nodes and parse them. |
parseFeature | This function is the core of the KML parsing code in ZOO. |
parseGeometry | Properties of this object are the functions that parse geometries based on their type. |
parseGeometry. | Given a KML node representing a point geometry, create a ZOO point geometry. |
parseGeometry. | Given a KML node representing a linestring geometry, create a ZOO linestring geometry. |
parseGeometry. | Given a KML node representing a polygon geometry, create a ZOO polygon geometry. |
parseGeometry. | Given a KML node representing a multigeometry, create a ZOO geometry collection. |
parseAttributes | |
parseExtendedData | Parse ExtendedData from KML. |
write | Accept Feature Collection, and return a string. |
createPlacemark | Creates and returns a KML placemark node representing the given feature. |
buildGeometryNode | Builds and returns a KML geometry node with the given geometry. |
buildGeometry | Object containing methods to do the actual geometry node building based on geometry type. |
buildGeometry. | Given a ZOO point geometry, create a KML point. |
buildGeometry. | Given a ZOO multipoint geometry, create a KML GeometryCollection. |
buildGeometry. | Given a ZOO linestring geometry, create a KML linestring. |
buildGeometry. | Given a ZOO multilinestring geometry, create a KML GeometryCollection. |
buildGeometry. | Given a ZOO linearring geometry, create a KML linearring. |
buildGeometry. | Given a ZOO polygon geometry, create a KML polygon. |
buildGeometry. | Given a ZOO multipolygon geometry, create a KML GeometryCollection. |
buildGeometry. | Given a ZOO geometry collection, create a KML MultiGeometry. |
buildCoordinatesNode | Builds and returns the KML coordinates node with the given geometry <coordinates>...</coordinates> |
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.
node | {E4XElement} |
{ZOO.Feature} A vector feature.
Given a KML node representing a point geometry, create a ZOO point geometry.
node | {E4XElement} A KML Point node. |
{ZOO.Geometry.Point} A point geometry.
Given a KML node representing a linestring geometry, create a ZOO linestring geometry.
node | {E4XElement} A KML LineString node. |
{ZOO.Geometry.LineString} A linestring geometry.
Given a KML node representing a polygon geometry, create a ZOO polygon geometry.
node | {E4XElement} A KML Polygon node. |
{ZOO.Geometry.Polygon} A polygon geometry.
Given a KML node representing a multigeometry, create a ZOO geometry collection.
node | {E4XElement} A KML MultiGeometry node. |
{ZOO.Geometry.Collection} A geometry collection.
parseExtendedData: function( node )
Parse ExtendedData from KML. Limited support for schemas/datatypes. See http://code.google.com
node | {E4XElement} |
{Object} An attributes object.
write: function( features )
Accept Feature Collection, and return a string.
features | {Array(ZOO.Feature} An array of features. |
{String} A KML string.
createPlacemark: function( feature )
Creates and returns a KML placemark node representing the given feature.
feature | {ZOO.Feature} |
{E4XElement}
buildGeometryNode: function( geometry )
Builds and returns a KML geometry node with the given geometry.
geometry | {ZOO.Geometry} |
{E4XElement}
Given a ZOO point geometry, create a KML point.
geometry | {ZOO.Geometry.Point} A point geometry. |
{E4XElement} A KML point node.
Given a ZOO multipoint geometry, create a KML GeometryCollection.
geometry | {ZOO.Geometry.MultiPoint} A multipoint geometry. |
{E4XElement} A KML GeometryCollection node.
Given a ZOO linestring geometry, create a KML linestring.
geometry | {ZOO.Geometry.LineString} A linestring geometry. |
{E4XElement} A KML linestring node.
Given a ZOO multilinestring geometry, create a KML GeometryCollection.
geometry | {ZOO.Geometry.MultiLineString} A multilinestring geometry. |
{E4XElement} A KML GeometryCollection node.
Given a ZOO linearring geometry, create a KML linearring.
geometry | {ZOO.Geometry.LinearRing} A linearring geometry. |
{E4XElement} A KML linearring node.
Given a ZOO polygon geometry, create a KML polygon.
geometry | {ZOO.Geometry.Polygon} A polygon geometry. |
{E4XElement} A KML polygon node.
Given a ZOO multipolygon geometry, create a KML GeometryCollection.
geometry | {ZOO.Geometry.Point} A multipolygon geometry. |
{E4XElement} A KML GeometryCollection node.
Given a ZOO geometry collection, create a KML MultiGeometry.
geometry | {ZOO.Geometry.Collection} A geometry collection. |
{E4XElement} A KML MultiGeometry node.
buildCoordinatesNode: function( geometry )
Builds and returns the KML coordinates node with the given geometry <coordinates>...</coordinates>
geometry | {ZOO.Geometry} |
{E4XElement}
Read/Write GML. Create a new instance with the ZOO.Format.GML constructor. Supports the GML simple features profile.
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. | Create a new parser for GML. |
read | Read data from a string, and return a list of features. |
parseFeature | This function is the core of the GML parsing code in ZOO. |
parseGeometry | Properties of this object are the functions that parse geometries based on their type. |
parseGeometry. | Given a GML node representing a point geometry, create a ZOO point geometry. |
parseGeometry. | Given a GML node representing a multipoint geometry, create a ZOO multipoint geometry. |
parseGeometry. | Given a GML node representing a linestring geometry, create a ZOO linestring geometry. |
parseGeometry. | Given a GML node representing a multilinestring geometry, create a ZOO multilinestring geometry. |
parseGeometry. | Given a GML node representing a polygon geometry, create a ZOO polygon geometry. |
parseGeometry. | Given a GML node representing a multipolygon geometry, create a ZOO multipolygon geometry. |
parseGeometry. | Given a GML node representing an envelope, create a ZOO polygon geometry. |
parseAttributes | |
write | Generate a GML document string given a list of features. |
createFeature | Accept an ZOO.Feature, and build a GML node for it. |
buildGeometryNode | |
buildGeometry | Object containing methods to do the actual geometry node building based on geometry type. |
buildGeometry. | Given a ZOO point geometry, create a GML point. |
buildGeometry. | Given a ZOO multipoint geometry, create a GML multipoint. |
buildGeometry. | Given a ZOO linestring geometry, create a GML linestring. |
buildGeometry. | Given a ZOO multilinestring geometry, create a GML multilinestring. |
buildGeometry. | Given a ZOO linearring geometry, create a GML linearring. |
buildGeometry. | Given an ZOO polygon geometry, create a GML polygon. |
buildGeometry. | Given a ZOO multipolygon geometry, create a GML multipolygon. |
buildCoordinatesNode | builds the coordinates XmlNode |
read: function( data )
Read data from a string, and return a list of features.
data | {String} data to read/parse. |
{Array(ZOO.Feature)} An array of features.
Given a GML node representing a point geometry, create a ZOO point geometry.
node | {E4XElement} A GML node. |
{ZOO.Geometry.Point} A point geometry.
Given a GML node representing a multipoint geometry, create a ZOO multipoint geometry.
node | {E4XElement} A GML node. |
{ZOO.Geometry.MultiPoint} A multipoint geometry.
Given a GML node representing a linestring geometry, create a ZOO linestring geometry.
node | {E4XElement} A GML node. |
{ZOO.Geometry.LineString} A linestring geometry.
Given a GML node representing a multilinestring geometry, create a ZOO multilinestring geometry.
node | {E4XElement} A GML node. |
{ZOO.Geometry.MultiLineString} A multilinestring geometry.
Given a GML node representing a polygon geometry, create a ZOO polygon geometry.
node | {E4XElement} A GML node. |
{ZOO.Geometry.Polygon} A polygon geometry.
Given a GML node representing a multipolygon geometry, create a ZOO multipolygon geometry.
node | {E4XElement} A GML node. |
{ZOO.Geometry.MultiPolygon} A multipolygon geometry.
Given a GML node representing an envelope, create a ZOO polygon geometry.
node | {E4XElement} A GML node. |
{ZOO.Geometry.Polygon} A polygon geometry.
write: function( features )
Generate a GML document string given a list of features.
features | {Array(ZOO.Feature)} List of features to serialize into a string. |
{String} A string representing the GML document.
createFeature: function( feature )
Accept an ZOO.Feature, and build a GML node for it.
feature | {ZOO.Feature} The feature to be built as GML. |
{E4XElement} A node reprensting the feature in GML.
buildGeometryNode: function( geometry )
geometry | {ZOO.Geometry} The geometry to be built as GML. |
{E4XElement} A node reprensting the geometry in GML.
Given a ZOO point geometry, create a GML point.
geometry | {ZOO.Geometry.Point} A point geometry. |
{E4XElement} A GML point node.
Given a ZOO multipoint geometry, create a GML multipoint.
geometry | {ZOO.Geometry.MultiPoint} A multipoint geometry. |
{E4XElement} A GML multipoint node.
Given a ZOO linestring geometry, create a GML linestring.
geometry | {ZOO.Geometry.LineString} A linestring geometry. |
{E4XElement} A GML linestring node.
Given a ZOO multilinestring geometry, create a GML multilinestring.
geometry | {ZOO.Geometry.MultiLineString} A multilinestring geometry. |
{E4XElement} A GML multilinestring node.
Given a ZOO linearring geometry, create a GML linearring.
geometry | {ZOO.Geometry.LinearRing} A linearring geometry. |
{E4XElement} A GML linearring node.
Given an ZOO polygon geometry, create a GML polygon.
geometry | {ZOO.Geometry.Polygon} A polygon geometry. |
{E4XElement} A GML polygon node.
Given a ZOO multipolygon geometry, create a GML multipolygon.
geometry | {ZOO.Geometry.MultiPolygon} A multipolygon geometry. |
{E4XElement} A GML multipolygon node.
buildCoordinatesNode: function( geometry )
builds the coordinates XmlNode
<gml:coordinates decimal="." cs="," ts=" ">...</gml:coordinates>
Parameters: geometry - {ZOO.Geometry}
{E4XElement} created E4XElement
Read/Write WPS. Create a new instance with the ZOO.Format.WPS constructor. Supports only parseExecuteResponse.
Properties and Functions | |
schemaLocation | {String} Schema location for a particular minor version. |
namespaces | {Object} Mapping of namespace aliases to namespace URIs. |
read | |
parseExecuteResponse | |
parseData | Object containing methods to analyse data response. |
parseData. | Given an Object representing the WPS complex data response. |
parseData. | Given an Object representing the WPS literal data response. |
parseData. | Given an Object representing the WPS reference response. |
Vector features use the ZOO.Geometry classes as geometry description. They have an ‘attributes’ property, which is the data object
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. | Create a vector feature. |
destroy | nullify references to prevent circular references and memory leaks |
clone | Create a clone of this vector feature. |
move | Moves the feature and redraws it at its new location |
{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.
Create a vector feature.
geometry | {ZOO.Geometry} The geometry that this feature represents. |
attributes | {Object} An optional object that will be mapped to the attributes property. |
clone: function ()
Create a clone of this vector feature. Does not set any non-standard properties.
{ZOO.Feature} An exact clone of this vector feature.
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.
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. | Creates a geometry object. |
destroy | Destroy this geometry. |
clone | Create a clone of this geometry. |
extendBounds | Extend the existing bounds to include the new bounds. |
clearBounds | Nullify this components bounds and that of its parent as well. |
getBounds | Get the bounds for this Geometry. |
calculateBounds | Recalculate the bounds for the geometry. |
toString | Returns the Well-Known Text representation of a geometry |
ZOO. | Generate a geometry given a Well-Known Text string. |
{ZOO.Geometry}This is set when a Geometry is added as component of another geometry
{ZOO.Bounds} The bounds of this geometry
clone: function()
Create a clone of this geometry. Does not set any non-standard properties of the cloned geometry.
{ZOO.Geometry} An exact clone of this geometry.
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.
newBounds | {ZOO.Bounds} |
ZOO.Geometry.fromWKT = function( wkt )
Generate a geometry given a Well-Known Text string.
wkt | {String} A string representing the geometry in Well-Known Text. |
{ZOO.Geometry} A geometry of the appropriate class.
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.
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. | Creates a Geometry Collection -- a list of geoms. |
destroy | Destroy this geometry. |
clone | Clone this geometry. |
getComponentsString | Get a string representing the components for this collection |
calculateBounds | Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item. |
addComponent | Add a new component (geometry) to the collection. |
removeComponents | Remove components from this geometry. |
removeComponent | Remove a component from this geometry. |
getLength | Calculate the length of this geometry |
getCentroid | {ZOO.Geometry.Point} The centroid of the collection |
getGeodesicLength | Calculate the approximate length of the geometry were it projected onto the earth. |
move | Moves a geometry by the given displacement along positive x and y axes. |
rotate | Rotate a geometry around some origin |
resize | Resize a geometry relative to some origin. |
equals | Determine whether another geometry is equivalent to this one. |
transform | Reproject the components geometry from source to dest. |
intersects | Determine if the input geometry intersects this one. |
getVertices | Return a list of all points in this geometry. |
{Array(ZOO.Geometry)} The component parts of this geometry
Creates a Geometry Collection -- a list of geoms.
components | {Array(ZOO.Geometry)} Optional array of geometries |
clone: function()
Clone this geometry.
{ZOO.Geometry.Collection} An exact clone of this collection
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.
component | {ZOO.Geometry} A geometry to add |
index | {int} Optional index into the array to insert the component |
{Boolean} The component geometry was successfully added
removeComponents: function( components )
Remove components from this geometry.
components | {Array(ZOO.Geometry)} The components to be removed |
removeComponent: function( component )
Remove a component from this geometry.
component | {ZOO.Geometry} |
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. |
{Float} The appoximate geodesic length of the geometry in meters.
rotate: function( angle, origin )
Rotate a geometry around some origin
angle | {Float} Rotation angle in degrees (measured counterclockwise from the positive x-axis) |
origin | {ZOO.Geometry.Point} Center point for the rotation |
resize: function( scale, origin, ratio )
Resize a geometry relative to some origin. Use this method to apply a uniform scaling to a geometry.
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. |
{ZOO.Geometry} | The current geometry. |
equals: function( geometry )
Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates.
geom | {ZOO.Geometry} The geometry to test. |
{Boolean} The supplied geometry is equivalent to this geometry.
transform: function( source, dest )
Reproject the components geometry from source to dest.
source | {ZOO.Projection} |
dest | {ZOO.Projection} |
intersects: function( geometry )
Determine if the input geometry intersects this one.
geometry | {ZOO.Geometry} Any type of geometry. |
{Boolean} The input geometry intersects this one.
getVertices: function( nodes )
Return a list of all points in this geometry.
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. |
{Array} A list of all vertices in the geometry.
Point geometry class.
Properties | |
x | {float} |
y | {float} |
Functions | |
ZOO. | Construct a point geometry. |
clone | {ZOO.Geometry.Point} An exact clone of this ZOO.Geometry.Point |
calculateBounds | Create a new Bounds based on the x/y |
equals | Determine whether another geometry is equivalent to this one. |
toShortString | {String} Shortened String representation of Point object. |
move | Moves a geometry by the given displacement along positive x and y axes. |
rotate | Rotate a point around another. |
getCentroid | {ZOO.Geometry.Point} The centroid of the collection |
resize | Resize a point relative to some origin. |
intersects | Determine if the input geometry intersects this one. |
transform | Translate the x,y properties of the point from source to dest. |
getVertices | Return a list of all points in this geometry. |
equals: function( geom )
Determine whether another geometry is equivalent to this one. Geometries are considered equivalent if all components have the same coordinates.
geom | {ZOO.Geometry.Point} The geometry to test. |
{Boolean} The supplied geometry is equivalent to this geometry.
rotate: function( angle, origin )
Rotate a point around another.
angle | {Float} Rotation angle in degrees (measured counterclockwise from the positive x-axis) |
origin | {ZOO.Geometry.Point} Center point for the rotation |
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.
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. |
{ZOO.Geometry} | The current geometry. |
intersects: function( geometry )
Determine if the input geometry intersects this one.
geometry | {ZOO.Geometry} Any type of geometry. |
{Boolean} The input geometry intersects this one.
transform: function( source, dest )
Translate the x,y properties of the point from source to dest.
source | {ZOO.Projection} |
dest | {ZOO.Projection} |
getVertices: function( nodes )
Return a list of all points in this geometry.
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. |
{Array} A list of all vertices in the geometry.
MultiPoint is a collection of Points. Create a new instance with the ZOO.Geometry.MultiPoint constructor.
Properties | |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include. |
Functions | |
ZOO. | Create a new MultiPoint Geometry |
addPoint | Wrapper for ZOO.Geometry.Collection.addComponent |
removePoint | Wrapper for ZOO.Geometry.Collection.removeComponent |
addPoint: function( point, index )
Wrapper for ZOO.Geometry.Collection.addComponent
point | {ZOO.Geometry.Point} Point to be added |
index | {Integer} Optional index |
removePoint: function( point )
Wrapper for ZOO.Geometry.Collection.removeComponent
point | {ZOO.Geometry.Point} Point to be removed |
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.
Properties | |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include. |
Functions | |
ZOO. | |
getLength | {Float} The length of the curve |
point | {Array(ZOO.Geometry.Point)} |
A LineString is a Curve which, once two points have been added to it, can never be less than two points long.
Functions | |
ZOO. | Create a new LineString geometry |
removeComponent | Only allows removal of a point if there are three or more points in the linestring. |
intersects | Test for instersection between two geometries. |
getSortedSegments | {Array} An array of segment objects. |
splitWithSegment | Split this geometry with the given segment. |
split | Use this geometry (the source) to attempt to split a target geometry. |
splitWith | Split this geometry (the target) with the given geometry (the source). |
getVertices | Return a list of all points in this geometry. |
Create a new LineString geometry
points | {Array(ZOO.Geometry.Point)} An array of points used to generate the linestring |
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)
point | {ZOO.Geometry.Point} The point to be removed |
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.
geometry | {ZOO.Geometry} |
{Boolean} The input geometry intersects this geometry.
splitWithSegment: function( seg, options )
Split this geometry with the given segment.
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. |
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. |
{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: function( target, options )
Use this geometry (the source) to attempt to split a target geometry.
target | {ZOO.Geometry} The target geometry. |
options | {Object} Properties of this object will be used to determine how the split is conducted. |
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. |
{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: function( geometry, options )
Split this geometry (the target) with the given geometry (the source).
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. |
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. |
{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: function( nodes )
Return a list of all points in this geometry.
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. |
{Array} A list of all vertices in the geometry.
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
Properties | |
componentTypes | {Array(String)} An array of class names representing the types of components that the collection can include. |
Functions | |
ZOO. | Linear rings are constructed with an array of points. |
addComponent | Adds a point to geometry components. |
move | Moves a geometry by the given displacement along positive x and y axes. |
rotate | Rotate a geometry around some origin |
resize | Resize a geometry relative to some origin. |
transform | Reproject the components geometry from source to dest. |
getCentroid | {ZOO.Geometry.Point} The centroid of the ring |
getArea | |
getGeodesicArea | Calculate the approximate area of the polygon were it projected onto the earth. |
containsPoint | Test if a point is inside a linear ring. |
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.
points | {Array(ZOO.Geometry.Point)} points |
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.
point | {ZOO.Geometry.Point} |
index | {Integer} Index into the array to insert the component |
{Boolean} Was the Point successfully added?
rotate: function( angle, origin )
Rotate a geometry around some origin
angle | {Float} Rotation angle in degrees (measured counterclockwise from the positive x-axis) |
origin | {ZOO.Geometry.Point} Center point for the rotation |
resize: function( scale, origin, ratio )
Resize a geometry relative to some origin. Use this method to apply a uniform scaling to a geometry.
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. |
{ZOO.Geometry} | The current geometry. |
transform: function( source, dest )
Reproject the components geometry from source to dest.
source | {ZOO.Projection} |
dest | {ZOO.Projection} |
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.
projection | {ZOO.Projection} The spatial reference system for the geometry coordinates. If not provided, Geographic/WGS84 is assumed. |
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
{float} The approximate signed geodesic area of the polygon in square meters.
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.
point | {ZOO.Geometry.Point} |
{Boolean | Number} The point is inside the linear ring. Returns 1 if the point is coincident with an edge. Returns boolean otherwise.
A MultiLineString is a geometry with multiple ZOO.Geometry.LineString components.
Functions | |
ZOO. | Constructor for a MultiLineString Geometry. |
Polygon is a collection of ZOO.Geometry.LinearRing.
Functions | |
ZOO. | Constructor for a Polygon geometry. |
getArea | Calculated by subtracting the areas of the internal holes from the area of the outer hole. |
containsPoint | Test if a point is inside a polygon. |
createRegularPolygon | Create a regular polygon around a radius. |
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.
components | {Array(ZOO.Geometry.LinearRing)} |
containsPoint: function( point )
Test if a point is inside a polygon. Points on a polygon edge are considered inside.
point | {ZOO.Geometry.Point} |
{Boolean | Number} The point is inside the polygon. Returns 1 if the point is on an edge. Returns boolean otherwise.
ZOO.Geometry.Polygon.createRegularPolygon = function( origin, radius, sides, rotation )
Create a regular polygon around a radius. Useful for creating circles and the like.
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. |
MultiPolygon is a geometry with multiple ZOO.Geometry.Polygon components. Create a new instance with the ZOO.Geometry.MultiPolygon constructor.
Functions | |
ZOO. | Create a new MultiPolygon geometry |
Create a new MultiPolygon geometry
components | {Array(ZOO.Geometry.Polygon)} An array of polygons used to generate the MultiPolygon |
Used to query OGC WPS process defined by its URL and its identifier. Usefull for chaining localhost process.
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. | Create a new Process |
Execute | Query the OGC’s Web PRocessing Servcie to Execute the process. |
buildInput | Object containing methods to build WPS inputs. |
buildInput. | Given an E4XElement representing the WPS complex data input. |
buildInput. | Given an E4XElement representing the WPS reference input. |
buildInput. | Given an E4XElement representing the WPS literal data input. |
buildDataInputsNode | Method to build the WPS DataInputs element. |
{String} The OGC’s Web PRocessing Service URL, default is http://localhost/zoo.
Remove an object from an array.
removeItem: function( array, item )
indexOf: function( array, obj )
Copy all properties of a source object to a destination object.
extend: function( destination, source )
rad: function( x )
Given two objects representing points with geographic coordinates, this calculates the distance between those points on the surface of an ellipsoid.
distVincenty: function( p1, p2 )
Method used to create ZOO classes.
Class: function()
Method used to update the status of the process
UpdateStatus: function( env, value )
Test whether a string starts with another string.
startsWith: function( str, sub )
Test whether a string contains another string.
contains: function( str, sub )
Removes leading and trailing whitespace characters from a string.
trim: function( str )
Camel-case a hyphenated string.
camelize: function( str )
Determine whether a string contains only a numeric value.
isNumeric: function( value )
Converts a string that appears to be a numeric value into a number.
numericIf: function( value )
Create a cloned instance of this bounds.
clone:function()
Test a two bounds for equivalence.
equals:function( bounds )
{String} String representation of bounds object.
toString:function()
toBBOX:function( decimal )
Create a new polygon geometry based on this bounds.
toGeometry: function()
{Float} The width of the bounds
getWidth:function()
{Float} The height of the bounds (top minus bottom).
getHeight:function()
add:function( x, y )
Extend the bounds to include the point, lonlat, or bounds specified.
extend:function( object )
Determine whether the target bounds intersects this bounds.
intersectsBounds:function( bounds, inclusive )
Determine whether the target bounds is contained within this bounds.
containsBounds:function( bounds, partial, inclusive )
Get the string SRS code.
getCode: function()
Get the units string for the projection -- returns null if zoo-proj4js is not available.
getUnits: function()
Convert projection to string (getCode wrapper).
toString: function()
Test equality of two projection instances.
equals: function( projection )
Destroy projection object.
destroy: function()
Transform a point coordinate from one projection to another.
ZOO.Projection.transform = function( point, source, dest )
Read data from a string, and return an object whose type depends on the subclass.
read: function( data )
Clean up.
destroy: function()
Accept an object, and return a string.
write: function( data )
Deserialize a WKT string and return a vector feature or an array of vector features.
read: function( wkt )
Serialize a feature or array of features into a WKT string.
write: function( features )
Deserialize a json string.
read: function( json, filter )
Serialize an object into a JSON string.
write: function( value, pretty )
Output an indentation string depending on the indentation level.
writeIndent: function()
Output a string representing a newline if in pretty printing mode.
writeNewline: function()
Output a string representing a space if in pretty printing mode.
writeSpace: function()
Deserialize a GeoJSON string.
read: function( json, type, filter )
Check if a GeoJSON object is a valid representative of the given type.
isValidType: function( obj, type )
Convert a feature object from GeoJSON into an ZOO.Feature.
parseFeature: function( obj )
Convert a geometry object from GeoJSON into an ZOO.Geometry.
parseGeometry: function( obj )
Serialize a feature, geometry, array of features into a GeoJSON string.
write: function( obj, pretty )
Create the CRS object for an object.
createCRSObject: function( object )
Loop through all Placemark nodes and parse them.
parseFeatures: function( nodes )
This function is the core of the KML parsing code in ZOO.
parseFeature: function( node )
parseAttributes: function( node )
Parse ExtendedData from KML.
parseExtendedData: function( node )
Accept Feature Collection, and return a string.
write: function( features )
Creates and returns a KML placemark node representing the given feature.
createPlacemark: function( feature )
Builds and returns a KML geometry node with the given geometry.
buildGeometryNode: function( geometry )
Builds and returns the KML coordinates node with the given geometry coordinates...</coordinates>
buildCoordinatesNode: function( geometry )
Read data from a string, and return a list of features.
read: function( data )
This function is the core of the GML parsing code in ZOO.
parseFeature: function( node )
parseAttributes: function( node )
Generate a GML document string given a list of features.
write: function( features )
Accept an ZOO.Feature, and build a GML node for it.
createFeature: function( feature )
buildGeometryNode: function( geometry )
builds the coordinates XmlNode
buildCoordinatesNode: function( geometry )
read:function( data )
parseExecuteResponse: function( node )
nullify references to prevent circular references and memory leaks
destroy: function()
Create a clone of this vector feature.
clone: function ()
Moves the feature and redraws it at its new location
move: function( x, y )
Destroy this geometry.
destroy: function()
Create a clone of this geometry.
clone: function()
Extend the existing bounds to include the new bounds.
extendBounds: function( newBounds )
Nullify this components bounds and that of its parent as well.
clearBounds: function()
Get the bounds for this Geometry.
getBounds: function()
Recalculate the bounds for the geometry.
calculateBounds: function()
Returns the Well-Known Text representation of a geometry
toString: function()
Generate a geometry given a Well-Known Text string.
ZOO.Geometry.fromWKT = function( wkt )
Destroy this geometry.
destroy: function ()
Clone this geometry.
clone: function()
Get a string representing the components for this collection
getComponentsString: function()
Recalculate the bounds by iterating through the components and calling calling extendBounds() on each item.
calculateBounds: function()
Add a new component (geometry) to the collection.
addComponent: function( component, index )
Remove components from this geometry.
removeComponents: function( components )
Remove a component from this geometry.
removeComponent: function( component )
Calculate the length of this geometry
getLength: function()
{ZOO.Geometry.Point} The centroid of the collection
getCentroid: function()
Calculate the approximate length of the geometry were it projected onto the earth.
getGeodesicLength: function( projection )
Moves a geometry by the given displacement along positive x and y axes.
move: function( x, y )
Rotate a geometry around some origin
rotate: function( angle, origin )
Resize a geometry relative to some origin.
resize: function( scale, origin, ratio )
Determine whether another geometry is equivalent to this one.
equals: function( geometry )
Reproject the components geometry from source to dest.
transform: function( source, dest )
Determine if the input geometry intersects this one.
intersects: function( geometry )
Return a list of all points in this geometry.
getVertices: function( nodes )
{ZOO.Geometry.Point} An exact clone of this ZOO.Geometry.Point
clone: function( obj )
Create a new Bounds based on the x/y
calculateBounds: function ()
Determine whether another geometry is equivalent to this one.
equals: function( geom )
{String} Shortened String representation of Point object.
toShortString: function()
Moves a geometry by the given displacement along positive x and y axes.
move: function( x, y )
Rotate a point around another.
rotate: function( angle, origin )
{ZOO.Geometry.Point} The centroid of the collection
getCentroid: function()
Resize a point relative to some origin.
resize: function( scale, origin, ratio )
Determine if the input geometry intersects this one.
intersects: function( geometry )
Translate the x,y properties of the point from source to dest.
transform: function( source, dest )
Return a list of all points in this geometry.
getVertices: function( nodes )
Wrapper for ZOO.Geometry.Collection.addComponent
addPoint: function( point, index )
Wrapper for ZOO.Geometry.Collection.removeComponent
removePoint: function( point )
{Float} The length of the curve
getLength: function()
Only allows removal of a point if there are three or more points in the linestring.
removeComponent: function( point )
Test for instersection between two geometries.
intersects: function( geometry )
{Array} An array of segment objects.
getSortedSegments: function()
Split this geometry with the given segment.
splitWithSegment: function( seg, options )
Use this geometry (the source) to attempt to split a target geometry.
split: function( target, options )
Split this geometry (the target) with the given geometry (the source).
splitWith: function( geometry, options )
Return a list of all points in this geometry.
getVertices: function( nodes )
Adds a point to geometry components.
addComponent: function( point, index )
Moves a geometry by the given displacement along positive x and y axes.
move: function( x, y )
Rotate a geometry around some origin
rotate: function( angle, origin )
Resize a geometry relative to some origin.
resize: function( scale, origin, ratio )
Reproject the components geometry from source to dest.
transform: function( source, dest )
{ZOO.Geometry.Point} The centroid of the ring
getCentroid: function()
getArea: function()
Calculate the approximate area of the polygon were it projected onto the earth.
getGeodesicArea: function( projection )
Test if a point is inside a linear ring.
containsPoint: function( point )
Calculated by subtracting the areas of the internal holes from the area of the outer hole.
getArea: function()
Test if a point is inside a polygon.
containsPoint: function( point )
Create a regular polygon around a radius.
ZOO.Geometry.Polygon.createRegularPolygon = function( origin, radius, sides, rotation )
Query the OGC’s Web PRocessing Servcie to Execute the process.
Execute: function( inputs )
Method to build the WPS DataInputs element.
buildDataInputsNode:function( inputs )