[GRASS-user] DEM export to GeoTiff

Markus Metz markus.metz.giswork at googlemail.com
Wed Jan 14 12:12:38 EST 2009



Stefan Mietke wrote:
>
> Hello list,
>
> I have a problem with exporting a DEM to *tif.
>
> In a first step I import it via r.in.gdal and in a second step I 
> export it with r.out.gdal and the file is not the same anymore. GDAL 
> reduce the file to one pixel but a greater storage size..
>
> Even the settings (tags) changes total.
>
> Here are some extracts from gdalinfo:
>
> Before:
>
> Driver: GTiff/GeoTIFF
> Size is 108, 84
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 45N",
> [...]
>
> Band 1 Block=64x64 Type=UInt16, ColorInterp=Gray
>   Computed Min/Max=4349.000,5738.000
> [EOF]
>
> After:
>
> Driver: GTiff/GeoTIFF
> Size is 1, 1
>
r.out.gdal works within the current region settings, i.e. your exported 
raster may have different extends and a different resolution.
Your region settings are wrong.
Check with g.region -p
You will see that your region is set to have only one row and only one 
column
run g.region rast=myrast
well, not exactly, replace myrast with the name of the raster you want 
to export
then run r.out.gdal, you should see that the files are identical.
>
> Coordinate System is:
> PROJCS["WGS 84 / UTM zone 45N",
> [...]
>
> Band 1 Block=1x1 Type=UInt16, ColorInterp=Palette
>   Computed Min/Max=0.000,0.000
>   NoData Value=-32768
>   Metadata:
>   COLOR_TABLE_RULES_COUNT=1
>   COLOR_TABLE_RULE_RGB_0=4.349000e+03 5.738000e+03 0 0 0 255 255 255
>   Color Table (RGB with 65536 entries)
>   0: 0,0,0,255
>   1: 0,0,0,255
>
> [and 65533 more lines ...]
>
run r.out.gdal -c
the -c flag supresses exporting of these long colortables, they cause 
problems.

Hope that helps,

Markus M

PS: please post messages as plain text
>
>
> I mean it is a very simple process (import/export) but it don't work 
> on my computer satisfactorily. So what I'm doing wrong?
>
> Kind regards,
>
> Stefan
>
>
> ------------------------------------------------------------------------
>
> *Yahoo! Canada Toolbar :* Search from anywhere on the web and bookmark 
> your favourite sites. Download it now! <http://ca.toolbar.yahoo.com/>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user
>   


More information about the grass-user mailing list