After digging around and comparing other images, I realised that the .IMG lacks color interpretation since the ColorInterp parameter in gdalinfo output is undefined for the 3 bands. When I attempt to gdal_translate to Gtiff with -expand rgb option, the error output was: band 1 has no color table. Any hint on how to properly define color interpretation for a .IMG ? I have qgis, grass and gdal in an ubuntu setup.
Thanks, Allan. On Mon, Jul 14, 2014 at 10:02 AM, Allan Oware <allanow...@gmail.com> wrote: > > Hi all, > Dark tiles are generated when I run gdal2tiles.py on a .IMG file(a scanned > and georeferenced topographical map). > A sample png of the tiles generated is found here > <https://sites.google.com/site/lumtegis/files/519.png>. Even when i > translate to tiff, the output is still the same. Why does > gdal2tiles.py give this result ? > The gdalinfo output is as below: > > Driver: HFA/Erdas Imagine Images (.img) > Files: ALOI.IMG > ALOI.IMG.aux.xml > Size is 3830, 2552 > Coordinate System is: > GEOGCS["GCS_WGS_1984", > DATUM["WGS_1984", > SPHEROID["WGS_1984",6378137.0,298.257223563]], > PRIMEM["Greenwich",0.0], > UNIT["Degree",0.017453292519943295]] > Origin = (32.999437318839924,3.000470692247897) > Pixel Size = (0.000392066994127,-0.000392066994127) > Metadata: > DataType=Generic > Corner Coordinates: > Upper Left ( 32.9994373, 3.0004707) ( 32d59'57.97"E, 3d 0'1.69"N) > Lower Left ( 32.9994373, 1.9999157) ( 32d59'57.97"E, 1d59'59.70"N) > Upper Right ( 34.5010539, 3.0004707) ( 34d30'3.79"E, 3d 0'1.69"N) > Lower Right ( 34.5010539, 1.9999157) ( 34d30'3.79"E, 1d59'59.70"N) > Center ( 33.7502456, 2.5001932) ( 33d45'0.88"E, 2d30'0.70"N) > Band 1 Block=64x64 Type=UInt16, ColorInterp=Undefined > Description = Layer_1 > Min=0.000 Max=255.000 > Minimum=0.000, Maximum=255.000, Mean=225.572, StdDev=31.338 > NoData Value=256 > Overviews: 1915x1276, 958x638, 479x319, 240x160 > Metadata: > STATISTICS_COVARIANCES=982.046346716112,845.521289084631,710.510646703791 > STATISTICS_MINIMUM=0 > STATISTICS_MAXIMUM=255 > STATISTICS_MEAN=225.57242379015 > STATISTICS_MEDIAN=0 > STATISTICS_MODE=0 > STATISTICS_STDDEV=31.337618714831 > STATISTICS_SKIPFACTORX=1 > STATISTICS_SKIPFACTORY=1 > STATISTICS_EXCLUDEDVALUES= > LAYER_TYPE=athematic > Image Structure Metadata: > COMPRESSION=RLE > Band 2 Block=64x64 Type=UInt16, ColorInterp=Undefined > Description = Layer_2 > Min=4.000 Max=255.000 > Minimum=4.000, Maximum=255.000, Mean=226.079, StdDev=29.739 > NoData Value=256 > Overviews: 1915x1276, 958x638, 479x319, 240x160 > Metadata: > STATISTICS_COVARIANCES=845.521289084631,884.412989496947,765.062067015664 > STATISTICS_MINIMUM=4 > STATISTICS_MAXIMUM=255 > STATISTICS_MEAN=226.07921779459 > STATISTICS_MEDIAN=0 > STATISTICS_MODE=0 > STATISTICS_STDDEV=29.739081853631 > STATISTICS_SKIPFACTORX=1 > STATISTICS_SKIPFACTORY=1 > STATISTICS_EXCLUDEDVALUES= > LAYER_TYPE=athematic > Image Structure Metadata: > COMPRESSION=RLE > Band 3 Block=64x64 Type=UInt16, ColorInterp=Undefined > Description = Layer_3 > Min=0.000 Max=255.000 > Minimum=0.000, Maximum=255.000, Mean=172.929, StdDev=27.135 > NoData Value=256 > Overviews: 1915x1276, 958x638, 479x319, 240x160 > Metadata: > STATISTICS_COVARIANCES=710.510646703791,765.062067015664,736.335138826829 > STATISTICS_MINIMUM=0 > STATISTICS_MAXIMUM=255 > STATISTICS_MEAN=172.92884721066 > STATISTICS_MEDIAN=0 > STATISTICS_MODE=0 > STATISTICS_STDDEV=27.135495920046 > STATISTICS_SKIPFACTORX=1 > STATISTICS_SKIPFACTORY=1 > STATISTICS_EXCLUDEDVALUES= > LAYER_TYPE=athematic > Image Structure Metadata: > COMPRESSION=RLE > > > Thanks, > Allan. > -- > Allan Oware > Cell: +254 727 365820 > -- Allan Oware Cell: +254 727 365820
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev