[mapserver-users] MapServer and 24bit Images

Rahkonen Jukka Jukka.Rahkonen at mmmtike.fi
Wed Dec 5 01:27:43 PST 2012


Hi,

You should try to give more exact description about your problem. By reading several mails which you have sent to MS4W list I believe that you are still talking about the same images. That is 3-band,  8 bits per band images stored into database as PostGIS raster and which you have tried to classify into classes with something like this

CLASS # beginning of the class parameter
 NAME "Very Low"
 EXPRESSION ([pixel] > 0 AND [pixel] < 47)
 STYLE
  COLOR 243 231 172
END # end style for class
END # end class for class very Low

I had a try with some png file I found from my machine by using this in the mapfile

LAYER
  NAME "classified"
  DATA "C:\ms4w\apps\data\8000000.png"
  debug 10
  TYPE RASTER
  STATUS ON
   PROJECTION
            "init=epsg:3067" 
   END
 CLASS
    NAME "test"
   EXPRESSION ([pixel] > 100 AND [pixel] < 250)
   # EXPRESSION ([red] > 100 AND [green] > 100 AND [blue] > 100)
    STYLE
      COLOR 0 255 0
    END
  END
END

Both expressions work so Mapserver does support classification of 3-band, 8 bits per band png images.
Try you to convert your raster from the database into image file and repeat your test. It if works from a file but not from PostGIS raster then you know that the issue is somewhere in PostGIS raster handling.

-Jukka Rahkonen-



> -----Alkuperäinen viesti-----
> Lähettäjä: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-
> users-bounces at lists.osgeo.org] Puolesta Lime, Steve D (DNR)
> Lähetetty: 4. joulukuuta 2012 21:26
> Vastaanottaja: Saint; mapserver-users at lists.osgeo.org
> Aihe: Re: [mapserver-users] MapServer and 24bit Images
> 
> I display true-color imagery all the time. I suspect that's not what you're
> trying to do though. You'll have to be more specific on format, perhaps post a
> layer definition?
> 
> Steve
> 
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-
> bounces at lists.osgeo.org] On Behalf Of Saint
> Sent: Monday, December 03, 2012 10:06 AM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] MapServer and 24bit Images
> 
> Dear all,
> 
> I would like to have this confirmation, MapServer support 24bit image with 3
> bands? I have one 24bit image 1 band and I can see in the browser but the
> other with 3 bands I can't. Only appear the the outline line of the class e not
> the image.
> 
> Many thanks
> José Santos
> 
> 
> 
> -----
> José Santos
> GIS Analyst
> --
> View this message in context: http://osgeo-
> org.1560.n6.nabble.com/MapServer-and-24bit-Images-tp5020409.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users


More information about the MapServer-users mailing list