<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Marco,<div>thanks a lot for your feedbacks.</div><div><br></div><div><div><div>Le 22 oct. 2010 à 16:27, Marco Negretti a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi,<br>I installed the Zoo kernel and I guess that it works... the hello-py <br>example works.<br></div></blockquote><div><br></div>Nice, indeed it sounds good.</div><div><br><blockquote type="cite"><div>I'm trying to use the other examples in zoo-services dir but I had some <br>problems:<br><br>=== gdal/translate ===<br>I can't compile the service: when I launch the make command I have many <br>warning messages and this error message:<br><br>./service.c:135: error: 'mtoupper' was not declared in this scope<br><br>Some ideas?<br></div></blockquote><div><br></div><div>Sorry I missed this mtoupper call. This function disapear from the current tree. I will fix this one soon.</div><br><blockquote type="cite"><div><br>=======<br>ogr/ogr2ogr<br>I compiled the code and copied in my web server zoo dir<br>Ogr2Ogr.zcfg and ogr_2_ogr_service.zo<br><br>I think that the Ogr2Ogr.zcfg is wrong:<br>for example,<br>line 1: Title = Convert raster data from one format to another.<br>line 21: (type of data input) : value = AAIGrid (Arc/Info ASCII Grid)<br>...and some other...<br><br>Isn't it a process for vector conversion?<br></div></blockquote><div><br></div>You're right, it seems that we simply copy the gdal translate zcfg file here. Corrected, thanks.</div><div><br><blockquote type="cite"><div><br>I rewrited the Ogr2Ogr.zcfg, but the service doesn't work:<br><wps:ProcessFailed><br> <ows:ExceptionReport xml:lang="en-US" version="1.1.0"><br> <ows:Exception exceptionCode="NoApplicableCode"><br> <ows:ExceptionText>No more information <br>available</ows:ExceptionText><br> </ows:Exception><br> </ows:ExceptionReport><br></wps:ProcessFailed><br><br>It's possible that I made some errors in my zcfg file, but... "No more <br>information available"<br>Did someone try to use this examples?<br></div></blockquote><br></div><div>This example was tested today and it works well. You have to know that this service will require that you set the dataPath variable in the main section of your main configuration file to the directory where your data is located. Indeed the ogr2ogr service concat the dataPath and the filename (shall be a simple filename not a path) to access the original datasource, then the service use the tmpPath to store the produced file (so this last shall also be set in the main section of your main configuration file). </div><div><br></div><div>The new zcfg file was commited on the SVN source tree today. I've also modify the ogr2ogr_service code to add the specific error message when the service fails. This way we shall no more get the "No more information available" message displayed (except maybe for unhandled error :] ).</div><div><br></div><div><blockquote type="cite"><div><br>=== ogr/base-vect-ops ===<br>I compiled the code and copied in my web server zoo dir Buffer.zcfg and <br>ogr_service.zo.<br>The service work properly, I send as input a WFS map with one polygon <br>and the service calculates the buffer, but the output is a .js file.<br><br>This is a part of service response:<br><br><wps:ProcessOutputs><br> <wps:Output><br> <ows:Identifier>Result</ows:Identifier><br> <ows:Title>Buffered Polygon</ows:Title><br> <ows:Abstract><br> GML stream describing the buffered polygon feature.<br> </ows:Abstract><br> <wps:Reference href="<a href="http://localhost/tmp/Buffer_130521.js">http://localhost/tmp/Buffer_130521.js</a>" <br>mimeType="text/plain" encoding="UTF-8"/><br> </wps:Output><br></wps:ProcessOutputs><br><br>and this is an extract of the file .js with the buffer coordinates:<br>{ "type": "Polygon", "coordinates": [ [ [ 307875.325459, 5360132.252371 <br>], [ 307311.888640, 5360142.807357 ], [ 307309.284548, 5360142.924101 ],<br>...<br> [ 307835.808046, 5358896.308003 ], [ 307875.325459, 5360132.252371 ] ] ] }<br><br>How can I get a gml file as output?<br></div></blockquote><div><br></div><div>First, you get the json string stored as an external file because the zcfg Result contains the asReference attribue set to true, you can set it to false to use the default behavior.</div><div><br></div>You can get the gml polygon stored as file simply by adding mimeType attribute to the ResponseDocument parameter and setting it to text/xml. So, you can something like : ResponseDocument=Result@mimeType=text/xml . You can even specify if you want base64 encoded string, using encoding attribute : ResponseDocument=Result@mimeType=text/xml@encoding=base64.</div><div><br></div><div>Note that you can get the result directly included in the Response document adding the asReference attribute to the ResponseDocument parameter and setting it to false (or true if you want to store it).</div><div><br></div><div>Note that in any case currently only the geometry was returned by the services so only the gml:polygon will be stored as external file. Your client shall then use the encoding, schema, mimeType and so on to know what is the format of the file it will have to open. We can re-adapt the current code to provide a full feature rather than only a geometry.</div><div><br></div><div>Hope to hear from you,</div><div>Best regards,</div><div><br></div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div><span class="Apple-style-span" style="font-size: 12px; "><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Gérald Fenoy</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:gerald.fenoy@geolabs.fr"><span class="Apple-style-span" style="color: rgb(0, 0, 238); -webkit-text-decorations-in-effect: underline; ">gerald.fenoy@geolabs.fr</span></a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><span class="Apple-style-span" style="font-size: medium;"><br></span></div></span></div></span></div></div></body></html>