[GRASS-user] Creating Raster Subsets in GRASS 7.0.0

Jake Chila jake.chila at gmail.com
Tue May 12 07:23:04 PDT 2015


Hi Moritz,

I definitely did mean 'g.region -p', sorry for that. I ended up getting it
to work using 'r.mapcalc' after setting the region. I saw someone online
had used it with the simple expression newmap=oldmap. Then, when I export
the newmap it is only of the subset. This small workaround was easy to set
up, but I don't have any idea why it didn't work in the first place.

r.info returns:

(Tue May 12 11:19:01 2015)

r.info map=L5_2007_ATCOR_COMP at Jacob

 +----------------------------------------------------------------------------+
 | Map:      L5_2007_ATCOR_COMP at Jacob       Date: Mon May 04 14:31:43 2015
   |
 | Mapset:   Jacob                          Login of Creator: Jacob
  |
 | Location: FordingRiver
  |
 | DataBase: C:\Users\Jacob\Documents\grassdata
  |
 | Title:     ( L5_2007_ATCOR_COMP )
   |
 | Timestamp: none
   |
 |----------------------------------------------------------------------------|
 |
   |
 |   Type of Map:  raster               Number of Categories: 0
  |
 |   Data Type:    CELL
  |
 |   Rows:         11374
   |
 |   Columns:      12191
   |
 |   Total Cells:  138660434
   |
 |        Projection: UTM (zone 11)
  |
 |            N:     557000    S:     554300   Res: 0.23738351
   |
 |            E:     659000    W:     642200   Res: 1.37806579
   |
 |   Range of data:    min = 0  max = 32767
  |
 |
   |
 |   Data Description:
   |
 |    generated by r.composite
   |
 |
   |
 |   Comments:
   |
 |    r.composite red="GRASS_ATCOR_2007_B3 at Jacob" green="GRASS_ATCOR_2007_\
  |
 |    B2 at Jacob" blue="GRASS_ATCOR_2007_B1 at Jacob" levels=32 output="L5_2007\
  |
 |    _ATCOR_COMP"
   |
 |
   |
 +----------------------------------------------------------------------------+
(Tue May 12 11:19:02 2015) Command finished (0 sec)


However, I have encountered a new problem. On one of my ETM+ images, the
subset is returned as an empty raster. The process runs fine on the other
ETM+ image from one year earlier but for some reason, the subset from the
scene one year later has a min and max data range of 'NULL'. This range
appears to be constant across all the other scenes, so is there a way for
me to quickly edit this scene so it has the correct data?

Thanks,

JDC

On Tue, May 12, 2015 at 3:33 AM, Moritz Lennert <
mlennert at club.worldonline.be> wrote:

> On 08/05/15 19:13, Jake Chila wrote:
>
>> Hey all,
>>
>> I am currently working with some landsat data in Grass 7.0.0 on windows
>> 7, and am trying to hone in on my study area (much smaller than the
>> whole scene). From what I can tell, the best way to do this is through
>> the 'g.region' command however, I am having significant problems getting
>> this module to run correctly.
>>
>> my input is:
>>
>> g.region n=5572425 s=5536865 e=655050 w=626350 res=30
>>
>> One thing is that it runs in '0 seconds' so I think that is a little odd.
>>
>
> It's normal as the command just changes a few entries in a text file, so
> it is really fast.
>
>
>> When I use the 'g.region -d' command I can see that everything is set
>> properly,
>>
>
> Did you maybe mean g.region -p ? At least this is the command you should
> use to check current region settings.
>
>  however when I update the map display nothing changes. Also,
>> when I export the file using 'r.out.gdal' it exports nothing.
>>
>>
>> ('r.out.gdal -t -f --overwrite input=LT5_2007_ATCORRCOMP at May_Project
>> output=C:\Users\Jacob\Desktop\GRASS_Trials\exportattempt5 format=GTiff
>> type=Uint16 nodata=0)
>>
>
> That should normally respect the region settings.
>
> What does
>
> r.info LT5_2007_ATCORRCOMP
>
> give you ?
>
> Moritz
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20150512/736f3485/attachment-0001.html>


More information about the grass-user mailing list