[Geoserver-users] Geotiff image appears black on map preview

Hi,

I have a raster tiff image (from ENVI) with .tfw file.
I used the gdal_translate command to translate the tiff image to geotiff,
where the results are below:

The gdalinfo of my raster tiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["unknown",
            SPHEROID["unretrievable - using WGS84",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","0"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.23"W, 29d10'25.24"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.42"W, 29d10'58.76"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.71"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.81"W, 29d10'59.22"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.52"W, 29d10'42.24"S)
Band 1 Block=5024x1 Type=UInt16, ColorInterp=Red
Band 2 Block=5024x1 Type=UInt16, ColorInterp=Green
Band 3 Block=5024x1 Type=UInt16, ColorInterp=Blue

The gdalinfo of my geotiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["SAD69 / UTM zone 22S",
    GEOGCS["SAD69",
        DATUM["South_American_Datum_1969",
            SPHEROID["GRS 1967 (SAD69)",6378160,298.2500000000049,
                AUTHORITY["EPSG","7050"]],
            AUTHORITY["EPSG","6618"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4618"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","29192"]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.22"W, 29d10'24.88"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.41"W, 29d10'58.39"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.35"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.80"W, 29d10'58.86"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.51"W, 29d10'41.87"S)
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
Band 2 Block=256x256 Type=UInt16, ColorInterp=Undefined
Band 3 Block=256x256 Type=UInt16, ColorInterp=Undefined

I created a new coverage store, with the option "Tagged Image File Format
with Geographic Information" and style "raster". But on map preview the
image seems have a some problem, because it appears all black.

Tanks,

Claudiomir (Caio)
--
View this message in context: http://www.nabble.com/Geotiff-image-appears-black-on-map-preview-tp21407394p21407394.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Hi!

No clue of what could be happen? I really don't understand, with another
geotiff image, like the "sample.tif" used in the tutorials of Geoserver,
works fine.
The size of this image is around 50 MB.

Any help is welcome.

Thanks!

claudiomir wrote:

Hi,

I have a raster tiff image (from ENVI) with .tfw file.
I used the gdal_translate command to translate the tiff image to geotiff,
where the results are below:

The gdalinfo of my raster tiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["unknown",
            SPHEROID["unretrievable - using
WGS84",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","0"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.23"W, 29d10'25.24"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.42"W, 29d10'58.76"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.71"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.81"W, 29d10'59.22"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.52"W, 29d10'42.24"S)
Band 1 Block=5024x1 Type=UInt16, ColorInterp=Red
Band 2 Block=5024x1 Type=UInt16, ColorInterp=Green
Band 3 Block=5024x1 Type=UInt16, ColorInterp=Blue

The gdalinfo of my geotiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["SAD69 / UTM zone 22S",
    GEOGCS["SAD69",
        DATUM["South_American_Datum_1969",
            SPHEROID["GRS 1967 (SAD69)",6378160,298.2500000000049,
                AUTHORITY["EPSG","7050"]],
            AUTHORITY["EPSG","6618"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4618"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","29192"]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.22"W, 29d10'24.88"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.41"W, 29d10'58.39"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.35"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.80"W, 29d10'58.86"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.51"W, 29d10'41.87"S)
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
Band 2 Block=256x256 Type=UInt16, ColorInterp=Undefined
Band 3 Block=256x256 Type=UInt16, ColorInterp=Undefined

I created a new coverage store, with the option "Tagged Image File Format
with Geographic Information" and style "raster". But on map preview the
image seems have a some problem, because it appears all black.

Tanks,

Claudiomir (Caio)

--
View this message in context: http://www.nabble.com/Geotiff-image-appears-black-on-map-preview-tp21407394p21436062.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

Ciao Claudio,
I played a little bit with your image and as I suspected, there are no
particular problems with it, it appears to be all black just because
it badly occupies his own dynamic.
The image has 3 bands, 16 bits each, but the dynamic is highly
compressed towards zero, which makes the image looks like all dark.

As an instance, I have posted here (http://pastebin.com/f2c9b6d4c)
some code here which I borrowed from another project where I was doing
contrast stretch on a 16 bits geotiff to bring it back to 8 bits. The
final image is a bit better (less compressed dynamic) but I suspect
that something more elaborate might be needed (some good old
brightnees and contrast enhancement).

Ciao,
Simone.

-------------------------------------------------------
Ing. Simone Giannecchini
GeoSolutions S.A.S.
Owner - Software Engineer
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax: +39 0584983027
mob: +39 333 8128928

http://www.geo-solutions.it
http://simboss.blogspot.com/
http://www.linkedin.com/in/simonegiannecchini

-------------------------------------------------------

On Tue, Jan 13, 2009 at 2:47 PM, claudiomir <caio.zanchetti@anonymised.com> wrote:

Hi!

No clue of what could be happen? I really don't understand, with another
geotiff image, like the "sample.tif" used in the tutorials of Geoserver,
works fine.
The size of this image is around 50 MB.

Any help is welcome.

Thanks!

claudiomir wrote:

Hi,

I have a raster tiff image (from ENVI) with .tfw file.
I used the gdal_translate command to translate the tiff image to geotiff,
where the results are below:

The gdalinfo of my raster tiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["unknown",
            SPHEROID["unretrievable - using
WGS84",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","0"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.23"W, 29d10'25.24"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.42"W, 29d10'58.76"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.71"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.81"W, 29d10'59.22"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.52"W, 29d10'42.24"S)
Band 1 Block=5024x1 Type=UInt16, ColorInterp=Red
Band 2 Block=5024x1 Type=UInt16, ColorInterp=Green
Band 3 Block=5024x1 Type=UInt16, ColorInterp=Blue

The gdalinfo of my geotiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["SAD69 / UTM zone 22S",
    GEOGCS["SAD69",
        DATUM["South_American_Datum_1969",
            SPHEROID["GRS 1967 (SAD69)",6378160,298.2500000000049,
                AUTHORITY["EPSG","7050"]],
            AUTHORITY["EPSG","6618"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4618"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","29192"]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.22"W, 29d10'24.88"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.41"W, 29d10'58.39"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.35"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.80"W, 29d10'58.86"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.51"W, 29d10'41.87"S)
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
Band 2 Block=256x256 Type=UInt16, ColorInterp=Undefined
Band 3 Block=256x256 Type=UInt16, ColorInterp=Undefined

I created a new coverage store, with the option "Tagged Image File Format
with Geographic Information" and style "raster". But on map preview the
image seems have a some problem, because it appears all black.

Tanks,

Claudiomir (Caio)

--
View this message in context: http://www.nabble.com/Geotiff-image-appears-black-on-map-preview-tp21407394p21436062.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi to all...

Only for record, this problem was successful solved :slight_smile:

The representation of the image (in the map properties of ENVY system) had
"Unsigned Integer", I just change this property to "Integer".

Thank you all for attention, and special Thanks to Simone Giannecchini for
help.

Cheers,
Claudiomir Zanchetti (Caio)

claudiomir wrote:

Hi,

I have a raster tiff image (from ENVI) with .tfw file.
I used the gdal_translate command to translate the tiff image to geotiff,
where the results are below:

The gdalinfo of my raster tiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["unnamed",
    GEOGCS["unnamed",
        DATUM["unknown",
            SPHEROID["unretrievable - using
WGS84",6378137,298.257223563]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","0"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_XRESOLUTION=100
  TIFFTAG_YRESOLUTION=100
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.23"W, 29d10'25.24"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.42"W, 29d10'58.76"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.71"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.81"W, 29d10'59.22"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.52"W, 29d10'42.24"S)
Band 1 Block=5024x1 Type=UInt16, ColorInterp=Red
Band 2 Block=5024x1 Type=UInt16, ColorInterp=Green
Band 3 Block=5024x1 Type=UInt16, ColorInterp=Blue

The gdalinfo of my geotiff file:

Driver: GTiff/GeoTIFF
Size is 5024, 1719
Coordinate System is:
PROJCS["SAD69 / UTM zone 22S",
    GEOGCS["SAD69",
        DATUM["South_American_Datum_1969",
            SPHEROID["GRS 1967 (SAD69)",6378160,298.2500000000049,
                AUTHORITY["EPSG","7050"]],
            AUTHORITY["EPSG","6618"]],
        PRIMEM["Greenwich",0],
        UNIT["degree",0.0174532925199433],
        AUTHORITY["EPSG","4618"]],
    PROJECTION["Transverse_Mercator"],
    PARAMETER["latitude_of_origin",0],
    PARAMETER["central_meridian",-51],
    PARAMETER["scale_factor",0.9996],
    PARAMETER["false_easting",500000],
    PARAMETER["false_northing",10000000],
    UNIT["metre",1,
        AUTHORITY["EPSG","9001"]],
    AUTHORITY["EPSG","29192"]]
Origin = (444163.200000000011642,6772635.599999999627471)
Pixel Size = (0.600000000000000,-0.600000000000000)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  COMPRESSION=LZW
Corner Coordinates:
Upper Left ( 444163.200, 6772635.600) ( 51d34'27.22"W, 29d10'24.88"S)
Lower Left ( 444163.200, 6771604.200) ( 51d34'27.41"W, 29d10'58.39"S)
Upper Right ( 447177.600, 6772635.600) ( 51d32'35.63"W, 29d10'25.35"S)
Lower Right ( 447177.600, 6771604.200) ( 51d32'35.80"W, 29d10'58.86"S)
Center ( 445670.400, 6772119.900) ( 51d33'31.51"W, 29d10'41.87"S)
Band 1 Block=256x256 Type=UInt16, ColorInterp=Gray
Band 2 Block=256x256 Type=UInt16, ColorInterp=Undefined
Band 3 Block=256x256 Type=UInt16, ColorInterp=Undefined

I created a new coverage store, with the option "Tagged Image File Format
with Geographic Information" and style "raster". But on map preview the
image seems have a some problem, because it appears all black.

Tanks,

Claudiomir (Caio)

--
View this message in context: http://www.nabble.com/Geotiff-image-appears-black-on-map-preview-tp21407394p21677916.html
Sent from the GeoServer - User mailing list archive at Nabble.com.