qissue-bot / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
http://qgis.org
GNU General Public License v2.0
0 stars 0 forks source link

GeoTIFF created with GRASS r.out.gdal do not display in QGIS #630

Closed qissue-bot closed 5 years ago

qissue-bot commented 5 years ago

Author Name: Redmine Admin (Redmine Admin) Original Redmine Issue: 643, https://issues.qgis.org/issues/643

Original Assignee: nobody -


Example:

I have exported a [[GeoTIFF]] from GRASS, using r.out.gdal.

In the famous spearfish60 location:

g.region rast=vegcover
r.out.gdal input=vegcover format=GTiff type=Byte output=vegcover.tif

The vegcover.tif looks OK in the gdalinfo output. It displays fine in [[OpenEV]] and GIMP. I can load it back into GRASS with r.in.gdal - values, extent and color table all are preserved.

QGIS however does not display anything after loading it. The map canvas extent and coordinates seem to be set according to raster extent and location, though. I can query the raster and reasonable values are reported. The problem is nothing is visible. No errors printed to the console AFAICT.

The [[GeoTIFF]] is attached.

Maciek


qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Magnus Homann (Magnus Homann) Original Date: 2007-03-10T02:01:03.000Z


The tiff has a GRASS color table that is zero. See: $ gdalinfo vegcover.tif | grep COLOR

It's unclear what color tabel should have precedence, or if this is a malformed TIFF.

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Magnus Homann (Magnus Homann) Original Date: 2007-03-11T00:10:24.000Z


The excerpt below shows the metadata. I have changed qgis to ignore any ramps from 0.0 to 0.0. Hopefully, thsi doesn't break anything, while still allow malformed TIFF to be displayed. Fixed in .

Driver: GTiff/GeoTIFF
Size is 190, 140
Coordinate System is:
PROJCS["unnamed",
     GEOGCS["NAD27",
         DATUM["North_American_Datum_1927",
             SPHEROID["Clarke 1866",6378206.4,294.9786982138982,
                 AUTHORITY[[EPSG""7008]],
             AUTHORITY[[EPSG""6267]],
         PRIMEM[[Greenwich]],
         UNIT[[degree]],
         AUTHORITY[[EPSG""4267]],
     PROJECTION[[Transverse_Mercator]],
     PARAMETER[[latitude_of_origin]],
     PARAMETER[[central_meridian]],
     PARAMETER[[scale_factor]],
     PARAMETER[[false_easting]],
     PARAMETER[[false_northing]],
     UNIT["metre",1,
         AUTHORITY[[EPSG""9001]],
     AUTHORITY[[EPSG""26713]]
Origin = (590000.000000000000000,4928000.000000000000000)
Pixel Size = (100.000000000000000,-100.000000000000000)
Metadata:
   AREA_OR_POINT=Area
Corner Coordinates:
Upper Left  (  590000.000, 4928000.000) (103d52'4.42"W, 44d30'5.97"N)
Lower Left  (  590000.000, 4914000.000) (103d52'13.17"W, 44d22'32.31"N)
Upper Right (  609000.000, 4928000.000) (103d37'44.25"W, 44d29'56.54"N)
Lower Right (  609000.000, 4914000.000) (103d37'54.84"W, 44d22'22.93"N)
Center      (  599500.000, 4921000.000) (103d44'59.16"W, 44d26'14.67"N)
Band 1 Block=190x43 Type=Byte, [[ColorInterp]]=Palette
   [[NoData]] Value=255
   Metadata:
     COLOR_TABLE_RULES_COUNT=6
     COLOR_TABLE_RULE_RGB_0=0.000000e+00 0.000000e+00 0 0 0 0 0 0
     COLOR_TABLE_RULE_RGB_1=0.000000e+00 0.000000e+00 0 0 0 0 0 0
     COLOR_TABLE_RULE_RGB_2=0.000000e+00 0.000000e+00 0 0 0 0 0 0
     COLOR_TABLE_RULE_RGB_3=0.000000e+00 0.000000e+00 0 0 0 0 0 0
     COLOR_TABLE_RULE_RGB_4=0.000000e+00 0.000000e+00 0 0 0 0 0 0
     COLOR_TABLE_RULE_RGB_5=0.000000e+00 0.000000e+00 0 0 0 0 0 0
   Color Table (RGB with 256 entries)
     0: 0,0,0,255
     1: 255,0,0,255
     2: 255,255,0,255
     3: 255,128,0,255
     4: 0,0,255,255
     5: 255,0,255,255
     6: 0,255,0,255
     7: 0,0,0,255
     8: 0,0,0,255
     9: 0,0,0,255
    10: 0,0,0,255
    11: 0,0,0,255 
.
.
.
qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Redmine Admin (Redmine Admin) Original Date: 2007-03-14T11:25:22.000Z


Thanks for the fix. It works. In the meantime Glynn Clemments fixed the issue in GRASS 6.3 CVS, so r.out.gdal [[GeoTIFF]] output has proper colortable and displays fine even without the hack.

Maciek

qissue-bot commented 5 years ago

Original Redmine Comment Author Name: Anónimo (Anónimo) Original Date: 2009-08-21T22:51:13.000Z


Milestone Version 0.8.1 deleted