[QGIS Commit] r12936 - in trunk/qgis/src/plugins/grass:
modules-common scripts
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Fri Feb 12 04:55:42 EST 2010
Author: rblazek
Date: 2010-02-12 04:55:42 -0500 (Fri, 12 Feb 2010)
New Revision: 12936
Added:
trunk/qgis/src/plugins/grass/scripts/qgis.v.kernel.rast.py
Modified:
trunk/qgis/src/plugins/grass/modules-common/v.kernel.qgm
Log:
output opt fix
Modified: trunk/qgis/src/plugins/grass/modules-common/v.kernel.qgm
===================================================================
--- trunk/qgis/src/plugins/grass/modules-common/v.kernel.qgm 2010-02-12 09:49:51 UTC (rev 12935)
+++ trunk/qgis/src/plugins/grass/modules-common/v.kernel.qgm 2010-02-12 09:55:42 UTC (rev 12936)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE qgisgrassmodule SYSTEM "http://mrcc.com/qgisgrassmodule.dtd">
-<qgisgrassmodule label="Gaussian kernel density" module="v.kernel">
+<qgisgrassmodule label="Gaussian kernel density" module="qgis.v.kernel.rast.py">
<option key="input" />
<option key="stddeviation" />
<option key="output" />
Added: trunk/qgis/src/plugins/grass/scripts/qgis.v.kernel.rast.py
===================================================================
--- trunk/qgis/src/plugins/grass/scripts/qgis.v.kernel.rast.py (rev 0)
+++ trunk/qgis/src/plugins/grass/scripts/qgis.v.kernel.rast.py 2010-02-12 09:55:42 UTC (rev 12936)
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+
+############################################################################
+#
+# MODULE: qgis.v.kernel.rast.py
+# AUTHOR(S): Radim Blazek
+#
+# PURPOSE: Export a vectore to PostGIS (PostgreSQL) database table
+# COPYRIGHT: (C) 2009 by Radim Blazek
+#
+# This program is free software under the GNU General Public
+# License (>=v2). Read the file COPYING that comes with GRASS
+# for details.
+#
+#############################################################################
+
+#%Module
+#% description: Generates a raster density map from vector points data using a moving 2D isotropic Gaussian kernel.
+#% keywords: vector, export, database
+#%End
+
+#%option
+#% key: input
+#% type: string
+#% gisprompt: old,vector,vector
+#% key_desc : name
+#% description: Input vector with training points
+#% required : yes
+#%end
+
+#%option
+#% key: stddeviation
+#% type: double
+#% description: Standard deviation in map units
+#% required : yes
+#%end
+
+#%option
+#% key: output
+#% type: string
+#% gisprompt: new,cell,raster
+#% key_desc : name
+#% description: Output raster map
+#% required : yes
+#%end
+
+import sys
+import os
+import string
+try:
+ from grass.script import core as grass
+except ImportError:
+ import grass
+except:
+ raise Exception ("Cannot find 'grass' Python module. Python is supported by GRASS from version >= 6.4" )
+
+def main():
+ input = options['input']
+ output = options['output']
+ stddeviation = options['stddeviation']
+
+ if grass.run_command('v.kernel', input=input, stddeviation=stddeviation, output=output ) != 0:
+ grass.fatal("Cannot run v.kernel.")
+
+if __name__ == "__main__":
+ options, flags = grass.parser()
+ main()
Property changes on: trunk/qgis/src/plugins/grass/scripts/qgis.v.kernel.rast.py
___________________________________________________________________
Added: svn:executable
+ *
More information about the QGIS-commit
mailing list