[Zoo-discuss] Problems building zoo kernel

Gérald Fenoy gerald.fenoy at geolabs.fr
Mon Oct 29 12:47:31 PDT 2012


Hi Farkas,
thank you for providing such feedback.

I just would like to comment some small things about your solution [1]:

 * in (8), you used the [env] section for the correct purpose, let's say defining environment variable, but then on step (10) you said that you defined the environment variable for the whole system for GDAL_DATA, you can also define this env. var. directly into the main.cfg. Note that for any services accessing functions of Proj4 or some found in GDAL/OGR, it is  recommended to define PROJ_LIB in [env] section too. For the MapServer support on Windows, we also added a dedicated [mapserver] section in which you can define any CONFIG parameter at the map level.

 * in (9) you said that it is required to update the libxml2.py , I would like to say that it is still the same for the latest versions libxml2-2.9.0 and libxslt-1.1.27 which I compiled locally with Python support activated and I had to modify the libxml2.py in the same way as described your mail.

For getting informations about the caching mechanisms available in the ZOO-Kernel, you can take a look at this page [2], note that there is also enhancements description but those was finally not investigate in much details. Note that all the functions used to handle cache are defined in service_internal.c and that the entry point function is loadRemoteFile [3]. I think that there is not much to document here.

Nevertheless, I can summarize the cache internal mechanisms available in the ZOO-Kernel: when a DataInput is provided in the request as a reference URL, using the xlink:href attribute, it is downloaded only the first time you use this URL, then it is stored on the server side in the cacheDir directory defined in the [main] section of the main.cfg file. The next time you will use the same URL then the ZOO-Kernel will use the stored content rather than accessing the data again requesting the URL. The file name of cached files is based on the md5 encryption of the URL provided as reference for the input. 

This behavior is good enough for many purposes but present evident limitations when using WFS GetFeatures requests.

Hope this helps,
Best regards,

[2] http://zoo-project.org/trac/ticket/51
[3] http://zoo-project.org/trac/browser/trunk/zoo-project/zoo-kernel/service_internal.c#L2480

Gérald Fenoy
gerald.fenoy at geolabs.fr

Le 29 oct. 2012 à 18:39, Farkas H <farkas.dus at gmail.com> a écrit :

> Hi Gérald,
> 
> thanks for your response, you were right the issue was the python setup.
> After a few days break I finished the zooWPS setup with Python support.
> 
> Please find my solution which based on Windows 7, 64-Bit here [1].
> 
> Is there a tutorial concerning the caching support?
> Where can I find informations?
> 
> Hope to hear from you.
> 
> Regards,
> Farkas
> 
> [1]
> (1) Install Python 2.7.3, 32-Bit
> directory: e.g. C:\Python27
> 
> (2) Install Python Extension Package GDAL
> GDAL-1.9.2.win32-py2.7.exe from http://www.lfd.uci.edu/~gohlke/pythonlibs/
> 
> (3) Install Libxml and Libxslt Python Bindings for Windows
> libxml2-python-2.7.7.win32-py2.7.exe from
> http://users.skynet.be/sbi/libxml-python/
> 
> (4) Install OSGeo4W
> choose Web-GIS Quick-Installation with MapServer, GDAL and Apache support
> directory: e.g. C:\OSGeo4W
> 
> (5) Copy files from
> ..\zoo-project\zoo-services\ogr\base-vect-ops-py\cgi-env to
> C:\OSGeo4W\bin
> 
> (6) Copy built zoo_loader.cgi with Python support to C:\OSGeo4W\bin
> 
> (7) Copy and modify main.cfg to C:\OSGeo4W\bin
> 
> (8) Add [env] section with variable PYTHONPATH to main.cfg
> e.g.
> [env]
> PYTHONPATH = C:\Windows\system32\python27.zip;C:\Python27\DLLs;
> C:\Python27\lib;C:\Python27\lib\plat-win;C:\Python27\lib\lib-tk;
> C:\Python27;C:\Python27\lib\site-packages
> 
> (9) Change line 1 in file C:\Python27\Lib\site-packages\libxml2.py
> old: import libxml2mod
> new: from libxmlmods import *
> 
> (10) Create new Windows environment variable
> name: GDAL_DATA
> value: C:\Python27\Lib\site-packages\osgeo\data\gdal
> 
> (11) Make sure intl.dll is in your Windows path
> 
> 
> 
> On 22 October 2012 13:08, Gérald Fenoy <gerald.fenoy at geolabs.fr> wrote:
>> Hi Farkas,
>> I'm so sorry for answering so late, I got a busy days and found this email already started some days ago.
>> 
>> I still think that using the Python version is the best option and should be easier to setup. Note that you will probably need to update your main.cfg file to add the PYTHONPATH environment variable in your [env] section to get your Python services working correctly.
>> 
>> To build the base-vect-ops i used the following command line:
>> 
>> nmake /f makefile.vc FCGI_DIR=\MMBK\SRCS\fcgi-2.4.1-SNAP-0311112127 INTL_DIR=\MMBK\SRCS\gettext-0.14.6\gettext-runtime\intl SSL_DIR=\MMBK\SRCS\openssl-1.0.1c CURL_DIR=D:\MMBK\SRCS\curl-7.27.0\builds\libcurl-release-dll-zlib-dll-ipv6-sspi-winssl XML2_DIR=\MMBK\SRCS\libxml2-2.8.0 ICONV_DIR=\MMBK\SRCS\libiconv-win32-1.14\libiconv-win32-1.14 PY_DIR=\MMBK\SRCS\Python-2.7.3 PY_LIBRARY=\MMBK\SRCS\Python-2.7.3\PCbuild\python27.lib MS_DIR=\MMBK\SRCS\mapserver-6.0.3 GDAL_DIR=\MMBK\SRCS\gdal-1.9.1 GD_DIR=\MMBK\SRCS\pierrejoye-gd-libgd-733361a31aab\src JS_DIR=\MMBK\SRCS\js-1.8.5\js\src\  ZOOK_DIR=\MMBK\SRCS\zoo-project\zoo-project\zoo-kernel\ FT_DIR=d:\MMBK\SRCS\freetype-2.4.10 GEOS_DIR=d:\MMBK\SRCS\geos-3.3.5
>> 
>> Please note that I need to use the makefile.vc from rev. 374 [1] to be able to build on windows. Sorry for this mistake, but we are using the Python version which is more flexible at usage. Nevertheless, with this new revision you should succeed in building the ZOO-Service.
>> 
>> Hope this will help you and I can hear from you again despite this latency in getting answer to your question,
>> Best regards,
>> 
>> Gérald Fenoy
>> gerald.fenoy at geolabs.fr
>> 
>> [1] http://www.zoo-project.org/trac/changeset/374
>> 
> _______________________________________________
> Zoo-discuss mailing list
> Zoo-discuss at lists.osgeo.org
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/zoo-discuss



More information about the Zoo-discuss mailing list