[QGIS Commit] r15271 - docs/trunk/english_us/developer_cookbook/source

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Feb 27 13:12:19 EST 2011


Author: wonder
Date: 2011-02-27 10:12:19 -0800 (Sun, 27 Feb 2011)
New Revision: 15271

Modified:
   docs/trunk/english_us/developer_cookbook/source/raster.rst
Log:
Fixed code example for identification of raster layer


Modified: docs/trunk/english_us/developer_cookbook/source/raster.rst
===================================================================
--- docs/trunk/english_us/developer_cookbook/source/raster.rst	2011-02-27 17:58:21 UTC (rev 15270)
+++ docs/trunk/english_us/developer_cookbook/source/raster.rst	2011-02-27 18:12:19 UTC (rev 15271)
@@ -133,10 +133,10 @@
 
 To do a query on value of bands of raster layer at some specified point::
 
-  ident = rlayer.identify(QgsPoint(15.30,40.98))
+  res, ident = rlayer.identify(QgsPoint(15.30,40.98))
   for (k,v) in ident.iteritems():
     print str(k),":",str(v)
 
-The identify function returns a dictionary - keys are band names, values are the values at chosen point.
+The identify function returns True/False (to indicate succeess or failure) and a dictionary - keys are band names, values are the values at chosen point.
 Both key and value are QString instances so to see actual value you'll need to convert them to python strings (as shown in code snippet). 
 



More information about the QGIS-commit mailing list