[MS4W-Users] Image 24 Bit

Brent Fraser bfraser at geoanalytic.com
Tue Nov 27 11:55:03 EST 2012


Then it sounds like a bug in Mapserver:  WMS + Mapserver-with-CLASS + 
24bit-raster-in-PostGIS = error

You need to file it with Mapserver (not here at MS4W which is just a 
packaging of Mapserver, GDAL, apache, etc)

Best Regards,
Brent Fraser

On 11/27/2012 9:04 AM, José Pedro Santos wrote:
> My raster file have 3 Bands:
>
> Band 1 Block=7541x6753 Type=Byte, ColorInterp=Undefined
>   NoData Value=0
>   Overviews: arbitrary
> Band 2 Block=7541x6753 Type=Byte, ColorInterp=Undefined
>   NoData Value=0
>   Overviews: arbitrary
> Band 3 Block=7541x6753 Type=Byte, ColorInterp=Undefined
>   NoData Value=0
>   Overviews: arbitrary
>
> I manage to see other raster with just one band.
>
> Any sugestion to this one?
>
> Thanks for your help.
>
> Best Regards,
> José Santos
>
> ------------------------------------------------------------------------
> Date: Tue, 27 Nov 2012 07:42:30 -0700
> From: bfraser at geoanalytic.com
> To: zpsantos1 at hotmail.com
> CC: ms4w-users at lists.maptools.org
> Subject: Re: [MS4W-Users] Image 24 Bit
>
> And how many bands does GDAL think the raster has?  What is the result of
>
> gdalinfo  "PG:host=localhost port=5432 dbname='Environment_Models' 
> user='postgres' password='postgres' schema='public' 
> table='africarastercerto' mode='2'"
>
> Best Regards,
> Brent Fraser
> On 11/27/2012 3:26 AM, José Pedro Santos wrote:
>
>     Hi Brent,
>
>     Thanks for your reply.
>
>     I did that but don't work. When I remove PROCESSING "BANDS=1,2,3"
>     MapServer assumes that is only one band so he retrieve the result
>     of just one.
>     I have the class parameters like this:
>
>     CLASS
>       NAME "near white"
>       EXPRESSION ([red] > 25 AND [green] > 25 AND [blue] > 25)
>       STYLE
>         COLOR 0 0 255
>     END # end parameter style
>     END # end parameter class
>
>     CLASS
>      NAME "white1"
>      EXPRESSION ([red] > 200 AND [green] > 200 AND [blue] > 200)
>      STYLE
>        COLOR 0 255 0
>     END # end parameter style
>     END # end parameter class
>
>     CLASS
>      NAME "white2"
>      EXPRESSION ([red] > 200 AND [green] > 200 AND [blue] > 200)
>      STYLE
>        COLOR 255 0 0
>     END # end parameter style
>     END # end parameter class
>
>     I already did that with 1 CLASS, 2 and finally 3. None of this works.
>
>     Any suggestion?
>
>     Best Regards,
>     José Santos
>
>     ------------------------------------------------------------------------
>     Date: Mon, 26 Nov 2012 09:08:40 -0700
>     From: bfraser at geoanalytic.com <mailto:bfraser at geoanalytic.com>
>     To: zpsantos1 at hotmail.com <mailto:zpsantos1 at hotmail.com>
>     CC: ms4w-users at lists.maptools.org
>     <mailto:ms4w-users at lists.maptools.org>
>     Subject: Re: [MS4W-Users] Image 24 Bit
>
>     Remove all your PROCESSING directives for the layer (see my
>     previous email for details).
>
>     Best Regards,
>     Brent Fraser
>
>     On 11/26/2012 8:55 AM, José Pedro Santos wrote:
>
>         Dear all,
>
>         I try do change like Jeff propose but I can't succeed..I get
>         always the following error:
>
>         <ServiceExceptionReport version="1.1.1"><ServiceException>
>         msDrawMap(): Image handling error. Failed to draw layer named
>         'fapartest'.
>         drawGDAL(): Unable to access file. Attempt to classify 24bit
>         image, this is unsupported.
>         </ServiceException></ServiceExceptionReport>
>
>         *With this link*:
>         http://localhost/cgi-bin/mapserv?map=/var/www/africarastercrt.map&VERSION=1.1.1&Request=GetMap&LAYERS=fapartest&STYLES=&SRS=EPSG:4326&BBOX=-26.0057,-34.8229,60.0032,38.0053&WIDTH=700&HEIGHT=500&FORMAT=image/png;mode=24bit
>         <http://localhost/cgi-bin/mapserv?map=/var/www/africarastercrt.map&VERSION=1.1.1&Request=GetMap&LAYERS=fapartest&STYLES=&SRS=EPSG:4326&BBOX=-26.0057%2c-34.8229%2c60.0032%2c38.0053&WIDTH=700&HEIGHT=500&FORMAT=image/png%3bmode=24bit>
>
>         But I make some tests and I don't think that is OUTPUTFORMAT
>         that have the error. I have on the LAYER section this
>         parameter: PROCESSING "BANDS=1,2,3
>         because my image is a RGB image (0 - 255) but when I put only
>         one band or two bands the result is the color from the first
>         band (like explain on the raster data access) but only the
>         color and not the layer. I have the outformat and the class
>         parameter like this:
>
>         OUTPUTFORMAT # Parameter Output
>          NAME png24
>          DRIVER "AGG/PNG"
>          MIMETYPE "image/png;mode=24bit"
>          EXTENSION PNG
>          IMAGEMODE RGB
>         END # end of parameter Output
>
>
>         CLASS
>           NAME "near white"
>           EXPRESSION ([red] > 200 AND [green] > 200 AND [blue] > 200)
>           STYLE
>             COLOR 0 0 255
>         END # end parameter style
>         END # end parameter class
>
>         I working with this since a long time and I don't understand
>         why.. Also I have another raster image with just one band and
>         works fine...any ideas/suggestions??
>
>         Best Regards and thanks,
>         José Santos
>
>
>         > Date: Fri, 23 Nov 2012 15:43:24 -0400
>         > From: jmckenna at gatewaygeomatics.com
>         <mailto:jmckenna at gatewaygeomatics.com>
>         > To: ms4w-users at lists.maptools.org
>         <mailto:ms4w-users at lists.maptools.org>
>         > Subject: Re: [MS4W-Users] Image 24 Bit
>         >
>         > Jose, see response below from Mike.
>         >
>         > (I also regularly use AGG/PNG for 24bit, as that was my
>         first response
>         > earlier...sorry just trying to debug for Jose..hard for me
>         without the
>         > data in my hands)
>         >
>         > -jeff
>         >
>         >
>         >
>         > On 12-11-23 3:37 PM, Smith, Michael ERDC-RDE-CRREL-NH wrote:
>         > > Jeff,
>         > >
>         > > That¹s only for reading imagery.
>         > >
>         > > AGG/PNG renderer will certainly do 24 bit output. I use
>         (in cgi mode)
>         > > map_imagetype=png24,
>         > >
>         > > For a wms image request, one should use
>         format=image/png;mode=24bit
>         > >
>         > > Mike
>         > >
>         >
>         >
>         >
>         > --
>         > Jeff McKenna
>         > MapServer Consulting and Training Services
>         > http://www.gatewaygeomatics.com/
>         >
>         >
>         > _______________________________________________
>         > MS4W-Users mailing list
>         > MS4W-Users at lists.maptools.org
>         <mailto:MS4W-Users at lists.maptools.org>
>         > http://lists.maptools.org/mailman/listinfo/ms4w-users
>
>
>         _______________________________________________
>         MS4W-Users mailing list
>         MS4W-Users at lists.maptools.org  <mailto:MS4W-Users at lists.maptools.org>
>         http://lists.maptools.org/mailman/listinfo/ms4w-users
>
>
>
>
>     _______________________________________________
>     MS4W-Users mailing list
>     MS4W-Users at lists.maptools.org  <mailto:MS4W-Users at lists.maptools.org>
>     http://lists.maptools.org/mailman/listinfo/ms4w-users
>
>
>
>
> _______________________________________________
> MS4W-Users mailing list
> MS4W-Users at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/ms4w-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20121127/4497a841/attachment-0001.htm 


More information about the MS4W-Users mailing list