[GRASS-user] r.out.gdal output size vs input size

Hi!

I have imported a DEM into Grass. I have done no changes to the file.
Now I want to export the same file with r.out.gdal. However, the
problem is that the file is getting huge. My imported file was a 76MB
Gtiff file. The output is so far getting up to 7GB!! I have not tested
it going all the way as I figure something must be wrong.

My export command is like this:
r.out.gdal input=stryn_slope output=/home/espen/test.dem

I am guessing I am doing something wrong, but I don't understand what it is?

kind regards,
Espen

Hi Espen,

r.out.gdal uses the current region settings. Is it possible that you've set
a high region resolution? Then your GeoTIFF is probably being resampled to a
higher resolution, causing the file to be a lot bigger.

Best,
Daniel
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-out-gdal-output-size-vs-input-size-tp5291740p5291763.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Quite possible that I did something wrong with the region :slight_smile:

I just used the default when creating the new location. And that is
probably 1 meter( I am dealing with 10 meter DEM's).

Can I somehow change the region resolution once the location is
created? Or force r.out.gdal to export with a different resolution
setting?

I can always create a new location, I am just curios to see if I can
fix this is my current location.

Espen

2010/7/14 LeeDaniel <Lee.Daniel.1986@gmail.com>:

Hi Espen,

r.out.gdal uses the current region settings. Is it possible that you've set
a high region resolution? Then your GeoTIFF is probably being resampled to a
higher resolution, causing the file to be a lot bigger.

Best,
Daniel
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-out-gdal-output-size-vs-input-size-tp5291740p5291763.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

In my opinion, the easiest way would be to set the region according to your
GeoTIFF. You can do that with g.region using the parameter rast=your_raster

More here:
http://grass.itc.it/gdp/html_grass64/g.region.html

If you set the region to your GeoTIFF, the extent and resolution of the
region will match its original specifications so your output file should be
~ the same size as the original :slight_smile:
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-out-gdal-output-size-vs-input-size-tp5291740p5291817.html
Sent from the Grass - Users mailing list archive at Nabble.com.

Ok, answering my own questions here I guess. Did not help just setting
the resolution to the correct value, but when I redefined the region
by

g.region rast=stryn_slope -p

and then did an export it all worked very nicely.

Thanks LeeDaniel!

Espen

2010/7/14 Espen Isaksen <espen.isaksen@gmail.com>:

Quite possible that I did something wrong with the region :slight_smile:

I just used the default when creating the new location. And that is
probably 1 meter( I am dealing with 10 meter DEM's).

Can I somehow change the region resolution once the location is
created? Or force r.out.gdal to export with a different resolution
setting?

I can always create a new location, I am just curios to see if I can
fix this is my current location.

Espen

2010/7/14 LeeDaniel <Lee.Daniel.1986@gmail.com>:

Hi Espen,

r.out.gdal uses the current region settings. Is it possible that you've set
a high region resolution? Then your GeoTIFF is probably being resampled to a
higher resolution, causing the file to be a lot bigger.

Best,
Daniel
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-out-gdal-output-size-vs-input-size-tp5291740p5291763.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Thanks LeeDaniel, that is what I figured too :slight_smile: I am still a bit new
to Grass so I have to get used to this region stuff.

Espen

2010/7/14 LeeDaniel <Lee.Daniel.1986@gmail.com>:

In my opinion, the easiest way would be to set the region according to your
GeoTIFF. You can do that with g.region using the parameter rast=your_raster

More here:
http://grass.itc.it/gdp/html_grass64/g.region.html

If you set the region to your GeoTIFF, the extent and resolution of the
region will match its original specifications so your output file should be
~ the same size as the original :slight_smile:
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/r-out-gdal-output-size-vs-input-size-tp5291740p5291817.html
Sent from the Grass - Users mailing list archive at Nabble.com.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user