I am having a hard time plotting GeoTIFF files that I have downloaded using EarthExplorer (http://earthexplorer.usgs.gov) using grdimage
.
I have done the following in QGIS to the original data files:
- Merged the red, green and blue channels
- Transformed from the original UTM coordinate system to WGS84.
- Cut out a selection of interest
Gdalinfo gives:
Driver: GTiff/GeoTIFF
Files: level1_merge_qgis_latlon_cut.tif
Size is 2782, 835
Coordinate System is:
GEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (-71.000000000000000,77.750000000000000)
Pixel Size = (0.000898634076204,-0.000898203592814)
Metadata:
AREA_OR_POINT=Area
Image Structure Metadata:
INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left ( -71.0000000, 77.7500000) ( 71d 0' 0.00"W, 77d45' 0.00"N)
Lower Left ( -71.0000000, 77.0000000) ( 71d 0' 0.00"W, 77d 0' 0.00"N)
Upper Right ( -68.5000000, 77.7500000) ( 68d30' 0.00"W, 77d45' 0.00"N)
Lower Right ( -68.5000000, 77.0000000) ( 68d30' 0.00"W, 77d 0' 0.00"N)
Center ( -69.7500000, 77.3750000) ( 69d45' 0.00"W, 77d22'30.00"N)
Band 1 Block=2782x1 Type=Float32, ColorInterp=Gray
Band 2 Block=2782x1 Type=Float32, ColorInterp=Undefined
Band 3 Block=2782x1 Type=Float32, ColorInterp=Undefined
Plotting using
gmt grdimage level1_merge_qgis_latlon_cut.tif -JM5 -Ba -png map
yields the following map:
However, the figure should look like this (screenshot QGIS):
What should I do to get the colors right?
p.s.:
I have seen something about adding +b2,1,0
to the tiff file, but that gives:
grdimage [ERROR]: Using this data type (Float32) is not implemented
Converting with gdal_translate to output type “Byte” and subsequent plotting using grdimage gives me an empty map unfortunately…
Datafile: https://surfdrive.surf.nl/files/index.php/s/lIu6oLc4f3otS5L