[GRASS-user] 2 questions about usage of g.region

Martin Landa landa.martin at gmail.com
Thu Feb 3 10:48:36 EST 2011


2011/2/3 katrin eggert <katrineggert1980 at gmail.com>:
> Thanks Micha and Hermann for your feedback.
> Just one very last question: in a Python script how can I make an variabel
> to equal to an image spatial resolution? (I mean, How can I retrieve an
> image spatial resolution)?

raster_info() [1] e.g.

info = raster_info(map)

print info['nsres'], info['ewres']

Martin

[1] http://grass.osgeo.org/programming7/namespacepython_1_1raster.html#a69e4a61eb59a31608410b733d174b8a7

-- 
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa


More information about the grass-user mailing list