Windows¶
Authors: | Nicolas Bozon, Gérald Fenoy, Jeff McKenna |
---|---|
Last Updated: | $Date: 2011-12-07 14:44:57 +0100 (Wed, 07 Dec 2011) $ |
Table of Contents
Using OSGeo4W¶
Install OSGeo4W¶
Download the OSGeo4W installer from http://trac.osgeo.org/osgeo4w/, and install it with all the dependencies needed by your services (GDAL/OGR for example). The following libs are required: FastCGI, libxml, Python, cURL.
Install other tools and libraries¶
After installing OSGeo4W on your platform you’ll need more GNU tools and libraries. This package contains full dependencies required to compile on WIN32 platform and this one contains full runtime dependencies to place in your c:OSGeo4Wbin.
Download and Install ZOO Kernel¶
Download the binary version of the ZOO Kernel for WIN32 then place it in the
C:\OSGeo4W\bin
directory. Don’t forget to place a main.cfg
file in the same directory, you can use a modified copy of
this file.
Deploy ZOO Services Providers¶
Your can use the binary version of the OGR Services Provider available from here.
Then place the two libraries with their respective .zcfg files in your local C:\OSGeo4W\bin
directory.
Testing¶
Now you should be able to query your local ZOO Kernel.
Compiling Using Your Own Libraries¶
Note
You must be sure to perform the prerequisite steps before compiling the ZOO Kernel.
The following steps are for use with the Microsoft Visual Studio compiler (and tested with MSVC 2008).
Make sure the gnuwin32 tools
bison.exe
andflex.exe
are found in your path. You can download the GNUwin32 tools here.Modify the file
zoo-project\zoo-kernel\nmake.opt
to point to your local libraries. You can find a modified nmake.opt that points to local libs here. You can also find a modifiedzoo-project\zoo-kernel\makefile.vc
file here.Execute:
nmake /f makefile.vc
A file
zoo_loader.cgi
should be created. Note that if another file namedzoo_loader.cgi.manifest
is also created, you will have to run another command:nmake /f makefile.vc embed-manifest
Copy the files
zoo_loader.cgi
andmain.cfg
into your cgi-bin directory.Using the command prompt, test the zoo-kernel by executing the following command:
D:\ms4w\Apache\cgi-bin> zoo_loader.cgi
which should display a message such as:
Content-Type: text/xml; charset=utf-8 Status: 200 OK <?xml version="1.0" encoding="utf-8"?> <ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xsi:schemaLocation="http://www.opengis.net/ows/1.1 http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lang="en-US" version="1.1.0"> <ows:Exception exceptionCode="MissingParameterValue"> <ows:ExceptionText>Parameter <request> was not specified</ows:ExceptionText> </ows:Exception> </ows:ExceptionReport>
Edit the file
cgi-bin/main.cfg
so that it contains values describing your WPS service. An example of such a file running on Windows is:[main] encoding = utf-8 version = 1.0.0 serverAddress = http://localhost/ lang = en-CA tmpPath=/ms4w/tmp/ms_tmp/ tmpUrl = /ms_tmp/ [identification] title = The Zoo WPS Development Server abstract = Development version of ZooWPS. See http://www.zoo-project.org fees = None accessConstraints = none keywords = WPS,GIS,buffer [provider] providerName=Gateway Geomatics providerSite=http://www.gatewaygeomatics.com individualName=Jeff McKenna positionName=Director role=Dev adressDeliveryPoint=1101 Blue Rocks Road addressCity=Lunenburg addressAdministrativeArea=False addressPostalCode=B0J 2C0 addressCountry=ca addressElectronicMailAddress=info@gatewaygeomatics.com phoneVoice=False phoneFacsimile=False
Open a web browser window, and execute a GetCapababilites request on your WPS service: http://localhost/cgi-bin/zoo_loader.cgi?request=GetCapabilities&service=WPS
The response should be displayed in your browser, such as:
<wps:Capabilities xsi:schemaLocation="http://www.opengis.net/wps/1.0.0 http://schemas.opengis.net/wps/1.0.0/wpsGetCapabilities_response.xsd" service="WPS" xml:lang="en-US" version="1.0.0"> <ows:ServiceIdentification> <ows:Title>The Zoo WPS Development Server</ows:Title> <ows:Abstract> Development version of ZooWPS. See http://www.zoo-project.org </ows:Abstract> <ows:Keywords> <ows:Keyword>WPS</ows:Keyword> <ows:Keyword>GIS</ows:Keyword> <ows:Keyword>buffer</ows:Keyword> </ows:Keywords> <ows:ServiceType>WPS</ows:ServiceType> <ows:ServiceTypeVersion>1.0.0</ows:ServiceTypeVersion> ...
Optionally Compile Individual Services¶
An example could be the OGR base-vect-ops
provider in the zoo-project\zoo-services\ogr\base-vect-ops
directory.
Edit the makefile.vc located in that directory, and execute:
nmake /f makefile.vc
Inside that same directory, the file
cgi-env\ogr_service.zo
should be created.Copy all of the files inside
zoo-services\ogr\base-vect-ops\cgi-env
into your cgi-bin directoryTest this service provider through the following URL:
The response displayed in your browser should contain:
<wps:ProcessSucceeded>Service "Buffer" run successfully.</wps:ProcessSucceeded>