Greetings
I have a raster map with a size like 25000 x 30000 with valid values on all its extent. With another raster, I defined a sub-extent of this raster, much smaller where only a small area is valid and the rest it NULL() like this:
r.mapcalc output = if(regional_area@PERMANENT>0,2004@Reg,null())
In this case, regional_area is a smaller area and I want to select only a portion of 2004@Reg that falls inside regional_area.
So I obtained output as a raster map with only some values (4000x3000)
If I define g.region rast=output I still obtain a 25000 x30000 region which does not make sense since I only have a small valid area.
How can I define a region, using g.region for only output valid pixels?
Thanks
Luisa
Greetings
I have a raster map with a size like 25000 x 30000 with valid values on all its extent. With another raster, I defined a sub-extent of this raster, much smaller where only a small area is valid and the rest it NULL() like this:
r.mapcalc output = if(regional_area@PERMANENT>0,2004@Reg,null())
In this case, regional_area is a smaller area and I want to select only a portion of 2004@Reg that falls inside regional_area.
So I obtained output as a raster map with only some values (4000x3000)
If I define g.region rast=output I still obtain a 25000 x30000 region which does not make sense since I only have a small valid area.
How can I define a region, using g.region for only output valid pixels?
NULL values are just as valid as numeric values. Setting cells to NULL doesn’t in any way change the region settings (as you found out
)
What is the extent of the ‘regional_area’ raster ? Check with:
r.info regional_area.
If it’s really only 4000X3000, then set the region using that raster by running:
g.region -p rast=regional_area.
Now
r.mapcalc output=2004
should give you a clipped raster.
···
--
Micha Silver
Arava Development Co. +972-52-3665918
[http://www.surfaces.co.il](http://www.surfaces.co.il)
Luisa Peña wrote:
Greetings
I have a raster map with a size like 25000 x 30000 with valid values on
all
its extent. With another raster, I defined a sub-extent of this raster,
much
smaller where only a small area is valid and the rest it NULL() like this:
r.mapcalc output = if(regional_area@PERMANENT>0,2004@Reg,null())
In this case, regional_area is a smaller area and I want to select only a
portion of 2004@Reg that falls inside regional_area.
So I obtained output as a raster map with only some values (4000x3000)
If I define g.region rast=output I still obtain a 25000 x30000 region
which
does not make sense since I only have a small valid area.
How can I define a region, using g.region for only output valid pixels?
Thanks
Luisa
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
g.region zoom=output ?
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Region-definition-tp6207972p6210464.html
Sent from the Grass - Users mailing list archive at Nabble.com.