+{%- endblock %}
+
+
+
Index: /tags/rel-1.7.0/docs/_themes/sphinx_rtd_theme/search.html
===================================================================
--- /tags/rel-1.7.0/docs/_themes/sphinx_rtd_theme/search.html (revision 942)
+++ /tags/rel-1.7.0/docs/_themes/sphinx_rtd_theme/search.html (revision 942)
@@ -0,0 +1,50 @@
+{#
+ basic/search.html
+ ~~~~~~~~~~~~~~~~~
+
+ Template for the search page.
+
+ :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
+ :license: BSD, see LICENSE for details.
+#}
+{%- extends "layout.html" %}
+{% set title = _('Search') %}
+{% set script_files = script_files + ['_static/searchtools.js'] %}
+{% block footer %}
+
+ {# this is used when loading the search index using $.ajax fails,
+ such as on Chrome for documents on localhost #}
+
+ {{ super() }}
+{% endblock %}
+{% block body %}
+
+
+ {% if search_performed %}
+
{{ _('Search Results') }}
+ {% if not search_results %}
+
{{ _('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.') }}
+ {% endif %}
+ {% endif %}
+
+ {% if search_results %}
+
+ {% for href, caption, context in search_results %}
+
+
+ Free document hosting provided by Read the Docs.
+
+
+
+{% endif %}
+
Index: /tags/rel-1.7.0/docs/api/classes.rst
===================================================================
--- /tags/rel-1.7.0/docs/api/classes.rst (revision 942)
+++ /tags/rel-1.7.0/docs/api/classes.rst (revision 942)
@@ -0,0 +1,14 @@
+.. _api-classes:
+
+ZOO-API Classes
+=============
+
+The following classes are available in the ZOO API:
+
+.. toctree::
+ :maxdepth: 2
+
+ zoo
+ zoo-format-wps
+ zoo-process
+ zoo-request
Index: /tags/rel-1.7.0/docs/api/description.rst
===================================================================
--- /tags/rel-1.7.0/docs/api/description.rst (revision 942)
+++ /tags/rel-1.7.0/docs/api/description.rst (revision 942)
@@ -0,0 +1,19 @@
+.. _api-what:
+
+What is ZOO-API ?
+==============
+
+ZOO-API is a server-side JavaScript library designed to make the WPS Process creation and chaining
+easier. It works on the server-side using the Mozilla foundation `JavaScript `__
+engine, `SpiderMonkey `__.
+It uses a `Proj4js `__ adaptation for server-side reprojection. It also allows to easily
+convert vector formats (such as `GML `__, `KML `__,
+`GeoJSON `__, etc). The API lets you orchestrate WPS
+services simply and offers the ability to add logic and controls in the WPS chaining.
+
+
+Server-side JavaScript WPS
+---------------------
+
+
+
Index: /tags/rel-1.7.0/docs/api/examples.rst
===================================================================
--- /tags/rel-1.7.0/docs/api/examples.rst (revision 942)
+++ /tags/rel-1.7.0/docs/api/examples.rst (revision 942)
@@ -0,0 +1,53 @@
+.. _api-examples:
+
+Examples
+========
+
+This section gathers sample scripts using :ref:`ZOO-API `, the `ZOO-Project `__ server-side JavaScript API.
+
+ZOO-API contains many classes and functions. You can find the description list :ref:`here `.
+
+ZOO.Process example
+--------------------------
+
+::
+
+ function SampleService(conf,inputs,outputs){
+ var myProcess = new ZOO.Process('http://localhost/cgi-bin-new1/zoo_loader_new1.cgi','Boundary');
+ var myInputs = {InputPolygon: { type: 'complex', value: '{"type":"Polygon","coordinates":[[[-106.993853,35.998758],[-107.407233,35.997524],[-107.430525,35.997726],[-107.4824,35.99878],[-108.37013,35.999472],[-109.043633,35.996652],[-109.096265,35.997817],[-109.148763,36.001751],[-109.200981,36.008442],[-109.252775,36.017871],[-109.304,36.030014],[-109.354516,36.044835],[-106.468201,35.991497],[-106.855511,35.989504],[-106.90933,35.990676],[-106.963008,35.994743],[-106.993853,35.998758]]]}', mimeType: "application/json"} };
+ var myExecuteResult=myProcess.Execute(myInputs);
+ return {result: ZOO.SERVICE_SUCCEEDED, outputs: [ {name:"Result", value: myExecuteResult} ] };
+ }
+
+In this really short example you can see how to create ``ZOO.Process`` class instance and
+call the Execute method on such an instance. Then you'll just need to return a JavaScript
+object containing the attributes result and outputs, which I'm sure you already know
+what is about. The first is about the status of the process (can be ``ZOO.SERVICE_SUCEEDED``,
+``ZOO.SERVICE_FAILED`` and so on), the last is obviously the resulting maps (take a
+look at the maps internal data structure used by ZOO Kernel in ``service.h``).
+
+ZOO.UpdateStatus example
+-----------------------
+
+::
+
+ function SampleLongService(conf,inputs,outputs){
+ var my_i=0;
+ while(my_i<100){
+ try{
+ conf["lenv"]["status"]=my_i;
+ }
+ catch(e){
+ }
+ ZOOUpdateStatus(conf,my_i);
+ SampleService(conf,inputs,outputs);
+ my_i+=10;
+ }
+ return SampleService(conf,inputs,outputs);
+ }
+
+You can see in this sample code how to use the ``ZOOUpdateStatus`` function to update the
+current status of your running process. This information will be really helpfull when the
+ZOO Kernel will run your JavaScript Service in background mode (if the user set to ``true``
+the ``storeExecuteResponse`` parameter in his request).
+
Index: /tags/rel-1.7.0/docs/api/howto.rst
===================================================================
--- /tags/rel-1.7.0/docs/api/howto.rst (revision 942)
+++ /tags/rel-1.7.0/docs/api/howto.rst (revision 942)
@@ -0,0 +1,42 @@
+.. _api-howto:
+
+Using ZOO-API
+==================
+
+This section will help you to get started using :ref:`ZOO-API`.
+
+Prerequisites
+----------------------
+
+ZOO-API relies on the following software:
+
+- :ref:`kernel_index` (`http://zoo-project.org
+ `__), the ZOO-Project WPS Server.
+- SpiderMonkey (`https://developer.mozilla.org/en/SpiderMonkey
+ `__ ), the Mozilla
+ `JavaScript `__ engine.
+
+
+.. warning::
+
+ The ZOO-Kernel :ref:`optional JavaScript support ` is required for using ZOO-API
+
+
+Download
+-----------------------
+
+ * `zoo-api.js `__
+ * `zoo-proj4js.js `__
+
+
+
+If you did not :ref:`download ` the ZOO-Project
+source code already, please proceed to a svn checkout with the
+following command:
+
+::
+
+ svn checkout http://svn.zoo-project.org/svn/trunk/zoo-project/zoo-api
+
+
+
Index: /tags/rel-1.7.0/docs/api/index.rst
===================================================================
--- /tags/rel-1.7.0/docs/api/index.rst (revision 942)
+++ /tags/rel-1.7.0/docs/api/index.rst (revision 942)
@@ -0,0 +1,17 @@
+.. _api-index:
+
+ZOO-API
+=====================
+
+
+This section provides information on **ZOO-API**, the `ZOO-Project
+`__ server-side JavaScript API.
+
+.. toctree::
+ :maxdepth: 2
+
+ what
+ howto
+ classes
+ examples
+
Index: /tags/rel-1.7.0/docs/api/what.rst
===================================================================
--- /tags/rel-1.7.0/docs/api/what.rst (revision 942)
+++ /tags/rel-1.7.0/docs/api/what.rst (revision 942)
@@ -0,0 +1,16 @@
+.. _api-what:
+
+What is ZOO-API ?
+==============
+
+ZOO-API is a server-side Javascript library for creating and chaining :ref:`services_index`. It lets you script on the server-side to execute WPS *Processes*, and thus to use common JavaScript controls and logic for WPS chaining.
+
+
+Server-side JavaScript WPS
+---------------------
+
+ZOO-API :ref:`js-support` works on the server-side using the Mozilla foundation `JavaScript `__
+engine, `SpiderMonkey `__.
+It uses a `Proj4js `__ adaptation for server-side reprojection. It also allows to easily
+convert vector formats (such as `GML `__, `KML `__,
+`GeoJSON `__, etc).
Index: /tags/rel-1.7.0/docs/api/zoo-bounds.txt
===================================================================
--- /tags/rel-1.7.0/docs/api/zoo-bounds.txt (revision 942)
+++ /tags/rel-1.7.0/docs/api/zoo-bounds.txt (revision 942)
@@ -0,0 +1,254 @@
+.. _api-zoo-bounds:
+
+ZOO.Bounds
+==========
+
+Instances of this class represent bounding boxes.
+
+Properties
+----------
+
+.. list-table::
+ :widths: 30 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`left `
+ - {Number} Minimum horizontal coordinate.
+ * - :ref:`bottom `
+ - {Number} Minimum vertical coordinate.
+ * - :ref:`right `
+ - {Number} Maximum horizontal coordinate.
+ * - :ref:`top `
+ - {Number} Maximum vertical coordinate.
+
+Functions
+---------
+
+.. list-table::
+ :widths: 20 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`ZOO.Bounds `
+ - Construct a new bounds object.
+ * - :ref:`clone `
+ - Create a cloned instance of this bounds.
+ * - :ref:`equals `
+ - Test a two bounds for equivalence.
+ * - :ref:`toString `
+ - {String} String representation of bounds object.
+ * - :ref:`toBBOX `
+ -
+ * - :ref:`toGeometry `
+ - Create a new polygon geometry based on this bounds.
+ * - :ref:`getWidth `
+ - {Float} The width of the bounds
+ * - :ref:`getHeight `
+ - {Float} The height of the bounds (top minus bottom)
+ * - :ref:`add `
+ -
+ * - :ref:`extend `
+ - Extend the bounds to include the point, lonlat, or bounds specified.
+ * - :ref:`intersectsBounds `
+ - Determine whether the target bounds intersects this bounds.
+ * - :ref:`containsBounds `
+ - Determine whether the target bounds is contained within this bounds.
+
+**Properties**
+
+.. _left:
+
+left
+ ``{Number}`` Minimum horizontal coordinate.
+
+.. _bottom:
+
+bottom
+ ``{Number}`` Minimum vertical coordinate.
+
+.. _right:
+
+right
+ ``{Number}`` Maximum horizontal coordinate.
+
+.. _top:
+
+top
+ ``{Number}`` Maximum vertical coordinate.
+
+**Functions**
+
+.. _ZOO.Bounds:
+
+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
+ ::
+
+ clone:function()
+
+ Create a cloned instance of this bounds.
+
+ *Returns*
+
+ :ref:`{ZOO.Bounds} ` A fresh copy of the bounds
+
+.. _equals:
+
+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
+ ::
+
+ toString:function()
+
+ *Returns*
+
+ ``{String}`` String representation of bounds object. (ex. *"left-bottom=(5,42) right-top=(10,45)"*)
+
+.. _toBBOX:
+
+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. *"5,42,10,45"*)
+
+.. _toGeometry:
+
+toGeometry
+ ::
+
+ toGeometry: function()
+
+ Create a new polygon geometry based on this bounds.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Polygon} ` A new polygon with the coordinates of this bounds.
+
+.. _getWidth:
+
+getWidth
+ ::
+
+ getWidth:function()
+
+ *Returns*
+
+ ``{Float}`` The width of the bounds
+
+.. _getHeight:
+
+getHeight
+ ::
+
+ getHeight:function()
+
+ *Returns*
+
+ ``{Float}`` The height of the bounds (top minus bottom).
+
+.. _add:
+
+add
+ ::
+
+ add:function(x,y)
+
+ *Parameters*
+
+ | ``x {Float}``
+ | ``y {Float}``
+
+ *Returns*
+
+ :ref:`{ZOO.Bounds} ` A new bounds whose coordinates are the same as this, but shifted by the passed-in x and y values.
+
+.. _extend:
+
+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
+ ::
+
+ 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`` :ref:`{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
+ ::
+
+ containsBounds:function(bounds,partial,inclusive)
+
+ Determine whether the target bounds is contained within this bounds.
+
+ *Parameters*
+
+ | ``bounds`` :ref:`{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.
Index: /tags/rel-1.7.0/docs/api/zoo-feature.txt
===================================================================
--- /tags/rel-1.7.0/docs/api/zoo-feature.txt (revision 942)
+++ /tags/rel-1.7.0/docs/api/zoo-feature.txt (revision 942)
@@ -0,0 +1,107 @@
+.. _api-zoo-feature:
+
+ZOO.Feature
+===========
+
+Vector features use the ZOO.Geometry classes as geometry description.
+
+Properties
+----------
+
+.. list-table::
+ :widths: 12 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`fid `
+ - {String}
+ * - :ref:`geometry `
+ - {ZOO.Geometry}
+ * - :ref:`attributes `
+ - {Object} This object holds arbitrary properties that describe the feature.
+ * - :ref:`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
+---------
+
+.. list-table::
+ :widths: 15 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`ZOO.Feature `
+ - Create a vector feature.
+ * - :ref:`destroy `
+ - nullify references to prevent circular references and memory leaks
+ * - :ref:`clone `
+ - Create a clone of this vector feature.
+ * - :ref:`move `
+ - Moves the feature and redraws it at its new location
+
+
+**Properties**
+
+.. _fid:
+
+fid
+ ``{String}``
+
+.. _geometry:
+
+geometry
+ :ref:`{ZOO.Geometry} `
+
+.. _attributes:
+
+attributes
+ ``{Object}`` This object holds arbitrary properties that describe the feature.
+
+.. _bounds:
+
+bounds
+ :ref:`{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:
+
+ZOO.Feature
+ Create a vector feature.
+
+
+ *Parameters*
+
+ | ``geometry`` :ref:`{ZOO.Geometry} ` The geometry that this feature represents.
+ | ``attributes {Object}`` An optional object that will be mapped to the attributes property.
+
+.. _destroy:
+
+destroy
+ ::
+
+ destroy: function()
+
+ nullify references to prevent circular references and memory leaks
+
+.. _clone:
+
+clone
+ ::
+
+ clone: function ()
+
+ Create a clone of this vector feature. Does not set any non-standard properties.
+
+ *Returns*
+
+ :ref:`{ZOO.Feature} ` An exact clone of this vector feature.
+
+.. _move:
+
+move
+ Moves the feature and redraws it at its new location
Index: /tags/rel-1.7.0/docs/api/zoo-format-geojson.txt
===================================================================
--- /tags/rel-1.7.0/docs/api/zoo-format-geojson.txt (revision 942)
+++ /tags/rel-1.7.0/docs/api/zoo-format-geojson.txt (revision 942)
@@ -0,0 +1,455 @@
+.. _api-zoo-format-geojson:
+
+ZOO.Format.GeoJSON
+==================
+
+Read and write GeoJSON.
+
+Inherits from
+
+- :ref:`ZOO.Format.JSON `
+
+Properties
+----------
+
+.. list-table::
+ :widths: 20 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`ZOO.Format.GeoJSON `
+ - Create a new parser for GeoJSON.
+ * - :ref:`read `
+ - Deserialize a GeoJSON string.
+ * - :ref:`isValidType `
+ - Check if a GeoJSON object is a valid representative of the given type.
+ * - :ref:`parseFeature `
+ - Convert a feature object from GeoJSON into an ZOO.Feature.
+ * - :ref:`parseGeometry `
+ - Convert a geometry object from GeoJSON into an ZOO.Geometry.
+
+parseCoords Properties
+----------------------
+
+.. list-table::
+ :widths: 20 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`parseCoords `
+ - Object with properties corresponding to the GeoJSON geometry types.
+
+parseCoords Functions
+---------------------
+
+.. list-table::
+ :widths: 12 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`parseCoords.point `
+ - Convert a coordinate array from GeoJSON into an ZOO.Geometry.Point.
+ * - :ref:`parseCoords.multipoint `
+ - Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPoint.
+ * - :ref:`parseCoords.linestring `
+ - Convert a coordinate array from GeoJSON into an ZOO.Geometry.LineString.
+ * - :ref:`parseCoords.multilinestring `
+ - Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiLineString.
+ * - :ref:`parseCoords.polygon `
+ - Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
+ * - :ref:`parseCoords.multipolygon `
+ - Convert a coordinate array from GeoJSON into an ZOO.Geometry.MultiPolygon.
+ * - :ref:`parseCoords.box `
+ - Convert a coordinate array from GeoJSON into an ZOO.Geometry.Polygon.
+ * - :ref:`write `
+ - Serialize a feature, geometry, array of features into a GeoJSON string.
+ * - :ref:`createCRSObject `
+ - Create the CRS object for an object.
+
+extract Properties
+------------------
+
+.. list-table::
+ :widths: 20 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`extract `
+ - Object with properties corresponding to the GeoJSON types.
+
+extract Functions
+-----------------
+
+.. list-table::
+ :widths: 12 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`extract.feature `
+ - Return a partial GeoJSON object representing a single feature.
+ * - :ref:`extract.geometry `
+ - Return a GeoJSON object representing a single geometry.
+ * - :ref:`extract.point `
+ - Return an array of coordinates from a point.
+ * - :ref:`extract.multipoint `
+ - Return an array of coordinates from a multipoint.
+ * - :ref:`extract.linestring `
+ - Return an array of coordinate arrays from a linestring.
+ * - :ref:`extract.multilinestring `
+ - Return an array of linestring arrays from a linestring.
+ * - :ref:`extract.polygon `
+ - Return an array of linear ring arrays from a polygon.
+ * - :ref:`extract.multipolygon `
+ - Return an array of polygon arrays from a multipolygon.
+ * - :ref:`extract.collection `
+ - Return an array of geometries from a geometry collection.
+
+**Functions**
+
+.. _ZOO.Format.GeoJSON:
+
+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
+ ::
+
+ 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 :ref:`ZOO.Feature `. If type is "Geometry", the input json must
+ represent a single geometry, and the return will be an :ref:`ZOO.Geometry `. If type
+ is "Feature", the input json must represent a single feature, and the return will be an :ref:`ZOO.Feature `.
+
+.. _isValidType:
+
+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
+ ::
+
+ parseFeature: function(obj)
+
+ Convert a feature object from GeoJSON into a :ref:`ZOO.Feature `.
+
+ *Parameters*
+
+ ``obj {Object}`` An object created from a GeoJSON object
+
+ *Returns*
+
+ :ref:`{ZOO.Feature} ` A feature.
+
+.. _parseGeometry:
+
+parseGeometry
+ ::
+
+ parseGeometry: function(obj)
+
+ Convert a geometry object from GeoJSON into a :ref:`ZOO.Geometry `.
+
+ *Parameters*
+
+ ``obj {Object}`` An object created from a GeoJSON object
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry} ` A geometry.
+
+**parseCoords Properties**
+
+.. _parseCoords:
+
+parseCoords
+ Object with properties corresponding to the GeoJSON geometry types. Property
+ values are functions that do the actual parsing.
+
+**parseCoords Functions**
+
+.. _parseCoords.point:
+
+parseCoords.point
+ Convert a coordinate array from GeoJSON into a :ref:`ZOO.Geometry.Point `.
+
+ *Parameters*
+
+ ``array {Object}`` The coordinates array from the GeoJSON fragment.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Point} ` A geometry.
+
+.. _parseCoords.multipoint:
+
+parseCoords.multipoint
+ Convert a coordinate array from GeoJSON into a :ref:`ZOO.Geometry.MultiPoint `.
+
+ *Parameters*
+
+ ``array {Object}`` The coordinates array from the GeoJSON fragment.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.MultiPoint} ` A geometry.
+
+.. _parseCoords.linestring:
+
+parseCoords.linestring
+ Convert a coordinate array from GeoJSON into a :ref:`ZOO.Geometry.LineString `.
+
+ *Parameters*
+
+ ``array {Object}`` The coordinates array from the GeoJSON fragment.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.LineString} ` A geometry.
+
+.. _parseCoords.multilinestring:
+
+parseCoords.multilinestring
+ Convert a coordinate array from GeoJSON into a :ref:`ZOO.Geometry.MultiLineString `.
+
+ *Parameters*
+
+ ``array {Object}`` The coordinates array from the GeoJSON fragment.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.MultiLineString} ` A geometry.
+
+.. _parseCoords.polygon:
+
+parseCoords.polygon
+ Convert a coordinate array from GeoJSON into a :ref:`ZOO.Geometry.Polygon `.
+
+ *Parameters*
+
+ ``array {Object}`` The coordinates array from the GeoJSON fragment.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Polygon} ` A geometry.
+
+.. _parseCoords.multipolygon:
+
+parseCoords.multipolygon
+ Convert a coordinate array from GeoJSON into a :ref:`ZOO.Geometry.MultiPolygon `.
+
+ *Parameters*
+
+ ``array {Object}`` The coordinates array from the GeoJSON fragment.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.MultiPolygon} ` A geometry.
+
+.. _parseCoords.box:
+
+parseCoords.box
+ Convert a coordinate array from GeoJSON into a :ref:`ZOO.Geometry.Polygon `.
+
+ *Parameters*
+
+ ``array {Object}`` The coordinates array from the GeoJSON fragment.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Polygon} ` A geometry.
+
+.. _write:
+
+write
+ ::
+
+ write: function(obj,pretty)
+
+ Serialize a feature, geometry, array of features into a GeoJSON string.
+
+ *Parameters*
+
+ | ``obj {Object}`` A :ref:`{ZOO.Feature} `, :ref:`{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
+ ::
+
+ createCRSObject: function(object)
+
+ Create the CRS object for an object.
+
+ *Parameters*
+
+ ``object`` :ref:`{ZOO.Feature} `
+
+ *Returns*
+
+ ``{Object}`` An object which can be assigned to the crs property of a GeoJSON object.
+
+**extract Properties**
+
+.. _extract:
+
+extract
+ Object with properties corresponding to the GeoJSON types. Property values are
+ functions that do the actual value extraction.
+
+**extract Functions**
+
+.. _extract.feature:
+
+extract.feature
+ Return a partial GeoJSON object representing a single feature.
+
+
+ *Parameters*
+
+ ``feature`` :ref:`{ZOO.Feature} `
+
+ *Returns*
+
+ ``{Object}`` An object representing the point.
+
+.. _extract.geometry:
+
+extract.geometry
+ Return a GeoJSON object representing a single geometry.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry} `
+
+ *Returns*
+
+ ``{Object}`` An object representing the geometry.
+
+.. _extract.point:
+
+extract.point
+ Return an array of coordinates from a point.
+
+ *Parameters*
+
+ ``point`` :ref:`{ZOO.Geometry.Point} `
+
+ *Returns*
+
+ ``{Array}`` An array of coordinates representing the point.
+
+.. _extract.multipoint:
+
+extract.multipoint
+ Return an array of coordinates from a multipoint.
+
+ *Parameters*
+
+ ``multipoint`` :ref:`{ZOO.Geometry.MultiPoint} `
+
+ *Returns*
+
+ ``{Array}`` An array of point coordinate arrays representing the multipoint.
+
+.. _extract.linestring:
+
+extract.linestring
+ Return an array of coordinate arrays from a linestring.
+
+ *Parameters*
+
+ ``linestring`` :ref:`{ZOO.Geometry.LineString} `
+
+ *Returns*
+
+ ``{Array}`` An array of coordinate arrays representing the linestring.
+
+.. _extract.multilinestring:
+
+extract.multilinestring
+ Return an array of linestring arrays from a linestring.
+
+ *Parameters*
+
+ ``multilinestring`` :ref:`{ZOO.Geometry.MultiLineString} `
+
+ *Returns*
+
+ ``{Array}`` An array of linestring arrays representing the multilinestring.
+
+.. _extract.polygon:
+
+extract.polygon
+ Return an array of linear ring arrays from a polygon.
+
+ *Parameters*
+
+ ``polygon`` :ref:`{ZOO.Geometry.Polygon} `
+
+ *Returns*
+
+ ``{Array}`` An array of linear ring arrays representing the polygon.
+
+.. _extract.multipolygon:
+
+extract.multipolygon
+ Return an array of polygon arrays from a multipolygon.
+
+ *Parameters*
+
+ ``multipolygon`` :ref:`{ZOO.Geometry.MultiPolygon} `
+
+ *Returns*
+
+ ``{Array}`` An array of polygon arrays representing the multipolygon
+
+.. _extract.collection:
+
+extract.collection
+ Return an array of geometries from a geometry collection.
+
+ *Parameters*
+
+ ``collection`` :ref:`{ZOO.Geometry.Collection} `
+
+ *Returns*
+
+ ``{Array}`` An array of geometry objects representing the geometry collection.
Index: /tags/rel-1.7.0/docs/api/zoo-format-gml.txt
===================================================================
--- /tags/rel-1.7.0/docs/api/zoo-format-gml.txt (revision 942)
+++ /tags/rel-1.7.0/docs/api/zoo-format-gml.txt (revision 942)
@@ -0,0 +1,446 @@
+.. _api-zoo-format-gml:
+
+ZOO.Format.GML
+==============
+
+Read/Write GML.
+
+Inherits from
+
+- :ref:`ZOO.Format `
+
+Properties and Functions
+------------------------
+
+.. list-table::
+ :widths: 20 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`schemaLocation `
+ - {String} Schema location for a particular minor version.
+ * - :ref:`namespaces `
+ - {Object} Mapping of namespace aliases to namespace URIs.
+ * - :ref:`defaultPrefix `
+ -
+ * - :ref:`collectionName `
+ - {String} Name of featureCollection element.
+ * - :ref:`featureName `
+ - {String} Element name for features.
+ * - :ref:`geometryName `
+ - {String} Name of geometry element.
+ * - :ref:`xy `
+ - {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) Changing is not recommended, a new Format should be instantiated.
+ * - :ref:`extractAttributes `
+ - {Boolean} Could we extract attributes
+ * - :ref:`ZOO.Format.GML `
+ - Create a new parser for GML.
+ * - :ref:`read `
+ - Read data from a string, and return a list of features.
+ * - :ref:`parseFeature `
+ - This function is the core of the GML parsing code in ZOO.
+ * - :ref:`parseGeometry `
+ - Properties of this object are the functions that parse geometries based on their type.
+ * - :ref:`parseGeometry.point `
+ - Given a GML node representing a point geometry, create a ZOO point geometry.
+ * - :ref:`parseGeometry.multipoint `
+ - Given a GML node representing a point geometry, create a ZOO multipoint geometry.
+ * - :ref:`parseGeometry.linestring `
+ - Given a GML node representing a linestring geometry, create a ZOO linestring geometry.
+ * - :ref:`parseGeometry.polygon `
+ - Given a GML node representing a polygon geometry, create a ZOO polygon geometry.
+ * - :ref:`parseGeometry.multigeometry `
+ - Given a GML node representing a multigeometry, create a ZOO geometry collection.
+ * - :ref:`parseAttributes `
+ -
+ * - :ref:`parseExtendedData `
+ - Parse ExtendedData from GML.
+ * - :ref:`write `
+ - Accept Feature Collection, and return a string.
+ * - :ref:`createFeature `
+ - Accept an ZOO.Feature, and build a GML node for it.
+ * - :ref:`buildGeometryNode `
+ - Builds and returns a GML geometry node with the given geometry.
+ * - :ref:`buildGeometry `
+ - Object containing methods to do the actual geometry node building based on geometry type.
+ * - :ref:`buildGeometry.point `
+ - Given a ZOO point geometry, create a GML point.
+ * - :ref:`buildGeometry.multipoint `
+ - Given a ZOO multipoint geometry, create a GML GeometryCollection.
+ * - :ref:`buildGeometry.linestring `
+ - Given a ZOO linestring geometry, create a GML linestring.
+ * - :ref:`buildGeometry.multilinestring `
+ - Given a ZOO multilinestring geometry, create a GML GeometryCollection.
+ * - :ref:`buildGeometry.linearring `
+ - Given a ZOO linearring geometry, create a GML linearring.
+ * - :ref:`buildGeometry.polygon `
+ - Given a ZOO polygon geometry, create a GML polygon.
+ * - :ref:`buildGeometry.multipolygon `
+ - Given a ZOO multipolygon geometry, create a GML GeometryCollection.
+ * - :ref:`buildGeometry.collection `
+ - Given a ZOO geometry collection, create a GML MultiGeometry.
+ * - :ref:`buildCoordinatesNode `
+ - builds the coordinates XmlNode
+
+.. _schemaLocation:
+
+schemaLocation
+ ``{String}`` Schema location for a particular minor version.
+
+.. _namespaces:
+
+namespaces
+ ``{Object}`` Mapping of namespace aliases to namespace URIs.
+
+.. _defaultPrefix:
+
+defaultPrefix
+
+.. _collectionName:
+
+collectionName
+ ``{String}`` Name of featureCollection element.
+
+.. _featureName:
+
+featureName
+ ``{String}`` Element name for features. Default is "sql_statement".
+
+.. _geometryName:
+
+geometryName
+ ``{String}`` Name of geometry element. Defaults to "geometryProperty".
+
+.. _xy:
+
+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:
+
+extractAttributes
+ ``{Boolean}`` Could we extract attributes
+
+.. _ZOO.Format.GML:
+
+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
+ ::
+
+ read: function(data)
+
+ Read data from a string, and return a list of features.
+
+ *Parameters*
+
+ ``data {String}`` data to read/parse.
+
+ *Returns*
+
+ :ref:`{Array(ZOO.Feature)} ` An array of features.
+
+.. _parseFeature:
+
+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}``
+
+ *Returns*
+
+ :ref:`{ZOO.Feature} ` A vector feature.
+
+.. _parseGeometry:
+
+parseGeometry
+ Properties of this object are the functions that parse geometries based on their type.
+
+.. _parseGeometry.point:
+
+parseGeometry.point
+ Given a GML node representing a point geometry, create a ZOO point geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A GML node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Point} ` A point geometry.
+
+.. _parseGeometry.multipoint:
+
+parseGeometry.multipoint
+ Given a GML node representing a multipoint geometry, create a ZOO multipoint geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A GML node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Point} ` A multipoint geometry.
+
+.. _parseGeometry.linestring:
+
+parseGeometry.linestring
+ Given a GML node representing a linestring geometry, create a ZOO linestring geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A GML node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.LineString} ` A linestring geometry.
+
+.. _parseGeometry.multilinestring:
+
+parseGeometry.multilinestring
+ Given a GML node representing a multilinestring geometry, create a ZOO multilinestring geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A GML node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.MultiLineString} ` A multilinestring geometry.
+
+.. _parseGeometry.polygon:
+
+parseGeometry.polygon
+ Given a GML node representing a polygon geometry, create a ZOO polygon geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A GML node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Polygon} ` A polygon geometry.
+
+.. _parseGeometry.multipolygon:
+
+parseGeometry.multipolygon
+ Given a GML node representing a multipolygon geometry, create a ZOO multipolygon geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A GML node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.MultiPolygon} ` A multipolygon geometry.
+
+.. _parseGeometry.envelope:
+
+parseGeometry.envelope
+ Given a GML node representing an envelope, create a ZOO polygon geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A GML node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Polygon} ` A polygon geometry.
+
+.. _parseAttributes:
+
+parseAttributes
+ ::
+
+ parseAttributes: function(node)
+
+ *Parameters*
+
+ ``node {E4XElement}``
+
+ *Returns*
+
+ ``{Object}`` An attributes object.
+
+.. _write:
+
+write
+ ::
+
+ write: function(features)
+
+ Generate a GML document string given a list of features.
+
+ *Parameters*
+
+ ``features`` :ref:`{Array(ZOO.Feature)} ` List of features to serialize into a string.
+
+ *Returns*
+
+ ``{String}`` A string representing the GML document.
+
+.. _createFeature:
+
+createFeature
+ ::
+
+ createFeature: function(feature)
+
+ Accept an ZOO.Feature, and build a GML node for it.
+
+ *Parameters*
+
+ ``feature`` :ref:`{ZOO.Feature} ` The feature to be built as GML.
+
+ *Returns*
+
+ ``{E4XElement}`` A node reprensting the feature in GML.
+
+.. _buildGeometryNode:
+
+buildGeometryNode
+ ::
+
+ buildGeometryNode: function(geometry)
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry} ` The geometry to be built as GML.
+
+ *Returns*
+
+ ``{E4XElement}`` A node reprensting the geometry in GML.
+
+.. _buildGeometry:
+
+buildGeometry
+ Object containing methods to do the actual geometry node building based on geometry type.
+
+.. _buildGeometry.point:
+
+buildGeometry.point
+ Given a ZOO point geometry, create a GML point.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.Point} ` A point geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A GML point node.
+
+.. _buildGeometry.multipoint:
+
+buildGeometry.multipoint
+ Given a ZOO multipoint geometry, create a GML multipoint.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.MultiPoint} ` A multipoint geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A GML multipoint node.
+
+.. _buildGeometry.linestring:
+
+buildGeometry.linestring
+ Given a ZOO linestring geometry, create a GML linestring.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.LineString} ` A linestring geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A GML linestring node.
+
+.. _buildGeometry.multilinestring:
+
+buildGeometry.multilinestring
+ Given a ZOO multilinestring geometry, create a GML multilinestring.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.MultiLineString} ` A multilinestring geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A GML multilinestring node.
+
+.. _buildGeometry.linearring:
+
+buildGeometry.linearring
+ Given a ZOO linearring geometry, create a GML linearring.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.LinearRing} ` A linearring geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A GML linearring node.
+
+.. _buildGeometry.polygon:
+
+buildGeometry.polygon
+ Given an ZOO polygon geometry, create a GML polygon.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.Polygon} ` A polygon geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A GML polygon node.
+
+.. _buildGeometry.multipolygon:
+
+buildGeometry.multipolygon
+ Given a ZOO multipolygon geometry, create a GML multipolygon.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.MultiPolygon} ` A multipolygon geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A GML multipolygon node.
+
+.. _buildCoordinatesNode:
+
+buildCoordinatesNode
+ ::
+
+ buildCoordinatesNode: function(geometry)
+
+ builds the coordinates XmlNode
+
+ ::
+
+ ...
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry} `
+
+ *Returns*
+
+ ``{E4XElement}`` created E4XElement
+
Index: /tags/rel-1.7.0/docs/api/zoo-format-json.txt
===================================================================
--- /tags/rel-1.7.0/docs/api/zoo-format-json.txt (revision 942)
+++ /tags/rel-1.7.0/docs/api/zoo-format-json.txt (revision 942)
@@ -0,0 +1,287 @@
+.. _api-zoo-format-json:
+
+ZOO.Format.JSON
+===============
+
+A parser to read/write JSON safely.
+
+Inherits from
+
+- :ref:`ZOO.Format `
+
+Properties
+----------
+
+.. list-table::
+ :widths: 12 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`indent `
+ - {String} For "pretty" printing, the indent string will be used once for each indentation level.
+ * - :ref:`space `
+ - {String} For "pretty" printing, the space string will be used after the ":" separating a name/value pair.
+ * - :ref:`newline `
+ - {String} For "pretty" printing, the newline string will be used at the end of each name/value pair or array item.
+ * - :ref:`level `
+ - {Integer} For "pretty" printing, this is incremented/decremented during serialization.
+ * - :ref:`pretty `
+ - {Boolean} Serialize with extra whitespace for structure.
+
+Functions
+---------
+
+.. list-table::
+ :widths: 14 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`ZOO.Format.JSON `
+ - Create a new parser for JSON.
+ * - :ref:`read `
+ - Deserialize a json string.
+ * - :ref:`write `
+ - Serialize an object into a JSON string.
+ * - :ref:`writeIndent `
+ - Output an indentation string depending on the indentation level.
+ * - :ref:`writeNewline `
+ - Output a string representing a newline if in pretty printing mode.
+ * - :ref:`writeSpace `
+ - Output a string representing a space if in pretty printing mode.
+
+Serialize Properties
+--------------------
+
+.. list-table::
+ :widths: 14 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`serialize `
+ - Object with properties corresponding to the serializable data types.
+
+Serialize Functions
+-------------------
+
+.. list-table::
+ :widths: 14 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`serialize.object `
+ - Transform an object into a JSON string.
+ * - :ref:`serialize.array `
+ - Transform an array into a JSON string.
+ * - :ref:`serialize.string `
+ - Transform a string into a JSON string.
+ * - :ref:`serialize.number `
+ - Transform a number into a JSON string.
+ * - :ref:`serialize.boolean `
+ - Transform a boolean into a JSON string.
+ * - :ref:`serialize.date `
+ - Transform a date into a JSON string.
+
+**Properties**
+
+.. _indent:
+
+indent
+ ``{String}`` For "pretty" printing, the indent string will be used once for each indentation level.
+
+.. _space:
+
+space
+ ``{String}`` For "pretty" printing, the space string will be used after the ":" separating a name/value pair.
+
+.. _newline:
+
+newline
+ ``{String}`` For "pretty" printing, the newline string will be used at the end of each name/value pair or array item.
+
+.. _level:
+
+level
+ ``{Integer}`` For "pretty" printing, this is incremented/decremented during serialization.
+
+.. _pretty:
+
+pretty
+ ``{Boolean}`` Serialize with extra whitespace for structure. This is set by the :ref:`write ` method.
+
+**Functions**
+
+.. _ZOO.Format.JSON:
+
+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
+ ::
+
+ 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
+ ::
+
+ 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
+ ::
+
+ writeIndent: function()
+
+ Output an indentation string depending on the indentation level.
+
+ *Returns*
+
+ ``{String}`` An appropriate indentation string.
+
+.. _writeNewline:
+
+writeNewline
+ ::
+
+ writeNewline: function()
+
+ Output a string representing a newline if in pretty printing mode.
+
+ *Returns*
+
+ ``{String}`` A string representing a new line.
+
+.. _writeSpace:
+
+writeSpace
+ ::
+
+ writeSpace: function()
+
+ Output a string representing a space if in pretty printing mode.
+
+ *Returns*
+
+ ``{String}`` A space.
+
+**Serialize Properties**
+
+.. _serialize:
+
+serialize
+ Object with properties corresponding to the serializable data types. Property
+ values are functions that do the actual serializing.
+
+**Serialize Functions**
+
+.. _serialize.object:
+
+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:
+
+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:
+
+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:
+
+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:
+
+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:
+
+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.
Index: /tags/rel-1.7.0/docs/api/zoo-format-kml.txt
===================================================================
--- /tags/rel-1.7.0/docs/api/zoo-format-kml.txt (revision 942)
+++ /tags/rel-1.7.0/docs/api/zoo-format-kml.txt (revision 942)
@@ -0,0 +1,412 @@
+.. _api-zoo-format-kml:
+
+ZOO.Format.KML
+==============
+
+Read/Write KML.
+
+Inherits from
+
+- :ref:`ZOO.Format `
+
+Properties and Functions
+------------------------
+
+.. list-table::
+ :widths: 20 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`kmlns `
+ - {String} KML Namespace to use.
+ * - :ref:`foldersName `
+ - {String} Name of the folders.
+ * - :ref:`foldersDesc `
+ - {String} Description of the folders.
+ * - :ref:`placemarksDesc `
+ - {String} Name of the placemarks.
+ * - :ref:`extractAttributes `
+ - {Boolean} Extract attributes from KML.
+ * - :ref:`ZOO.Format.KML `
+ - Create a new parser for KML.
+ * - :ref:`parseFeatures `
+ - Loop through all Placemark nodes and parse them.
+ * - :ref:`parseFeature `
+ - This function is the core of the KML parsing code in ZOO.
+ * - :ref:`parseGeometry `
+ - Properties of this object are the functions that parse geometries based on their type.
+ * - :ref:`parseGeometry.point `
+ - Given a KML node representing a point geometry, create a ZOO point geometry.
+ * - :ref:`parseGeometry.linestring `
+ - Given a KML node representing a linestring geometry, create a ZOO linestring geometry.
+ * - :ref:`parseGeometry.polygon `
+ - Given a KML node representing a polygon geometry, create a ZOO polygon geometry.
+ * - :ref:`parseGeometry.multigeometry `
+ - Given a KML node representing a multigeometry, create a ZOO geometry collection.
+ * - :ref:`parseAttributes `
+ -
+ * - :ref:`parseExtendedData `
+ - Parse ExtendedData from KML.
+ * - :ref:`write `
+ - Accept Feature Collection, and return a string.
+ * - :ref:`createPlacemark `
+ - Creates and returns a KML placemark node representing the given feature.
+ * - :ref:`buildGeometryNode `
+ - Builds and returns a KML geometry node with the given geometry.
+ * - :ref:`buildGeometry `
+ - Object containing methods to do the actual geometry node building based on geometry type.
+ * - :ref:`buildGeometry.point `
+ - Given a ZOO point geometry, create a KML point.
+ * - :ref:`buildGeometry.multipoint `
+ - Given a ZOO multipoint geometry, create a KML GeometryCollection.
+ * - :ref:`buildGeometry.linestring `
+ - Given a ZOO linestring geometry, create a KML linestring.
+ * - :ref:`buildGeometry.multilinestring `
+ - Given a ZOO multilinestring geometry, create a KML GeometryCollection.
+ * - :ref:`buildGeometry.linearring `
+ - Given a ZOO linearring geometry, create a KML linearring.
+ * - :ref:`buildGeometry.polygon `
+ - Given a ZOO polygon geometry, create a KML polygon.
+ * - :ref:`buildGeometry.multipolygon `
+ - Given a ZOO multipolygon geometry, create a KML GeometryCollection.
+ * - :ref:`buildGeometry.collection `
+ - Given a ZOO geometry collection, create a KML MultiGeometry.
+ * - :ref:`buildCoordinatesNode `
+ - Builds and returns the KML coordinates node with the given geometry ...
+
+.. _kmlns:
+
+kmlns
+ ``{String}`` KML Namespace to use. Defaults to 2.2 namespace.
+
+.. _foldersName:
+
+foldersName
+ ``{String}`` Name of the folders. Default is "ZOO export". If set to null, no name element will be created.
+
+.. _foldersDesc:
+
+foldersDesc
+ ``{String}`` Description of the folders. Default is "Exported on [date]." If set to null, no description element will be created.
+
+.. _placemarksDesc:
+
+placemarksDesc
+ ``{String}`` Name of the placemarks. Default is "No description available".
+
+.. _extractAttributes:
+
+extractAttributes
+ ``{Boolean}`` Extract attributes from KML. Default is true. Extracting styleUrls requires this to be set to true
+
+.. _ZOO.Format.KML:
+
+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
+ ::
+
+ 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
+ ::
+
+ 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*
+
+ :ref:`{ZOO.Feature} ` A vector feature.
+
+.. _parseGeometry:
+
+parseGeometry
+ Properties of this object are the functions that parse geometries based on their type.
+
+.. _parseGeometry.point:
+
+parseGeometry.point
+ Given a KML node representing a point geometry, create a ZOO point geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A KML Point node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Point} ` A point geometry.
+
+.. _parseGeometry.linestring:
+
+parseGeometry.linestring
+ Given a KML node representing a linestring geometry, create a ZOO linestring geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A KML LineString node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.LineString} ` A linestring geometry.
+
+.. _parseGeometry.polygon:
+
+parseGeometry.polygon
+ Given a KML node representing a polygon geometry, create a ZOO polygon geometry.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A KML Polygon node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Polygon} ` A polygon geometry.
+
+.. _parseGeometry.multigeometry:
+
+parseGeometry.multigeometry
+ Given a KML node representing a multigeometry, create a ZOO geometry collection.
+
+ *Parameters*
+
+ ``node {E4XElement}`` A KML MultiGeometry node.
+
+ *Returns*
+
+ :ref:`{ZOO.Geometry.Collection} ` A geometry collection.
+
+.. _parseAttributes:
+
+parseAttributes
+ ::
+
+ parseAttributes: function(node)
+
+ *Parameters*
+
+ ``node {E4XElement}``
+
+ *Returns*
+
+ ``{Object}`` An attributes object.
+
+.. _parseExtendedData:
+
+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
+ ::
+
+ write: function(features)
+
+ Accept Feature Collection, and return a string.
+
+ *Parameters*
+
+ ``features`` :ref:`{Array(ZOO.Feature)} ` An array of features.
+
+ *Returns*
+
+ ``{String}`` A KML string.
+
+.. _createPlacemark:
+
+createPlacemark
+ ::
+
+ createPlacemark: function(feature)
+
+ Creates and returns a KML placemark node representing the given feature.
+
+ *Parameters*
+
+ ``feature`` :ref:`{ZOO.Feature} `
+
+ *Returns*
+
+ ``{E4XElement}``
+
+.. _buildGeometryNode:
+
+buildGeometryNode
+ ::
+
+ buildGeometryNode: function(geometry)
+
+ Builds and returns a KML geometry node with the given geometry.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry} `
+
+ *Returns*
+
+ ``{E4XElement}``
+
+.. _buildGeometry:
+
+buildGeometry
+ Object containing methods to do the actual geometry node building based on geometry type.
+
+.. _buildGeometry.point:
+
+buildGeometry.point
+ Given a ZOO point geometry, create a KML point.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.Point} ` A point geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML point node.
+
+.. _buildGeometry.multipoint:
+
+buildGeometry.multipoint
+ Given a ZOO multipoint geometry, create a KML GeometryCollection.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.MultiPoint} ` A multipoint geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML GeometryCollection node.
+
+.. _buildGeometry.linestring:
+
+buildGeometry.linestring
+ Given a ZOO linestring geometry, create a KML linestring.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.LineString} ` A linestring geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML linestring node.
+
+.. _buildGeometry.multilinestring:
+
+buildGeometry.multilinestring
+ Given a ZOO multilinestring geometry, create a KML GeometryCollection.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.MultiLineString} ` A multilinestring geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML GeometryCollection node.
+
+.. _buildGeometry.linearring:
+
+buildGeometry.linearring
+ Given a ZOO linearring geometry, create a KML linearring.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.LinearRing} ` A linearring geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML linearring node.
+
+.. _buildGeometry.polygon:
+
+buildGeometry.polygon
+ Given a ZOO polygon geometry, create a KML polygon.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.Polygon} ` A polygon geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML polygon node.
+
+.. _buildGeometry.multipolygon:
+
+buildGeometry.multipolygon
+ Given a ZOO multipolygon geometry, create a KML GeometryCollection.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.Point} ` A multipolygon geometry.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML GeometryCollection node.
+
+.. _buildGeometry.collection:
+
+buildGeometry.collection
+ Given a ZOO geometry collection, create a KML MultiGeometry.
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry.Collection} ` A geometry collection.
+
+ *Returns*
+
+ ``{E4XElement}`` A KML MultiGeometry node.
+
+.. _buildCoordinatesNode:
+
+buildCoordinatesNode
+ ::
+
+ buildCoordinatesNode: function(geometry)
+
+ Builds and returns the KML coordinates node with the given geometry ...
+
+ *Parameters*
+
+ ``geometry`` :ref:`{ZOO.Geometry} `
+
+ *Return*
+
+ ``{E4XElement}``
+
+
Index: /tags/rel-1.7.0/docs/api/zoo-format-wkt.txt
===================================================================
--- /tags/rel-1.7.0/docs/api/zoo-format-wkt.txt (revision 942)
+++ /tags/rel-1.7.0/docs/api/zoo-format-wkt.txt (revision 942)
@@ -0,0 +1,196 @@
+.. _api-zoo-format-wkt:
+
+ZOO.Format.WKT
+==============
+
+Class for reading and writing Well-Known Text.
+
+Inherits from
+
+- :ref:`ZOO.Format `
+
+Functions and Properties
+------------------------
+
+.. list-table::
+ :widths: 30 50
+ :header-rows: 1
+
+ * - NAME
+ - DESCRIPTION
+ * - :ref:`ZOO.Format.WKT `
+ - Create a new parser for WKT
+ * - :ref:`read `
+ - Deserialize a WKT string and return a vector feature or an array of vector features.
+ * - :ref:`write `
+ - Serialize a feature or array of features into a WKT string.
+ * - :ref:`extract `
+ - Object with properties corresponding to the geometry types.
+ * - :ref:`parse `
+ - Object with properties corresponding to the geometry types.
+ * - :ref:`parse.point `
+ - Return point feature given a point WKT fragment.
+ * - :ref:`parse.multipoint `
+ - Return a multipoint feature given a multipoint WKT fragment.
+ * - :ref:`parse.linestring `
+ - Return a linestring feature given a linestring WKT fragment.
+ * - :ref:`parse.multilinestring