Re: [mapserver-users] MapServer and 24bit Images

2012-12-10 Thread José Pedro Santos

Dear Carlos,

Thanks for your reply but didn't work. I have to check the integrate of the 
image probably. I load the raster to Postgres with raster2pgsql in Ubuntu 
12.04LTS. With or without the OUTPUTFORMAT don't work. 

Any sugestion? 

Saludos desde Portugal
José Santos 

Date: Fri, 7 Dec 2012 08:48:22 -0800
From: boolean10...@yahoo.com
Subject: Re: [mapserver-users] MapServer and 24bit Images
To: zpsant...@hotmail.com; mapserver-users@lists.osgeo.org

José,
Yo presento imágenes de 3 bandas como WMS sin problema alguno. Debo decir que 
no uso de OUTPUTFORMAT en estos casos ya que desde los parámetros del URL se 
especifica el formato de salida (parámetro FORMAT).

Por lo que veo, estás queriendo acceder a una capa tipo raster desde una base 
de datos en Postgres.
¿ Integraste una capa raster a Postgres (gracias a que en las ultimas versiones 
de PostGIS se incluyó lo que era el proyecto WKTRaster) ? ¿ O estás queriendo 
acceder a un archivo raster directamente ? 

Desconozco si las directivas PROCESSING aplican para una capa raster en 
PostGIS, nunca he intentado trabajar con esto.

Saludos desde México


José,
I work with 3 bands images as WMS with no problem at all. I must say that i 
didn't use the OUTPUTFORMAT because I can specify the output format in the URL 
(FORMAT parameter).
As I see, you want to
 show a raster layer from a Postgres database.
¿ Do you added a raster layer into Postgres (thanks to the latest versions of 
PostGIS which added the WKTRaster project) ? or ¿ Do you want to access 
directly to a raster file ?
I don't know if the PROCESSING directives apply to a PostGIS raster
 layer, I've never tried to work with this.

Cheers from México

 IC Carlos Ruiz

From: José Pedro Santos 
 To: steve.l...@state.mn.us;
 mapserver-users@lists.osgeo.org 
 Sent: Friday, December 7, 2012 8:35 AM
 Subject: Re: [mapserver-users] MapServer and 24bit Images
   





Hi Steve, 

Thanks for the information. Basically I want only to display the layer (as WMS 
service) in the browser for testing or a real client. The layer have 3 bands 
and is a 24bit image

My MAPFILE is this one(OUTPUTFORMAT and LAYER parameters):

OUTPUTFORMAT # Parameter Outputformat
 NAME png24
 DRIVER "GD/PNG"
 MIMETYPE "image/png;mode=24bit"
 EXTENSION PNG
 IMAGEMODE RGB
END # End parameter Outputformat

LAYER # beginning of the layer parameter
 NAME "fapartest"
 TYPE RASTER
 STATUS ON
 DATA "PG:host=localhost port=5432 dbname='mydb' user='postgres' 
password='' schema='public' table='mytable' mode='2'"
 PROCESSING "NODATA=0"
 PROCESSING "SCALE=AUTO"
 PROCESSING "BANDS=1,2,3"
.

I don't have class parameter since I don't want to classify the map just 
visualize the information. Any idea?

Best Regards
 and thanks,

José Santos 



> From: steve.l...@state.mn.us
> To: zpsant...@hotmail.com; mapserver-users@lists.osgeo.org
> Subject: RE: [mapserver-users] MapServer and 24bit Images
> Date: Tue, 4 Dec 2012 19:26:01 +
> 
> 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-boun...@lists.osgeo.org 
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saint
> Sent: Monday, December 03, 2012 10:06 AM
> To: mapserver-users@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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
  
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer and 24bit Images

2012-12-10 Thread José Pedro Santos

Dear Steve, 

I try to do that but didn't work. The image appear all black. I use the 
Processing directive for the 3 bands and also I remove to test but nothing 
happen. Can be a problem of image...
To test in the browser if I put Format=image/png:mode=24bit don't work, the 
error said that is not supported, but If I use FORMAT=PNG24 that work but the 
image came all black. I'm using the last version of MapServer 6.2.0.

Also with output and without output the image appear all black. I have the 
image store in PostgreSQL DB with 145MB size.  

Any idea? 

Best Regards
José Santos 

From: steve.l...@state.mn.us
To: zpsant...@hotmail.com; mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] MapServer and 24bit Images
Date: Fri, 7 Dec 2012 19:41:04 +









I’m assuming you’re using MapServer 6.x… If so then your output format may be 
the issue. GD doesn’t support 24-bit output, just 8-bit. Try deleting the 
OUTPUTFORMAT
and setting IMAGETYPE PNG24 and see if that works.
 
