[ZOO-Discuss] some problems with the zoo-services examples
Marco Negretti
marco.negretti at polimi.it
Fri Oct 29 07:43:24 PDT 2010
Il 23/10/2010 17:20, Gérald Fenoy ha scritto:
> Hi Marco,
> thanks a lot for your feedbacks.
>>
>> === ogr/base-vect-ops ===
> 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.
>
> 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 at mimeType=text/xml .
> You can even specify if you want base64 encoded string, using encoding
> attribute : ResponseDocument=Result at mimeType=text/xml at encoding=base64.
>
Thank you Gérald,
now I have my gml file!
But... I have some questions... again!
The file that the service produces has always the same extension: .js
both if I ask for a gml file and if I ask for a json string:
json:
<wps:Reference href="http://localhost//tmp/Buffer_128419.js"
mimeType="text/plain" encoding="UTF-8"/>
gml:
<wps:Reference href="http://localhost//tmp/Buffer_128538.js"
mimeType="text/xml" encoding="UTF-8"
schema="http://fooa/gml/3.1.0/polygon.xsd"/>
To fix the file extension I have to specify in the request: extension=gml
responsedocument=Result at mimeType=text/xml at asReference=true at extension=gml
In this way I obtain as response:
<wps:Reference href="http://localhost//tmp/Buffer_123298.gml"
mimeType="text/xml" encoding="UTF-8"
schema="http://fooa/gml/3.1.0/polygon.xsd"/>
Is it ok?
I have used also the Boundary service. It works, but when I ask for the
gml format in output, the mimeType document that I obtain is text/plain,
not text/xml as for the Buffer service:
<wps:Reference href="http://localhost//tmp/Boundary_129100.js"
mimeType="text/plain" encoding="UTF-8"/>
It's right if I replace, in service.c:
setMapInMaps(outputs,"Result","mimeType","text/plain");
with
setMapInMaps(outputs,"Result","mimeType","text/xml");
(row 220)
And finally... in the GetArea service there is the possibility to choose
to obtain the result in different units of measure:
<UOMs>
<Default>
<ows:UOM>degree</ows:UOM>
</Default>
<Supported>
<ows:UOM>meter</ows:UOM>
</Supported>
</UOMs>
(this is an extract of describe process response)
If I add in the execute request:
responsedocument=Area at UOM=meter
I get:
<wps:Data>
<wps:LiteralData UOM="meter" DataType="float">1592705132</wps:LiteralData>
</wps:Data>
that is the same that I obtain without anything:
<wps:Data>
<wps:LiteralData DataType="float" uom="degree">1592705132</wps:LiteralData>
</wps:Data>
I don't understand exactly the sense of this option.
I've checked the code and the GetArea function doesn't consider this
parameter in the calculation process.
Thank you again!
Ciao
Marco
--
Marco Negretti
Politecnico di Milano - Polo Regionale di Como
email: marco.negretti at polimi.it
http://geomatica.como.polimi.it/
_________________________________________________________
http://www.gnu.org/philosophy/no-word-attachments.it.html
More information about the Zoo-discuss
mailing list