Platform: GNU/Linux/x86
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: GRASS 6.0.2 (2006)
r.out.gdal does export the region as defined in "g.region -p", but the full input raster file. (my gdalwarp is also a standard debian binary, GDAL 1.3.1.0, released 2005/10/04.)
on the spearfish60 data set I get the following:
GRASS 6.0.2 (spearfish60):
# exemplary data
d.rast elevation.dem
# set to arbitrary region
g.region n=4926900 s=4923600 e=604800 w=601200
d.redraw
# export to tiff
r.out.tiff input=elevation.dem output=tmp1
# the resulting "tmp1.tif" is equal to
g.region n=4926900 s=4923600 e=604800 w=601200
d.redraw
# -> as expected
# export to gtiff
r.out.gdal input=elevation.dem output=tmp2.tif type=UInt16
# the resulting "tmp2.tif" is equal to the full raster file:
g.region county
d.redraw
-------------------------------------------- Managed by Request Tracker
I personally like the way r.out.gdal behaves now, as usually I need to
export full rasters I create, not a parts of them. Present r.out.gdal
bahaviour saves me fiddling with g.region prior to export. The
trim-to-current-region behavior would be nice as an option though (no
need for intermediate r.mapcalc then). My 0,01 PLN.
I personally like the way r.out.gdal behaves now, as usually I need to
export full rasters I create, not a parts of them. Present r.out.gdal
bahaviour saves me fiddling with g.region prior to export. The
trim-to-current-region behavior would be nice as an option though (no
need for intermediate r.mapcalc then). My 0,01 PLN.
"This is a question about the past, is it? ... How can I tell that the past isn't a fiction designed to account for the discrepancy between my immediate physical sensations and my state of mind?"
Platform: GNU/Linux/x86
grass obtained from: Other (CDROM etc)
grass binary for platform: Downloaded precompiled Binaries
GRASS Version: GRASS 6.0.2 (2006)
r.out.gdal does export the region as defined in "g.region -p", but the full input raster file.
I just found that it is pretty easy to support at least
the current region extent:
This would seem like a good example of why Glynn insisted on retaining r.resample. r.resample to a temporary file and export that would achieve the desired effect (i.e. consistent with other raster export modules) I think? Although would require twice as much disk space. I agree it should be made consistent (i.e. export based on the current region settings).
>> this bug's URL: http://intevation.de/rt/webrt?serial_num=5043
>> -------------------------------------------------------------------------
>>
>> Subject: r.out.gdal does not export "g.region -p"
>>
>> Platform: GNU/Linux/x86
>> grass obtained from: Other (CDROM etc)
>> grass binary for platform: Downloaded precompiled Binaries
>> GRASS Version: GRASS 6.0.2 (2006)
>>
>>
>> r.out.gdal does export the region as defined in "g.region -p", but the full input raster file.
>
> I just found that it is pretty easy to support at least
> the current region extent:
This would seem like a good example of why Glynn insisted on retaining
r.resample. r.resample to a temporary file and export that would achieve
the desired effect (i.e. consistent with other raster export modules) I
think? Although would require twice as much disk space. I agree it should
be made consistent (i.e. export based on the current region settings).
I would suggest that r.out.gdal should behave like other export
modules and use the current region. If you want "raw" export; you can
always use "g.region rast=..." first.
r.in.* modules are a special case, as you can't use "g.region rast="
before you've imported the raster.
> >> r.out.gdal does export the region as defined in "g.region -p",
> >> but the full input raster file.
Paul:
> This would seem like a good example of why Glynn insisted on
> retaining r.resample. r.resample to a temporary file and export
> that would achieve the desired effect (i.e. consistent with other
> raster export modules) I think? Although would require twice as
> much disk space. I agree it should be made consistent (i.e. export
> based on the current region settings).
Glynn:
I would suggest that r.out.gdal should behave like other export
modules and use the current region. If you want "raw" export; you can
always use "g.region rast=..." first.
r.in.* modules are a special case, as you can't use "g.region rast="
before you've imported the raster.
Yes, r.out.gdal should act like other raster modules and work from the
current region. But this goes back to r.out.gdal should be a real module
instead of a wrapper script. Then we could do away with the gdal-plugin
dependancy for generic raster output, which I think is a bit of an
unnecessary burden for regular users to have to worry about for expected
functionality.