[Pywps-devel] [Pywps-commits] PyWPS 3.0-svn examples Problem Fix and more

Jachym Cepicky jachym.cepicky at gmail.com
Mon Jan 19 09:01:07 CET 2009


Hi,

this seems to tbe between various GRASS versions (maybe some v.buffer
change between GRASS 6.4 and 6.2) and PyWPS (I thing, I updated the
examples up to grass 6.3) -- feel free to fix the example processes,
so the work for you.

The second problem: By default, (Py)WPS returns resulting data as
ComplexValue output type. It appears, that embeding binary data (PNG
file in this case) directly into XML files even in CDATA section does
not provide valide XML.

All you have to do is to call the request of the process execution
with definition for the process outputs and define, that the output
map files should be returned back as reference, examples:

for HTTP GET:

...&responsedocument=[buffer=@asreference=true]

for HTTP POST:

......
 </wps:DataInputs>
        <wps:ResponseForm>
                <wps:ResponseDocument wps:storeExecuteResponse="true"
wps:status="frue">
                    <wps:Output wps:asReference="false">
                        <ows:Identifier>buffer</ows:Identifier>
                    </wps:Output>
                    <wps:Output wps:asReference="true">
                        <ows:Identifier>bufferRaster</ows:Identifier>
                    </wps:Output>
                </wps:ResponseDocument>
        </wps:ResponseForm>


see doc/examples/* for details

j

2009/1/12 Andres Herrera <t763rm3n at gmail.com>:
> hi list again, i'd put pywps working now
>
> setting the right grass database, and chmod 755 on this
>
> and also removing the type=area param from exampleBufferProcess.py
>
>  #self.cmd("v.to.rast use=cat input=data_buff output=buff type=area")
>  self.cmd("v.to.rast use=cat input=data_buff output=buff")
>
> couse is not referenced in v.to.rast, and the pywps response hangs the
> following error:
>
> "Sorry, <type> is not a valid parameter"
>
> the http://grass.itc.it/grass62/manuals/html62_user/v.to.rast.html
>
>
> and also, fix those lines:
>
>   # deside, if the user wants PNG or GeoTIFF format
>   #bufffile = "buffer.png"
>         if self.bufferRasterOut.format["mimeType"] == "image/tiff":
>             #losfile = "buffer.tif"
>             bufffile = "buffer.tif"
>             self.cmd("r.out.gdal in=buff out=buffer.tif type=Byte")
>         else:
>             bufffile = "buffer.png"
>             self.cmd("r.out.png in=buff out=buffer.png")
>
>
> now pywps and exampleBufferProcess is working
>
> ./wps
> "version=1.0.0&service=Wps&request=Execute&Identifier=exampleBufferProcess&datainputs=[data=http://192.168.1.15/tmp/wgs84_vallecauca_v.gml;width=1]&responsedocument=[bufferRaster=@mimeType=image/png@asreference=true]"
>
>
> http://192.168.1.15/cgi-bin/wps?version=1.0.0&service=Wps&request=Execute&Identifier=exampleBufferProcess&datainputs=[data=http://192.168.1.15/tmp/wgs84_vallecauca_v.gml;width=1]&responsedocument=[bufferRaster=@mimeType=image/tiff@asreference=true]
>
> or
>
> http://192.168.1.15/cgi-bin/wps?version=1.0.0&service=Wps&request=Execute&Identifier=exampleBufferProcess&datainputs=[data=http://192.168.1.15/tmp/wgs84_vallecauca_v.gml;width=1]&responsedocument=[bufferRaster=@mimeType=image/png@asreference=true]
>
>
> But , goes a estrange response  :  ( i thought is some encoding problem ),
> check these out:
>
>
> the pywps response
>
> http://picasaweb.google.com/lh/photo/dSay1DBymfndApeE_52PyQ?feat=directlink
>
>
> the source code of pywps response
>
> http://picasaweb.google.com/lh/photo/CGEf1Uyk0xvb3_8DAmF4qA?feat=directlink
>
>
> the response on wpsoutputs
>
> http://picasaweb.google.com/lh/photo/O15YO35wCS7AdS5MSt5tRA?feat=directlink
>
> small purple box
> http://picasaweb.google.com/lh/photo/KU1TZHAD0zcbBJU-K3Yy-w?feat=directlink
>
>
>
>
> Thanks for your help !!
>
>
>
>
>
>
>
> --
> =====================================================
> Ing. Fabio Andres Herrera
> Gerente de Proyectos
> From Sky - UAV & RPV Systems
> Santiago de  Cali
> Web Site :http://fromsky.hrglobalideas.com
> Blog:http://andresherreracali.blogspot.com
> e-mail:
> andres at hrglobalideas.com
>        fandresherrera at hotmail.com
>
> _______________________________________________
> Pywps-commits mailing list
> Pywps-commits at wald.intevation.org
> http://lists.wald.intevation.org/mailman/listinfo/pywps-commits
>
>



-- 
Jachym Cepicky
e-mail: jachym.cepicky gmail com
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/pgp/JachymCepicky.pgp


More information about the Pywps-devel mailing list