[GRASS-user] Creating Raster Subsets in GRASS 7.0.0

Moritz Lennert mlennert at club.worldonline.be
Mon May 18 04:27:11 PDT 2015


On 12/05/15 16:23, Jake Chila wrote:
> 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 <http://r.info> returns:
>
> (Tue May 12 11:19:01 2015) r.info <http://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)
>


In your original mail you gave the following region settings:

On 08/05/15 19:13, Jake Chila wrote:> Hey all,
>
> my input is:
>
> g.region n=5572425 s=5536865 e=655050 w=626350 res=30

Which would mean that your map is way outside your region as your n and 
s values are an order of magnitude higher then those of the map.


> 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?

Again, I would suspect region issues.

Moritz


More information about the grass-user mailing list