[Gdal-dev] ENVI and raster attributes/color support
Markus Neteler
neteler at itc.it
Tue Nov 2 16:54:10 EST 2004
On Tue, Nov 02, 2004 at 03:23:39PM -0500, Frank Warmerdam wrote:
> Markus Neteler wrote:
> >Hi,
> >
> >I have written (hope I got it right) a BSQ header file
> >for
> >
> >http://glcf.umiacs.umd.edu/data/landcover/data.shtml
> >AVHRR Global Land Cover Classification
> >
> >The attached file is a header file for "gl-latlong-1km-landcover.bsq.gz"
> >from:
> >ftp://ftp.glcf.umiacs.umd.edu/glcf/Global_Land_Cover/Global/gl-latlong-1km-landcover/
> >
> >My question is if support could be added to GDAL to read
> >the color table and the raster attributes so that I could
> >generate a more GIS convenient IMG file or whatever.
> >Or is it a complicated thing (or "quota exceeded" for me :-)?
>
> Markus,
>
> I have implemented support for reading the "class lookup" as a colormap for
> the first band, and capturing the "class names" as category names returned
> by the GDAL GetCategoryNames() method.
Frnka,
thanks for the (as usual) nearly real time response...
I'll try that tomorrow when back in office.
> I doubt the class/category names will do you much good as I am unaware of
> any utility other than gdalinfo that does anything with category names.
I was thinking of GRASS/r.in.gdal which could make good use of it.
And QGIS which could display the category names in the legend.
> warmerda at gdal2200[523]% gdalinfo *.bsq
> Driver: ENVI/ENVI .hdr Labelled
> Size is 43200, 21600
> Coordinate System is:
> GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.257223563,
> AUTHORITY["EPSG","7030"]],
> TOWGS84[0,0,0,0,0,0,0],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0,
> AUTHORITY["EPSG","8901"]],
> UNIT["degree",0.0174532925199433,
> AUTHORITY["EPSG","9108"]],
> AXIS["Lat",NORTH],
> AXIS["Long",EAST],
> AUTHORITY["EPSG","4326"]]
> Origin = (-180.000000,90.000000)
> Pixel Size = (0.00833333,-0.00833333)
> Corner Coordinates:
> Upper Left (-180.0000000, 90.0000000) (180d 0'0.00"W, 90d 0'0.00"N)
> Lower Left (-180.0000000, -90.0000000) (180d 0'0.00"W, 90d 0'0.00"S)
> Upper Right ( 180.0000000, 90.0000000) (180d 0'0.00"E, 90d 0'0.00"N)
> Lower Right ( 180.0000000, -90.0000000) (180d 0'0.00"E, 90d 0'0.00"S)
> Center ( -0.0000000, 0.0000000) ( 0d 0'0.00"W, 0d 0'0.00"N)
> Band 1 Block=43200x1 Type=Byte, ColorInterp=Palette
> Description = global land cover file 1km
> Categories:
> 0: Water_and_Goode_s_interrupted_space
> 1: Evergreen_Needleleaf_Forest
> 2: Evergreen_Broadleaf_Forest
> 3: Deciduous_Needleleaf_Forest
> 4: Deciduous_Broadleaf_Forest
> 5: Mixed_Forest
> 6: Woodland
> 7: Wooded_Grassland
> 8: Closed_Shrubland
> 9: Open_Shrubland
> 10: Grassland
> 11: Cropland
> 12: Bare_Ground
> 13: Urban_and_Built-up
> Color Table (RGB with 14 entries)
> 0: 0,0,0,255
> 1: 1,100,0,255
> 2: 1,130,0,255
> 3: 151,191,71,255
> 4: 2,220,0,255
> 5: 0,255,0,255
> 6: 146,174,47,255
> 7: 220,206,0,255
> 8: 255,173,0,255
> 9: 255,251,195,255
> 10: 140,72,9,255
> 11: 247,165,255,255
> 12: 255,199,174,255
> 13: 0,255,255,255
>
Thanks again!
Markus
More information about the Gdal-dev
mailing list