[ZOO-Discuss] Is any documentation or examples regarding how to use Zoo API

rldhont rldhont at gmail.com
Wed Nov 10 01:16:32 PST 2010


Le 10/11/2010 09:49, Markus Neteler a écrit :
> On Wed, Nov 10, 2010 at 1:15 AM, Yingqi Tang<anakintang at gmail.com>  wrote:
>> Hi all,
>> I am just wondering if there is any documentation or examples regarding how
>> to use Zoo API? The FOSS4G pdf tutorial actually has a lot of good
>> information and helps me successfully set up a running instance of Zoo
>> kernel, there is very few information about using Zoo API to chain WPS
>> together.
> I wanted to suggest
> http://zoo-project.org/trac/wiki/ZooWebSite/ZOOAPI/Examples
>
> but unfortunately it is yet TBD. So I hope that some capable list members
> can offer some material.
>
> Best
> Markus
>

Hi,

You can look at the ZOO-api.js file.

If you use the svn trunk you don't have to copy the content of 
ZOO-api.js and ZOO-proj4js.js in your JavaScript Service file else copy 
the content in the head of your file.

In the API you have classes :
ZOO.Bounds
ZOO.Projection
ZOO.Format
ZOO.Format.WKT
ZOO.Format.JSON
ZOO.Format.GeoJSON
ZOO.Format.KML
ZOO.Format.GML
ZOO.Feature
ZOO.Geometry
ZOO.Geometry.Point
ZOO.Geometry.Surface
ZOO.Geometry.MultiPoint
ZOO.Geometry.Curve
ZOO.Geometry.LineString
ZOO.Geometry.LinearRing
ZOO.Geometry.MultiLineString
ZOO.Geometry.MultiPolygon
ZOO.Process

ZOO.Process is a way to query a WPS' process. you can use it like that :
//ZOO.Process is initialize with an url and a process identifier
var p = new ZOO.Process('http://localhost/cgi/zoo','hello');
// inputs in Execute is an object where attributes name are inputs name
// if input is literal corresponding attribute is the value
// if input is complex or reference attribute is an object with type and 
value attribute
// the other attribute represent complement information about the data
var r = p.Execute({test:'hello'});
// the result is the XML response of WPS Execute

Cheers

René-Luc D'Hont
JavaScript ZOO API editor




More information about the Zoo-discuss mailing list