[Pywps-commits] r634 - trunk/pywps/processes
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Wed Sep 17 14:09:50 CEST 2008
Author: jachym
Date: 2008-09-17 14:09:50 +0200 (Wed, 17 Sep 2008)
New Revision: 634
Modified:
trunk/pywps/processes/exampleBufferProcess.py-dist
Log:
more upgrades for exampleBufferProcess
Modified: trunk/pywps/processes/exampleBufferProcess.py-dist
===================================================================
--- trunk/pywps/processes/exampleBufferProcess.py-dist 2008-09-17 12:04:08 UTC (rev 633)
+++ trunk/pywps/processes/exampleBufferProcess.py-dist 2008-09-17 12:09:50 UTC (rev 634)
@@ -95,9 +95,16 @@
# export
self.status.set("Exporting data",90)
self.cmd("v.out.ogr type=area format=GML input=data_buff dsn=out.xml olayer=path.xml")
- self.cmd("r.out.gdal in=buff type=Byte output=buffer.tiff")
+
+ # deside, if the user wants PNG or GeoTIFF format
+ bufffile = "buffer.png"
+ if self.bufferRasterOut.format["mimeType"] == "image/tiff":
+ losfile = "buffer.tif"
+ self.cmd("r.out.gdal in=buff out=buffer.tif type=Byte")
+ else:
+ self.cmd("r.out.png in=buff out=buffer.png")
# setting output values
self.bufferOut.setValue("out.xml")
- self.bufferRasterOut.setValue("buffer.tiff")
+ self.bufferRasterOut.setValue(bufffile)
self.textOut.setValue("hallo, world")
More information about the Pywps-commits
mailing list