[maplab-users] Problems with raster image

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Thu Jun 19 10:33:31 EDT 2008


Hi,

It looks like you images really are dark
(Minimum=0.000, Maximum=255.000, Mean=56.219, StdDev=21.179)

You have two options:
1) Adjust images physically. Stretching pixel values (Mean +/- 2xStdDev) to use the full scale gives often reasonable result and it is the default in many viewers.  In your case it would mean stretching values original values 14-98 to use full scale of 0-255. OSSIM image linker is one easy to use and open source WYSIWYG tool for performing histogram stretch almost automatically. Open EV can do the same and many other software as well.
2) Adjust the image on-the-fly with Mapserver. Have a look at SCALE and LUT in document http://mapserver.gis.umn.edu/docs/howto/raster_data/#special-processing-directives
PROCESSING "SCALE=14,98" might be something to start with.



-Jukka Rahkonen-




-----Alkuperäinen viesti-----
Lähettäjä: maplab-users-bounces at lists.maptools.org puolesta: Germán CONAE
Lähetetty: to 19.6.2008 14:29
Vastaanottaja: maplab-users at lists.maptools.org
Aihe: [maplab-users] Problems with raster image
 
I need your help.
  
I made a MAP file with multiple images RASTER (GEOTIFF) but when 
MapServer Shows them, they appear dark.
  
I copied a portion of the header and one layer to see as I'm generating 
the outputs.
  
This is an example:
  
OUTPUTFORMAT
     NAME jpeg
     DRIVER 'GD/jpeg'
     FORMATOPTION QUALITY=100
     MIMETYPE 'image/jpg'
     IMAGEMODE RGB
     EXTENSION 'jpg'
 END
  
LAYER
     NAME 'MyImage1'
     GROUP 'celdas3x3'
     PROCESSING "BANDS=3,2,1"
     OFFSITE 74 75 77
     DATA 'image_1.tif'
     STATUS ON
     TYPE RASTER
     METADATA
         WMS_SRS 'epsg:4326'
         WMS_TITLE 'Celdas-3x3'
         WMS_GROUP_TITLE 'celdas3x3'
         WMS_FEATURE_INFO_MIME_TYPE 'text/html'
     END #METADATA
  
     PROJECTION
         'init=epsg:4326'
     END #PROJECTION
 END #LAYER
  
This is a capture the gdalinfo -stats myImage.tif

GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.2572235630016,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (-69.000439014141008,-26.999560985858999)
Pixel Size = (0.000878028282005,-0.000878028282005)
Metadata:
  AREA_OR_POINT=Area
  TIFFTAG_SOFTWARE=IMAGINE TIFF Support
Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved
@(#)$RCSfile: etif.c $ $Revision: 1.10.1.9.1.9.2.11 $ $Date: 2004/09/15 18:42:01
EDT $
  TIFFTAG_XRESOLUTION=1
  TIFFTAG_YRESOLUTION=1
  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( -69.0004390, -26.9995610) ( 69d 0'1.58"W, 26d59'58.42"S)
Lower Left  ( -69.0004390, -30.0006617) ( 69d 0'1.58"W, 30d 0'2.38"S)
Upper Right ( -65.9993383, -26.9995610) ( 65d59'57.62"W, 26d59'58.42"S)
Lower Right ( -65.9993383, -30.0006617) ( 65d59'57.62"W, 30d 0'2.38"S)
Center      ( -67.4998887, -28.5001113) ( 67d29'59.60"W, 28d30'0.40"S)
Band 1 Block=3418x2 Type=Byte, ColorInterp=Gray
  Min=0.000 Max=255.000
  Minimum=0.000, Maximum=255.000, Mean=56.219, StdDev=21.179
  Overviews: 855x855, 428x428, 214x214, 107x107, 54x54
  Metadata:
    STATISTICS_MINIMUM=0
    STATISTICS_MAXIMUM=255
    STATISTICS_MEAN=56.218909323352
    STATISTICS_MEDIAN=53
    STATISTICS_MODE=39
    STATISTICS_STDDEV=21.178832825771
    STATISTICS_HISTONUMBINS=256
    STATISTICS_HISTOMIN=0
    STATISTICS_HISTOMAX=255
    LAYER_TYPE=athematic
    STATISTICS_HISTOBINVALUES=154413|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0
|0|0|0|0|27|243|666|1251|2844|22896|22851|38178|130320|65304|253458|346914|11309
49|35451|800253|290151|471393|28035|326592|28881|735930|33237|27135|31464|29502|
818199|96210|25281|23256|800145|20997|50247|451926|48114|365697|45972|16461|5555
43|46224|196038|270171|22833|426168|26181|242793|252171|149760|127557|205839|177
048|171198|40905|116397|117963|94374|77256|91656|10962|61965|29862|53055|42975|4
0698|20565|1521|27432|18099|1368|14796|8910|1089|10323|468|3591|4086|297|8622|18
9|4923|1485|189|666|9198|702|216|189|4239|5337|99|126|4140|117|72|2142|126|90|11
7|2340|108|126|2349|1476|162|801|126|162|1980|144|117|1440|117|72|288|873|72|381
6|117|765|297|36|45|1296|108|72|1215|72|783|864|72|639|81|981|72|72|900|108|468|
45|495|72|135|72|495|81|45|3924|54|162|45|35685|99|648|459|81|117|378|54|1737|11
7|225|54|45|828|81|297|855|45|81|243|351|45|1548|18|252|207|207|945|63|243|225|2
7|189|1377|225|216|234|36|189|270|1458|126|45|171|324|936|225|189|126|153|180|16
11|135|198|180|99|234|144|90|126|261|108|243|207|225|9|153|252|189|243|216|144|2
52|324|279|126|279|16542|558|4563|
<GDALRasterAttributeTable Row0Min="0" BinSize="1">
  <FieldDefn index="0">
    <Name>Histogram</Name>
    <Type>1</Type>
    <Usage>0</Usage>
  </FieldDefn>

 I tried to use the library GDAL / GTIFF, but didn't show nothing.
  
Any suggestions?
  
Thank you in advance


Lic. Germán Weber




More information about the Maplab-users mailing list