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

Mark Seibel mseibel at gmail.com
Thu Feb 3 10:35:38 EST 2011


There is some very good documentation on Python and GRASS.  I hope
this helps.  http://grass.osgeo.org/wiki/GRASS_and_Python

Mark

On Thu, Feb 3, 2011 at 9:57 AM, katrin eggert
<katrineggert1980 at gmail.com> wrote:
> 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)?
> THanks
> Best regards,
> Kat
>
> 2011/2/3 Micha Silver <micha at arava.co.il>
>>
>> katrin eggert wrote:
>>
>> HEy
>>
>> I have three questions:
>> 1- Is it possible to define active region spatial resolution by selecting
>> an image instead of putting values?
>>
>> Using a grass raster, yes. g.region rast=....
>>
>>
>> 2- What is done with -a flag?
>>
>> If you have , i.e. a resolution of 5 meters and the E-W extent is 99
>> meters, then with the -a flag the region will be reset to 100 m. Without the
>> -a flag, the resolution will be recalculated so that it fits into the
>> extents. So in the above case, without -a, the E-W res will be changed to
>> 4.95
>>
>>
>> 3- Just to confirm this, when an image is imported with r.in.gdal it is
>> kept with its original resolution right? it only gets the active region
>> spatial resolution when I process it right (e.g. mapcalc or somethingg)
>>
>>
>> AFAIK, yes.
>>
>>
>> Thanks
>> Kat
>> This mail was received via Mail-SeCure System.
>>
>> ________________________________
>> _______________________________________________
>> grass-user mailing list
>> grass-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-user
>>
>> This mail was received via Mail-SeCure System.
>>
>>
>>
>
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>
>


More information about the grass-user mailing list