[Zoo-discuss] BufferPy problem

Gérald Fenoy gerald.fenoy at geolabs.fr
Wed Jan 9 01:29:50 PST 2013


Hi Farkas,
happy new year 2013!

My answer in the following.

Gérald Fenoy
gerald.fenoy at geolabs.fr

Le 30 déc. 2012 à 23:32, Farkas H <farkas.dus at gmail.com> a écrit :

> Hi Gérald,
> 
> sorry for my late answer.
> I've setup the kernel with revision 381 and the updated file ogr_sp.py.
> 
> The command ".\zoo_loader.cgi.." still doesn't work with my main.cfg.
> Please find the log file here [1].
> 
> However the command works if I set the GDAL_DATA variable manually (as
> previously).
> Please find the log file here [2].
> 
> Please find my main.cfg here [3].
> I'll create an account and also will open the ticket in the next days.

I guess that you're using the same settings in both cases for the value of GDAL_DATA ?

> 
> 
> Http-Post and http-Get requests for BufferPy are both ok now.

That is a good news.

> 
> 
> I'm a little bit confused where the server puts the referenced
> response data, if I set output asReference="true".
> The server response:
> ...
> <wps:Reference href="http://localhost:80///tmp/ms_tmp/BufferPy_Result_1029
> 88.xml" mimeType="text/xml" encoding="UTF-8" schema="http://schemas.opengis.net/
> gml/3.1.0/base/feature.xsd"/>
> ...
> 
> Due to this response I would suspect the data in the apache file structure.
> In my case the response file should be returned in
> C:\OSGeo4W\apache\htdocs\tmp\ms_tmp\...
> 
> But the file is returned in C:\tmp\ms_tmp.
> If the path [Sysdrive:]\tmp\ms_tmp\ doesn't exist the process fails.
> Error message: "ZOO Kernel failed to process your request receiving
> signal 11 = SIGSEGV"
> 
> Is there a context to the variables in the file main.cfg?
> Could you please explain the variables tmpPath, tmpUrl and dataPath in
> the main.cfg.

This is due to settings made in the main.cfg file. You define here the tmpPath which is the full path to store temporary files on your server hard drive.  Then you get a tmpUrl which is used to build the URL to give back to you in the response to let you fetch the resource. 

I'm really interested in working deeper on this as I should modify a bit the ZOO-Kernel code to make it working on IIS server and it worked before with Apache on Windows so I will probably have to check what is the version  and set environment variables in a different manner. Or maybe use both methods every time to make sure that whatever is your Web Server you'll be able to use this capabilities of automatic env variables setting.

> 
> 
> This update also fixes the following requests: IntersectPy,
> DifferencePy, SymDifferencePy.
> => http://lists.osgeo.org/pipermail/zoo-discuss/2012-November/000874.html

Great thanks a lot for your testing.

> 
> 
> The function UnionPy still doesn't work. Please find the error message here [4].

I guess this is because of line 203 containing currently the following:

tres=geometry1[i].Union(geometry2[j])

which should be replaced by the following:

tres=geometry1[j].Clone()
resg=geometry2[j].GetGeometryRef()
resg=geometry1[i].GetGeometryRef().Union(resg)
tres.SetGeometryDirectly(resg)

I think this should solve the issue.

> 
> 
> Currently I'm running http-Post requests directly on the server using
> the following command:
> curl -H "content-type: text/xml" -d @[http-Post_request_file.xml]
> http://localhost/cgi-bin/zoo_loader.cgi
> 
> How can I send http-Post requests from the client?
> 

I guess you're asking how to send requests using JavaScript code running on the client side. If yes, then you can use something similar to the following in your JavaScript code:

$.ajax({
	type: 'POST',
	contentType: 'text/xml',
	data: <DATA>,
	complete: function(xml,status){
		// Do whatever you want with your result
	}
})

Hope this helps and to her back from you,
Best regards,


More information about the Zoo-discuss mailing list