[GRASS-user] Retrieve list of values in Python

Christian Schwartze christian.schwartze at uni-jena.de
Tue Mar 29 18:39:28 EDT 2011


In order to get a list, here is just one approach:
vals = os.popen(“r.stats –Nn your_map”).readlines()

Christian.

From: Jenny Turner 
Sent: Tuesday, March 29, 2011 11:55 PM
To: GRASS user list 
Subject: [GRASS-user] Retrieve list of values in Python

Greetings 

I would like to know how can I retrieve the list of available values in a Raster map in a Python Script?
Thanks
Best regards,
Jenny Turner


--------------------------------------------------------------------------------
_______________________________________________
grass-user mailing list
grass-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20110330/b9ba7da3/attachment.html


More information about the grass-user mailing list