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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to