[GRASS-dev] Documentation glitch
Helmut Kudrnovsky
hellik at web.de
Fri Nov 23 11:19:58 PST 2018
Markus Neteler wrote
> Hi Luís,
>
> Am Fr., 23. Nov. 2018, 16:32 hat Luís Moreira de Sousa <
> luis.de.sousa@
>> geschrieben:
>
>> Dear all,
>>
>> I bumped over a glitch with the documentation for r.out.gdal. One of the
>> examples is:
>> r.out.gdal in=elevation output=elevation.tif type=Float64 \
>> createopt="COMPRESS=DEFLATE"
>>
>> But compression is applied only if the double quotes are left out:
>> r.out.gdal in=elevation output=elevation.tif type=Float64 \
>> createopt=COMPRESS=DEFLATE
>>
>
> Thanks but I cannot confirm this. The GRASS GIS parser takes the right
> side
> as a string, I always use it quoted on command line.
>
> Anyone else who can comment here?
tested here in winGRASS
#### with quotes
r.out.gdal input=elevation at PERMANENT output=D:\temp\testtt\test.tif
format=GTiff type=Float64 createopt=COMPRESS=DEFLATE
Checking GDAL data type and nodata value...
ERROR 6: SetColorTable() only supported for Byte or UInt16
bands in TIFF format.
Using GDAL data type <Float64>
Input raster map contains cells with NULL-value (no-data). The value -1.#IND
will be used to represent no-data values in the input map. You can specify a
nodata value with the nodata option.
Exporting raster data to GTiff format...
r.out.gdal complete. File <D:\temp\testtt\test.tif> created.
D:\temp\testtt>gdalinfo test.tif
Driver: GTiff/GeoTIFF
Files: test.tif
Size is 527, 475
Coordinate System is:
PROJCS["NAD83(HARN) / North Carolina",
GEOGCS["NAD83(HARN)",
DATUM["NAD83_High_Accuracy_Reference_Network",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6152"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4152"]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["standard_parallel_1",36.16666666666666],
PARAMETER["standard_parallel_2",34.33333333333334],
PARAMETER["latitude_of_origin",33.75],
PARAMETER["central_meridian",-79],
PARAMETER["false_easting",609601.22],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["X",EAST],
AXIS["Y",NORTH],
AUTHORITY["EPSG","3358"]]
Origin = (629992.500000000000000,228513.000000000000000)
Pixel Size = (28.500000000000000,-28.500000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_SOFTWARE=GRASS GIS 7.7.svn with GDAL 2.3.2
Image Structure Metadata:
COMPRESSION=DEFLATE
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 629992.500, 228513.000) ( 78d46'27.71"W, 35d48'35.02"N)
Lower Left ( 629992.500, 214975.500) ( 78d46'28.93"W, 35d41'15.74"N)
Upper Right ( 645012.000, 228513.000) ( 78d36'29.41"W, 35d48'33.50"N)
Lower Right ( 645012.000, 214975.500) ( 78d36'31.54"W, 35d41'14.23"N)
Center ( 637502.250, 221744.250) ( 78d41'29.40"W, 35d44'54.73"N)
Band 1 Block=527x1 Type=Float64, ColorInterp=Gray
Description = elevation at PERMANENT
NoData Value=nan
Metadata:
COLOR_TABLE_RULES_COUNT=5
COLOR_TABLE_RULE_RGB_0=5.557879e+001 7.572901e+001 0 191 191 0 255 0
COLOR_TABLE_RULE_RGB_1=7.572901e+001 9.587922e+001 0 255 0 255 255 0
COLOR_TABLE_RULE_RGB_2=9.587922e+001 1.160294e+002 255 255 0 255 127 0
COLOR_TABLE_RULE_RGB_3=1.160294e+002 1.361797e+002 255 127 0 191 127 63
COLOR_TABLE_RULE_RGB_4=1.361797e+002 1.563299e+002 191 127 63 20 20 20
#### without quotes
C:\>r.out.gdal input=elevation at PERMANENT output=D:\temp\testtt\test3.tif
format=GTiff type=Float64 createopt="COMPRESS=DEFLATE"
Checking GDAL data type and nodata value...
100%
Using GDAL data type <Float64>
Input raster map contains cells with NULL-value (no-data). The value
-1.#IND will be used to represent no-data values in the input map. You can
specify a nodata value with the nodata option.
Exporting raster data to GTiff format...
ERROR 6: SetColorTable() only supported for Byte or UInt16 bands in TIFF
format.
100%
r.out.gdal complete. File <D:\temp\testtt\test3.tif> created.
D:\temp\testtt>gdalinfo test3.tif
Driver: GTiff/GeoTIFF
Files: test3.tif
Size is 527, 475
Coordinate System is:
PROJCS["NAD83(HARN) / North Carolina",
GEOGCS["NAD83(HARN)",
DATUM["NAD83_High_Accuracy_Reference_Network",
SPHEROID["GRS 1980",6378137,298.257222101,
AUTHORITY["EPSG","7019"]],
TOWGS84[0,0,0,0,0,0,0],
AUTHORITY["EPSG","6152"]],
PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]],
UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9122"]],
AUTHORITY["EPSG","4152"]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["standard_parallel_1",36.16666666666666],
PARAMETER["standard_parallel_2",34.33333333333334],
PARAMETER["latitude_of_origin",33.75],
PARAMETER["central_meridian",-79],
PARAMETER["false_easting",609601.22],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]],
AXIS["X",EAST],
AXIS["Y",NORTH],
AUTHORITY["EPSG","3358"]]
Origin = (629992.500000000000000,228513.000000000000000)
Pixel Size = (28.500000000000000,-28.500000000000000)
Metadata:
AREA_OR_POINT=Area
TIFFTAG_SOFTWARE=GRASS GIS 7.7.svn with GDAL 2.3.2
Image Structure Metadata:
COMPRESSION=DEFLATE
INTERLEAVE=BAND
Corner Coordinates:
Upper Left ( 629992.500, 228513.000) ( 78d46'27.71"W, 35d48'35.02"N)
Lower Left ( 629992.500, 214975.500) ( 78d46'28.93"W, 35d41'15.74"N)
Upper Right ( 645012.000, 228513.000) ( 78d36'29.41"W, 35d48'33.50"N)
Lower Right ( 645012.000, 214975.500) ( 78d36'31.54"W, 35d41'14.23"N)
Center ( 637502.250, 221744.250) ( 78d41'29.40"W, 35d44'54.73"N)
Band 1 Block=527x1 Type=Float64, ColorInterp=Gray
Description = elevation at PERMANENT
NoData Value=nan
Metadata:
COLOR_TABLE_RULES_COUNT=5
COLOR_TABLE_RULE_RGB_0=5.557879e+001 7.572901e+001 0 191 191 0 255 0
COLOR_TABLE_RULE_RGB_1=7.572901e+001 9.587922e+001 0 255 0 255 255 0
COLOR_TABLE_RULE_RGB_2=9.587922e+001 1.160294e+002 255 255 0 255 127 0
COLOR_TABLE_RULE_RGB_3=1.160294e+002 1.361797e+002 255 127 0 191 127 63
COLOR_TABLE_RULE_RGB_4=1.361797e+002 1.563299e+002 191 127 63 20 20 20
it seems in both ways the tifs are compressed
-----
best regards
Helmut
--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Dev-f3991897.html
More information about the grass-dev
mailing list