Steve
 


From: José Pedro Santos [mailto:zpsant...@hotmail.com]


Sent: Friday, December 07, 2012 8:36 AM

To: Lime, Steve D (DNR); mapserver-users@lists.osgeo.org

Subject: RE: [mapserver-users] MapServer and 24bit Images


 

Hi Steve,




Thanks for the information. Basically I want only to display the layer (as WMS 
service) in the browser for testing or a real client. The layer have 3 bands 
and is a 24bit image



My MAPFILE is this one(OUTPUTFORMAT and LAYER parameters):



OUTPUTFORMAT # Parameter Outputformat

 NAME png24

 DRIVER "GD/PNG"

 MIMETYPE "image/png;mode=24bit"

 EXTENSION PNG

 IMAGEMODE RGB

END # End parameter Outputformat



LAYER # beginning of the layer parameter

 NAME "fapartest"

 TYPE RASTER

 STATUS ON

 DATA "PG:host=localhost port=5432 dbname='mydb' user='postgres' 
password='' schema='public' table='mytable' mode='2'"

 PROCESSING "NODATA=0"

 PROCESSING "SCALE=AUTO"

 PROCESSING "BANDS=1,2,3"

.



I don't have class parameter since I don't want to classify the map just 
visualize the information. Any idea?



Best Regards and thanks,



José Santos 







> From:
steve.l...@state.mn.us

> To: zpsant...@hotmail.com; 
mapserver-users@lists.osgeo.org

> Subject: RE: [mapserver-users] MapServer and 24bit Images

> Date: Tue, 4 Dec 2012 19:26:01 +

> 

> 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-boun...@lists.osgeo.org 
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saint

> Sent: Monday, December 03, 2012 10:06 AM

> To: mapserver-users@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@lists.osgeo.org

> http://lists.osgeo.org/mailman/listinfo/mapserver-users


  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer and 24bit Images

2012-12-07 Thread Lime, Steve D (DNR)
I'm assuming you're using MapServer 6.x... If so then your output format may be 
the issue. GD doesn't support 24-bit output, just 8-bit. Try deleting the 
OUTPUTFORMAT
and setting IMAGETYPE PNG24 and see if that works.

Steve

From: José Pedro Santos [mailto:zpsant...@hotmail.com]
Sent: Friday, December 07, 2012 8:36 AM
To: Lime, Steve D (DNR); mapserver-users@lists.osgeo.org
Subject: RE: [mapserver-users] MapServer and 24bit Images

Hi Steve,

Thanks for the information. Basically I want only to display the layer (as WMS 
service) in the browser for testing or a real client. The layer have 3 bands 
and is a 24bit image

My MAPFILE is this one(OUTPUTFORMAT and LAYER parameters):

OUTPUTFORMAT # Parameter Outputformat
 NAME png24
 DRIVER "GD/PNG"
 MIMETYPE "image/png;mode=24bit"
 EXTENSION PNG
 IMAGEMODE RGB
END # End parameter Outputformat

LAYER # beginning of the layer parameter
 NAME "fapartest"
 TYPE RASTER
 STATUS ON
 DATA "PG:host=localhost port=5432 dbname='mydb' user='postgres' 
password='' schema='public' table='mytable' mode='2'"
 PROCESSING "NODATA=0"
 PROCESSING "SCALE=AUTO"
 PROCESSING "BANDS=1,2,3"
.

I don't have class parameter since I don't want to classify the map just 
visualize the information. Any idea?

Best Regards and thanks,

José Santos


> From: steve.l...@state.mn.us<mailto:steve.l...@state.mn.us>
> To: zpsant...@hotmail.com<mailto:zpsant...@hotmail.com>; 
> mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
> Subject: RE: [mapserver-users] MapServer and 24bit Images
> Date: Tue, 4 Dec 2012 19:26:01 +
>
> 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-boun...@lists.osgeo.org<mailto:mapserver-users-boun...@lists.osgeo.org>
>  [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saint
> Sent: Monday, December 03, 2012 10:06 AM
> To: mapserver-users@lists.osgeo.org<mailto:mapserver-users@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@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer and 24bit Images

2012-12-07 Thread Carlos Ruiz
José,

Yo presento imágenes de 3 bandas como WMS sin problema alguno. Debo decir que 
no uso de OUTPUTFORMAT en estos casos ya que desde los parámetros del URL se 
especifica el formato de salida (parámetro FORMAT).


Por lo que veo, estás queriendo acceder a una capa tipo raster desde una base 
de datos en Postgres.

¿ Integraste una capa raster a Postgres (gracias a que en las ultimas versiones 
de PostGIS se incluyó lo que era el proyecto WKTRaster) ? ¿ O estás queriendo 
acceder a un archivo raster directamente ? 


Desconozco si las directivas PROCESSING aplican para una capa raster en 
PostGIS, nunca he intentado trabajar con esto.


Saludos desde México



José,

I work with 3 bands images as WMS with no problem at all. I must say that i 
didn't use the OUTPUTFORMAT because I can specify the output format in the URL 
(FORMAT parameter).

As I see, you want to show a raster layer from a Postgres database.

¿ Do you added a raster layer into Postgres (thanks to the latest versions of 
PostGIS which added the WKTRaster project) ? or ¿ Do you want to access 
directly to a raster file ?

I don't know if the PROCESSING directives apply to a PostGIS raster layer, I've 
never tried to work with this.


Cheers from México

 
IC Carlos Ruiz




 From: José Pedro Santos 
To: steve.l...@state.mn.us; mapserver-users@lists.osgeo.org 
Sent: Friday, December 7, 2012 8:35 AM
Subject: Re: [mapserver-users] MapServer and 24bit Images
 

 
Hi Steve, 

Thanks for the information. Basically I want only to display the layer (as WMS 
service) in the browser for testing or a real client. The layer have 3 bands 
and is a 24bit image

My MAPFILE is this one(OUTPUTFORMAT and LAYER parameters):

OUTPUTFORMAT # Parameter Outputformat
 NAME png24
 DRIVER "GD/PNG"
 MIMETYPE "image/png;mode=24bit"
 EXTENSION PNG
 IMAGEMODE RGB
END # End parameter Outputformat

LAYER # beginning of the layer parameter
 NAME "fapartest"
 TYPE RASTER
 STATUS ON
 DATA "PG:host=localhost port=5432 dbname='mydb' user='postgres' 
password='' schema='public' table='mytable' mode='2'"
 PROCESSING "NODATA=0"
 PROCESSING "SCALE=AUTO"
 PROCESSING "BANDS=1,2,3"
.

I don't have class parameter since I don't want to classify the map just 
visualize the information. Any idea?

Best Regards and thanks,

José Santos 




> From: steve.l...@state.mn.us
> To: zpsant...@hotmail.com; mapserver-users@lists.osgeo.org
> Subject: RE: [mapserver-users] MapServer and 24bit Images
> Date: Tue, 4 Dec 2012 19:26:01 +
> 
> 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-boun...@lists.osgeo.org 
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saint
> Sent: Monday, December 03, 2012 10:06 AM
> To: mapserver-users@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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer and 24bit Images

2012-12-07 Thread José Pedro Santos

Hi Steve, 

Thanks for the information. Basically I want only to display the layer (as WMS 
service) in the browser for testing or a real client. The layer have 3 bands 
and is a 24bit image

My MAPFILE is this one(OUTPUTFORMAT and LAYER parameters):

OUTPUTFORMAT # Parameter Outputformat
 NAME png24
 DRIVER "GD/PNG"
 MIMETYPE "image/png;mode=24bit"
 EXTENSION PNG
 IMAGEMODE RGB
END # End parameter Outputformat

LAYER # beginning of the layer parameter
 NAME "fapartest"
 TYPE RASTER
 STATUS ON
 DATA "PG:host=localhost port=5432 dbname='mydb' user='postgres' 
password='' schema='public' table='mytable' mode='2'"
 PROCESSING "NODATA=0"
 PROCESSING "SCALE=AUTO"
 PROCESSING "BANDS=1,2,3"
.

I don't have class parameter since I don't want to classify the map just 
visualize the information. Any idea?

Best Regards and thanks,

José Santos 



> From: steve.l...@state.mn.us
> To: zpsant...@hotmail.com; mapserver-users@lists.osgeo.org
> Subject: RE: [mapserver-users] MapServer and 24bit Images
> Date: Tue, 4 Dec 2012 19:26:01 +
> 
> 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-boun...@lists.osgeo.org 
> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saint
> Sent: Monday, December 03, 2012 10:06 AM
> To: mapserver-users@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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
  ___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer and 24bit Images

2012-12-05 Thread Brent Fraser

Jukka,

  Strange.  When I reviewed the source code it looked like Mapserver 
would refused to classify any 24/32 bit image; I must have missed 
something.   So I tried your mapfile with shp2img v6.0.0 on a 24bit 
image and it worked!  Then I added


PROCESSING "BANDS=1,2,3"

and it *crashed*.  Turning on debugging showed:

msLoadMap(): 0.000s
msDrawMap(): rendering using outputformat named png24 (AGG/PNG).
msDrawMap(): WMS/WFS set-up and query, 0.000s
msDrawRasterLayerLow(classified): entering.
msDrawRasterLayerGDAL(): Entering transform.
msDrawRasterLayerGDAL(): src=0,0,5300,5430, dst=107,0,585,599
msDrawRasterLayerGDAL(): source raster PL (-6.077,-4.533) for dst PL 
(107,0).

msDrawRasterLayerGDAL(): red,green,blue,alpha bands = *1,2,3,0*
drawGDAL(): Unable to access file. Attempt to classify 24bit image, this 
is unsupported.

msDrawMap(): Image handling error. Failed to draw layer named 'classified'.
<*crash*>

Without the PROCESSING directive, I get:

msLoadMap(): 0.000s
msDrawMap(): rendering using outputformat named png24 (AGG/PNG).
msDrawMap(): WMS/WFS set-up and query, 0.000s
msDrawRasterLayerLow(classified): entering.
msDrawRasterLayerGDAL(): Entering transform.
msDrawRasterLayerGDAL(): src=0,0,5300,5430, dst=107,0,585,599
msDrawRasterLayerGDAL(): source raster PL (-6.077,-4.533) for dst PL 
(107,0).

msDrawRasterLayerGDAL(): red,green,blue,alpha bands = *1,0,0,0*
msDrawMap(): Layer 0 (classified), 0.187s
msDrawMap(): Drawing Label Cache, 0.000s
msDrawMap() total time: 0.187s
msSaveImage(test.png) total time: 0.125s
msFreeMap(): freeing map at 00BBC4A8.
freeLayer(): freeing layer at 00BBF9B0.
shp2img total time: 0.312s

The line
msDrawRasterLayerGDAL(): red,green,blue,alpha bands = *1,0,0,0*
implies that GDAL may be using only band one to do the classification, 
but maybe not (more testing required?).


Removing the EXPRESSION object shows
msDrawRasterLayerGDAL(): red,green,blue,alpha bands = 1,2,3,0
And I do get a 24 bit image for output (as expected).



FYI, here's my mapfile:

MAP
NAME 'classified'
STATUS ON
EXTENT -5009377.086 10752549.183 392.653 15885200.067
SIZE 800 600

IMAGETYPE "png24"
OUTPUTFORMAT # Parameter Output
NAME png24
DRIVER "AGG/PNG"
MIMETYPE "image/png"
EXTENSION PNG
IMAGEMODE RGBA
TRANSPARENT ON
END # end of parameter Output

LAYER NAME "classified"

  DATA "Arctic_terra.250m.tif"
  DEBUG 5
  TYPE raster
  STATUS default
#PROCESSING "NODATA=0"
#PROCESSING "SCALE=AUTO"
#PROCESSING "BANDS=1,2,3"
#PROCESSING "DITHER=YES"
  CLASS NAME "test"
#EXPRESSION ([pixel] > 100 AND [pixel] < 250)
EXPRESSION ([red] > 100 AND [green] > 100 AND [blue] > 100)
STYLE
  COLOR 0 255 0
END #Style
  END # Class
END # Layer

END # Map


Best Regards,
Brent Fraser

On 12/5/2012 2:27 AM, Rahkonen Jukka wrote:

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\800.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-boun...@lists.osgeo.org [mailto:mapserver-
users-boun...@lists.osgeo.org] Puolesta Lime, Steve D (DNR)
Lähetetty: 4. joulukuuta 2012 21:26
Vastaanottaja: Saint; mapserver-users@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 defi

Re: [mapserver-users] MapServer and 24bit Images

2012-12-05 Thread Rahkonen Jukka
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\800.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-boun...@lists.osgeo.org [mailto:mapserver-
> users-boun...@lists.osgeo.org] Puolesta Lime, Steve D (DNR)
> Lähetetty: 4. joulukuuta 2012 21:26
> Vastaanottaja: Saint; mapserver-users@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-boun...@lists.osgeo.org [mailto:mapserver-users-
> boun...@lists.osgeo.org] On Behalf Of Saint
> Sent: Monday, December 03, 2012 10:06 AM
> To: mapserver-users@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@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] MapServer and 24bit Images

2012-12-04 Thread Lime, Steve D (DNR)
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-boun...@lists.osgeo.org 
[mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of Saint
Sent: Monday, December 03, 2012 10:06 AM
To: mapserver-users@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] MapServer and 24bit Images

2012-12-03 Thread Saint
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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users