[Zoo-discuss] [ZOO-Discuss] FOSS4G 2010 ZOO Workshop Problem
Christian Rüh
christian.rueh at uni-rostock.de
Tue Nov 19 06:50:53 PST 2013
Hi Gerald,
oh, wow, pretty suprising solution to me, but it works so thank you very
much :-)
The reason I'm not going for a newer version is that I use this workshop
for a lecture I'm giving early December and I don't want to put too much
time and effort into it and a workshop for a specific version (in this
case 1.0) almost never works for a newer version. At least that is what
experienced with other things so far.
I might get back to you for the complex functions with mutliple polygons
but that's it for now and thank you so much again. Your help was/is much
appreciated :-)
Cheers and keep up the good work,
Christian
Am 19.11.2013 15:28, schrieb Fenoy Gerald:
> Hi Christian,
> ok, so if you want to use this ZOO-Kernel version you will have to slightly modify the source code of the HTML file on line 82 you should add just before &.
> So the line 82 is currently:
>
> url += '&RawDataOutput=Result at mimeType=application/json’;
>
> but should be
>
> url += ‘@mimeType=text/xml&RawDataOutput=Result at mimeType=application/json’;
>
> I guess you may try using the ZOO-Kernel 1.3.0 version and give it a try, I’m pretty sure it will work smoothly with the same services. But I can also understand that you don’t wasting time on compiling your own new version. Nevertheless, I think that now it is straightforward enough to be done. Anyway, you may probably have to issue with linked libraries.
>
> Hope you can confirm that the solution worked on your side.
>
> Best regards,
>
>
>
>
> Le 19 nov. 2013 à 15:37, Christian Rüh <christian.rueh at uni-rostock.de> a écrit :
>
>> Hi Gerald,
>>
>> thanks for your answer :-)
>>
>> I think I'm using 1.0 because for this workshop version 3.0 of the OSGeo live disk was suggested.
>>
>> Anyway, your request works and I saw the problem. Somehow in the request of the buffer function
>> "@mimeType=text/xml"
>> turns up right before the "&RawDataOutput=" part. This seems to cause the problem but I just can't find the spot where this is added to the url String in the "zoo-ogr.html".
>> I attached the zoo-ogr.html maybe you can point me to the problem, thank you very much in advance :-)
>>
>> Cheers and thanks again,
>> Christian
>> ________________________________________
>> Von: Fenoy Gerald [gerald.fenoy at geolabs.fr]
>> Gesendet: Dienstag, 19. November 2013 00:14
>> An: Christian Rüh
>> Cc: ZOO-discuss
>> Betreff: Re: [ZOO-Discuss] FOSS4G 2010 ZOO Workshop Problem
>>
>> Hi Christian,
>> thanks for providing feedbacks.
>>
>> I’m wondering what is the version of ZOO-Kernel you are using. Indeed, I noticed nothing wrong in both your query and the ZCFG file.
>>
>> So I guess there is some issue with the ZOO-Kernel version you are using for running the workshop. May I invite you to try the following request and see if anything change [1] ?
>>
>>
>> If it solves the issue, then I would invite your to try with 1.3.0 version or SVN trunk version [2],
>>
>> Hope this helps,
>> Best regards
>>
>> [1] http://localhost/zoo/?request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=BufferDistance=1@datatype=interger;InputPolygon=Reference@xlink:href=http%3A%2F%2Flocalhost%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.25@mimeType=text/xml&RawDataOutput=Result@mimeType=application/json
>> [2] http://zoo-project.org/site/Downloads#Fordevelopers
>>
>> Gérald Fenoy
>> gerald.fenoy at geolabs.fr
>>
>>
>> Le 18 nov. 2013 à 16:48, Christian Rüh <christian.rueh at uni-rostock.de> a écrit :
>>
>>> Hi Gerald,
>>>
>>> ah, no need to apologize, I'm happy for your fast answer :-)
>>>
>>> The initial error is resolved and for a query like this:
>>> http://localhost/cgi-bin/zoo_loader.cgi?request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=InputPolygon=Reference@xlink:href=http%3A%2F%2Flocalhost%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.15
>>> I get a satisfying result.
>>>
>>> However, if i want to use the OpenLayers application I run into problems (maybe the kind you suggested with "Note that with this version of the Python service you will have to use the Polygon and MultiPolygon.").
>>> For the request
>>> http://localhost/zoo/?request=Execute&service=WPS&version=1.0.0&Identifier=Buffer&DataInputs=BufferDistance=1@datatype=interger;InputPolygon=Reference@xlink:href=http%3A%2F%2Flocalhost%3A8082%2Fgeoserver%2Fows%3FSERVICE%3DWFS%26REQUEST%3DGetFeature%26VERSION%3D1.0.0%26typename%3Dtopp%3Astates%26SRS%3DEPSG%3A4326%26FeatureID%3Dstates.25&RawDataOutput=Result@mimeType=application/json
>>> I get the error:
>>> <ows:ExceptionText>
>>> TRACE : ('mimeType',)
>>> TRACE : <type 'exceptions.KeyError'>
>>> Unable to run your python process properly. Please check the following messages : [' File "/usr/lib/cgi-bin/ogr_ws_service_provider.py", line 48, in Buffer\n geometry=extractInputs(inputs["InputPolygon"])\n', ' File "/usr/lib/cgi-bin/ogr_ws_service_provider.py", line 13, in extractInputs\n if obj["mimeType"]=="application/json":\n']
>>> </ows:ExceptionText>
>>>
>>> I looked into the zcfg and it's InputPolygon there, application/json is also spelled correctly everywhere as far as I can see.
>>>
>>> Since I haven't changed a thing in ogr_ws_service_provider.py I've only attached the Buffer.zcfg.
>>>
>>> Cheers and thanks again,
>>> Christian
>>>
>>> ________________________________________
>>> Von: Fenoy Gerald [gerald.fenoy at geolabs.fr]
>>> Gesendet: Montag, 18. November 2013 14:57
>>> An: ZOO-discuss
>>> Cc: Christian Rüh
>>> Betreff: Re: [ZOO-Discuss] FOSS4G 2010 ZOO Workshop Problem
>>>
>>> Hi Christian,
>>> sorry for answering your email so late.
>>>
>>> I found an issue in the ZCFG file the output was not named « Result » but « BufferedPolygon ».
>>>
>>> I guess that once you updated the ZCFG file everything should run smoothly.
>>>
>>> Note that with this version of the Python service you will have to use the Polygon and MultiPolygon.
>>>
>>> Hope this helps you,
>>> Best regards,
>>>
>>> Gérald Fenoy
>>> gerald.fenoy at geolabs.fr
>>>
>>>
>>>
>>> Le 18 nov. 2013 à 14:51, Christian Rüh <christian.rueh at uni-rostock.de> a écrit :
>>>
>>>> Hi Gerald,
>>>>
>>>> thank you for the fast answer that helped me a lot :-)
>>>> I was able to fix the problem with your hint.
>>>>
>>>> However, the next problem was right around the corner. After the ConvexHull and Centroid functions worked fine the Buffer function won't.
>>>>
>>>> I get the following error:
>>>> <ows:ExceptionText>
>>>> TRACE : ('Result',)
>>>> TRACE : <type 'exceptions.KeyError'>
>>>> Unable to run your python process properly. Please check the following messages : [' File "/usr/lib/cgi-bin/ogr_ws_service_provider.py", line 54, in Buffer\n outputResult(outputs["Result"],rgeom)\n']
>>>> </ows:ExceptionText>
>>>>
>>>> I've looked into keyerrors and python but wasn't able to resolve this issue. Especially since the line (54)
>>>> "outputResult(outputs["Result"],rgeom)"
>>>> was used in all the other functions as well and worked fine there.
>>>>
>>>> I attached my Buffer.zcfg and ogr_ws_service_provider.py.
>>>>
>>>> I really hope you can help me with this problem, too, and am thankful in advance :-)
>>>>
>>>> Cheers and thanks,
>>>> Christian
>>>>
>>>> ________________________________________
>>>> Von: Fenoy Gerald [gerald.fenoy at geolabs.fr]
>>>> Gesendet: Freitag, 15. November 2013 16:18
>>>> An: ZOO-discuss
>>>> Cc: Christian Rüh
>>>> Betreff: Re: [ZOO-Discuss] FOSS4G 2010 ZOO Workshop Problem
>>>>
>>>> Hi Christian,
>>>> it seems that the issue is only in the Python service code.
>>>>
>>>> I noticed a strange thing in the error message, it seems that there is a tabulation ("\t") which was inserted by mistake in the ogr_ws_service_provider.py file on line 18.
>>>>
>>>> Check the expression on line 18 and remove any tabulation located near the "name()=\’Multipolygon\’"
>>>>
>>>> Hope this solve your issue.
>>>>
>>>> Best regards,
>>>>
>>>>
>>>> Le 15 nov. 2013 à 15:24, Sickboy <christian.rueh at uni-rostock.de> a écrit :
>>>>
>>>>> Hi there,
>>>>>
>>>>> I tried to do the above workshop
>>>>> (http://www.zoo-project.org/site/ZooWorkshop2010/Content) and got stuck at
>>>>> step 3.3.1.2 (Creating WPS compliant OGR based Web Services -> Implementing
>>>>> single geometry processes -> Boundary -> Python version). I wasn't able to
>>>>> compile the C version (I'm don't really know anything about C and Linux
>>>>> which might be the problem) so I went for the Python version. If I try one
>>>>> of the URLs given to test the process I get:
>>>>> <ows:ExceptionReport xsi:schemaLocation="http://www.opengis.net/ows/1.1
>>>>> http://schemas.opengis.net/ows/1.1.0/owsExceptionReport.xsd" xml:lan="en"
>>>>> service="WPS" version="1.0.0">
>>>>> <ows:Exception exceptionCode="NoApplicableCode">
>>>>> <ows:ExceptionText>
>>>>> TRACE : xmlXPathEval() failed
>>>>> TRACE : <class 'libxml2.xpathError'>
>>>>> Unable to run your python process properly. Please check the following
>>>>> messages : [' File "/usr/lib/cgi-bin/ogr_ws_service_provider.py", line 18,
>>>>> in Boundary\n
>>>>> geometry=createGeometryFromWFS(inputs["InputPolygon"]["value"])\n', ' File
>>>>> "/usr/lib/cgi-bin/ogr_ws_service_provider.py", line 7, in
>>>>> createGeometryFromWFS\n
>>>>> res=ctxt.xpathEval("/*/*/*/*/*[local-name()=\'Polygon\' or
>>>>> local-\tname()=\'MultiPolygon\']")\n', ' File
>>>>> "/usr/lib/pymodules/python2.6/libxml2.py", line 4894, in xpathEval\n if
>>>>> ret is None:raise xpathError(\'xmlXPathEval() failed\')\n']
>>>>> </ows:ExceptionText>
>>>>> </ows:Exception>
>>>>> </ows:ExceptionReport>
>>>>>
>>>>> There seems to be a problem with the libxml2 library but even with googling
>>>>> I was not able to fix it.
>>>>>
>>>>> The Geoserver was started when the document told me to (but this does not
>>>>> matter as I've tested it without a running Geoserver, too).
>>>>> I'm using the OSGeo Live disk 3.0 because the README
>>>>> (http://zoo-project.org/trac/attachment/wiki/ZooWorkshop2010/Content/README)
>>>>> indicated that.
>>>>> I guess it ain't important but I'm using it with VMWare Player 5 on Windows
>>>>> 7 x64.
>>>>>
>>>>> Help would be greatly appreciated since I'm needing this for a seminar with
>>>>> my students in 2 weeks.
>>>>>
>>>>> Cheers and thanks in advance for any help,
>>>>> Christian
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> View this message in context: http://zoo-discuss.1049523.n5.nabble.com/FOSS4G-2010-ZOO-Workshop-Problem-tp5706683.html
>>>>> Sent from the ZOO-Discuss mailing list archive at Nabble.com.
>>>>> _______________________________________________
>>>>> Zoo-discuss mailing list
>>>>> Zoo-discuss at gisws.media.osaka-cu.ac.jp
>>>>> http://gisws.media.osaka-cu.ac.jp/mailman/listinfo.cgi/zoo-discuss
>>>>
>>>>
>>>> Gérald Fenoy
>>>> gerald.fenoy at geolabs.fr
>>>>
>>>> <Buffer.zcfg><ogr_ws_service_provider.py>
>>> <Buffer.zcfg>
>> <zoo-ogr.html>
>
>
> Gérald Fenoy
> gerald.fenoy at geolabs.fr
>
More information about the Zoo-discuss
mailing list