Re: [mapserver-users] 8 bit versus 24 bit output in MapServer 6.x

2012-10-23 Thread Lime, Steve D (DNR)
Have you tried pre-computing image palettes? I've had some very good luck with 
rendering 24-bit PNGs and then running them through a pre-computed palette 
(there's an output format option for this). To do this I create a couple 
representative sample images using MapServer with 24-bit PNG output. I then use 
Photoshop to mosaic them into one image and then do a color reduction (usually 
to 128 colors). Then I use GDAL to extract the palette/color table. The 
advantages are colors that are very consistent between tiles and very small 
images. The rec. compass tiles (http://www.dnr.state.mn.us/maps/compass.html) 
use this approach (via MapServer/MapCache).

Steve


From: mapserver-users-boun...@lists.osgeo.org 
[mapserver-users-boun...@lists.osgeo.org] on behalf of Stephen Woodbridge 
[wood...@swoodbridge.com]
Sent: Tuesday, October 23, 2012 11:29 PM
To: Richard Greenwood
Cc: mapserver-users@lists.osgeo.org
Subject: Re: [mapserver-users] 8 bit versus 24 bit output in MapServer 6.x

On 10/23/2012 11:24 PM, Richard Greenwood wrote:
> On Tue, Oct 23, 2012 at 7:30 PM, Stephen Woodbridge
>  wrote:
>> On 10/23/2012 4:31 PM, Richard Greenwood wrote:
>>>
>>> All -
>>>
>>> I've have always used 8 bit GIFs because they are generally the
>>> smallest. I serve a rural area with flaky internet and I do a good bit
>>> with mobile, so size is more important to me than pixel-perfect.
>>> Since MapServer 6.0 I have found 8 bit output (GIF or PNG) to be much
>>> more buggy than 24 bit output. Bugs that I have been able to isolate
>>> and report have been fixed very quickly by the devs, but I'm
>>> struggling with a couple now that are sporadic and that I can not
>>> shrink down to a reproducible bug report. I see the same issues in
>>> Windows and Linux. I'm running 6.0.3 on both. So:
>>> 1. What image format are people generally using? Am I stuck in the
>>> past with 8 bit images? Should I just go with 24 bit and not worry
>>> that my images are several times larger?
>>> 2. My general sense is that the root of the issues I'm seeing are in
>>> the shift from GD to AGG. Are PC256 PNGs generated by GD or AGG?
>>> 3. Any general advise for 8 bit output? For GIF is use the default (I
>>> don't define an OUTPUTFORMAT block) for PNG I do define an
>>> OUTPUTFORMAT block and use IMAGEMODE PC256.
>>>
>>> The two issues that I'm struggling with right now are that my label
>>> colors change as I pan and zoom, and that the HATCH fill pattern
>>> extends outside of its polygons. In both cases switching from an 8 bit
>>> output to a 24 bit output resolves the issue.
>>>
>>> Thanks,
>>> Rich
>>>
>>
>> Rich,
>>
>> I use this:
>>
>>  OUTPUTFORMAT
>>  NAME "agg_qn"
>>  DRIVER "AGG/PNG"
>>  EXTENSION "png"
>>  MIMETYPE "image/png"
>>  IMAGEMODE RGB
>>  FORMATOPTION "INTERLACE=false"
>>  FORMATOPTION "QUANTIZE_NEW=ON"
>>  FORMATOPTION "QUANTIZE_FORCE=ON"
>>  FORMATOPTION "QUANTIZE_DITHER=OFF"
>>  FORMATOPTION "QUANTIZE_COLORS=256"
>>  #TRANSPARENT ON
>>  #FORMATOPTION "TRANSPARENT=ON"
>>  END
>>
>> It gives me 8-bit png and I have no problem with it. Here is an example
>> using mapserver and mapcache
>>
>> http://imaptools.com:8080/demo/tiger-tiles.html
>>
>> And here is an example using just mapserver and draw on demand:
>>
>> http://imaptools.com:8080/demo/tiger2011.html
>>
>> I think both of these are using:
>>
>> MapServer version 6.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
>> SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI
>> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GEOS
>> INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
>>
>> Hope this helps,
>>-Steve W
>
> Thanks Steve. That's an improvement. The image is still much larger
> than the default GIF, or PNG with IMAGEMODE PC256, but it does
> eliminate at least one of my sporadic bugs.
>
> I've attached two PNGs:
> 1. rgb-good.png is 67K and uses your suggested settings above.
> 2. pc256-bad.png is 34K and uses your settings above except changed to
> IMAGEMODE PC256. You can see that the HATCH fill is completely
> haywire.
> In both cases the output PNG is 8 bit.
>
> As always, I appreciate your insight.
> Rich
>

Ahh, just got this. I'm not sure I have anything useful to say other
than: If it hurts, don't do that! :) Seriously, if you can live with a
jpeg, you might get the results you want in a smaller size, but I have
not tried it. That said, this does look like a bug, so maybe Thomas has
something to add.

-Steve W

___
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] 8 bit versus 24 bit output in MapServer 6.x

2012-10-23 Thread Stephen Woodbridge

On 10/23/2012 11:24 PM, Richard Greenwood wrote:

On Tue, Oct 23, 2012 at 7:30 PM, Stephen Woodbridge
 wrote:

On 10/23/2012 4:31 PM, Richard Greenwood wrote:


All -

I've have always used 8 bit GIFs because they are generally the
smallest. I serve a rural area with flaky internet and I do a good bit
with mobile, so size is more important to me than pixel-perfect.
Since MapServer 6.0 I have found 8 bit output (GIF or PNG) to be much
more buggy than 24 bit output. Bugs that I have been able to isolate
and report have been fixed very quickly by the devs, but I'm
struggling with a couple now that are sporadic and that I can not
shrink down to a reproducible bug report. I see the same issues in
Windows and Linux. I'm running 6.0.3 on both. So:
1. What image format are people generally using? Am I stuck in the
past with 8 bit images? Should I just go with 24 bit and not worry
that my images are several times larger?
2. My general sense is that the root of the issues I'm seeing are in
the shift from GD to AGG. Are PC256 PNGs generated by GD or AGG?
3. Any general advise for 8 bit output? For GIF is use the default (I
don't define an OUTPUTFORMAT block) for PNG I do define an
OUTPUTFORMAT block and use IMAGEMODE PC256.

The two issues that I'm struggling with right now are that my label
colors change as I pan and zoom, and that the HATCH fill pattern
extends outside of its polygons. In both cases switching from an 8 bit
output to a 24 bit output resolves the issue.

Thanks,
Rich



Rich,

I use this:

 OUTPUTFORMAT
 NAME "agg_qn"
 DRIVER "AGG/PNG"
 EXTENSION "png"
 MIMETYPE "image/png"
 IMAGEMODE RGB
 FORMATOPTION "INTERLACE=false"
 FORMATOPTION "QUANTIZE_NEW=ON"
 FORMATOPTION "QUANTIZE_FORCE=ON"
 FORMATOPTION "QUANTIZE_DITHER=OFF"
 FORMATOPTION "QUANTIZE_COLORS=256"
 #TRANSPARENT ON
 #FORMATOPTION "TRANSPARENT=ON"
 END

It gives me 8-bit png and I have no problem with it. Here is an example
using mapserver and mapcache

http://imaptools.com:8080/demo/tiger-tiles.html

And here is an example using just mapserver and draw on demand:

http://imaptools.com:8080/demo/tiger2011.html

I think both of these are using:

MapServer version 6.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GEOS
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Hope this helps,
   -Steve W


Thanks Steve. That's an improvement. The image is still much larger
than the default GIF, or PNG with IMAGEMODE PC256, but it does
eliminate at least one of my sporadic bugs.

I've attached two PNGs:
1. rgb-good.png is 67K and uses your suggested settings above.
2. pc256-bad.png is 34K and uses your settings above except changed to
IMAGEMODE PC256. You can see that the HATCH fill is completely
haywire.
In both cases the output PNG is 8 bit.

As always, I appreciate your insight.
Rich



Ahh, just got this. I'm not sure I have anything useful to say other 
than: If it hurts, don't do that! :) Seriously, if you can live with a 
jpeg, you might get the results you want in a smaller size, but I have 
not tried it. That said, this does look like a bug, so maybe Thomas has 
something to add.


-Steve W

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


Re: [mapserver-users] 8 bit versus 24 bit output in MapServer 6.x

2012-10-23 Thread Stephen Woodbridge

On 10/23/2012 11:30 PM, Richard Greenwood wrote:

On Tue, Oct 23, 2012 at 9:24 PM, Richard Greenwood
 wrote:

On Tue, Oct 23, 2012 at 7:30 PM, Stephen Woodbridge
 wrote:

On 10/23/2012 4:31 PM, Richard Greenwood wrote:


All -

I've have always used 8 bit GIFs because they are generally the
smallest. I serve a rural area with flaky internet and I do a good bit
with mobile, so size is more important to me than pixel-perfect.
Since MapServer 6.0 I have found 8 bit output (GIF or PNG) to be much
more buggy than 24 bit output. Bugs that I have been able to isolate
and report have been fixed very quickly by the devs, but I'm
struggling with a couple now that are sporadic and that I can not
shrink down to a reproducible bug report. I see the same issues in
Windows and Linux. I'm running 6.0.3 on both. So:
1. What image format are people generally using? Am I stuck in the
past with 8 bit images? Should I just go with 24 bit and not worry
that my images are several times larger?
2. My general sense is that the root of the issues I'm seeing are in
the shift from GD to AGG. Are PC256 PNGs generated by GD or AGG?
3. Any general advise for 8 bit output? For GIF is use the default (I
don't define an OUTPUTFORMAT block) for PNG I do define an
OUTPUTFORMAT block and use IMAGEMODE PC256.

The two issues that I'm struggling with right now are that my label
colors change as I pan and zoom, and that the HATCH fill pattern
extends outside of its polygons. In both cases switching from an 8 bit
output to a 24 bit output resolves the issue.

Thanks,
Rich



Rich,

I use this:

 OUTPUTFORMAT
 NAME "agg_qn"
 DRIVER "AGG/PNG"
 EXTENSION "png"
 MIMETYPE "image/png"
 IMAGEMODE RGB
 FORMATOPTION "INTERLACE=false"
 FORMATOPTION "QUANTIZE_NEW=ON"
 FORMATOPTION "QUANTIZE_FORCE=ON"
 FORMATOPTION "QUANTIZE_DITHER=OFF"
 FORMATOPTION "QUANTIZE_COLORS=256"
 #TRANSPARENT ON
 #FORMATOPTION "TRANSPARENT=ON"
 END

It gives me 8-bit png and I have no problem with it. Here is an example
using mapserver and mapcache

http://imaptools.com:8080/demo/tiger-tiles.html

And here is an example using just mapserver and draw on demand:

http://imaptools.com:8080/demo/tiger2011.html

I think both of these are using:

MapServer version 6.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=GEOS
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE

Hope this helps,
   -Steve W


Thanks Steve. That's an improvement. The image is still much larger
than the default GIF, or PNG with IMAGEMODE PC256, but it does
eliminate at least one of my sporadic bugs.

I've attached two PNGs:
1. rgb-good.png is 67K and uses your suggested settings above.
2. pc256-bad.png is 34K and uses your settings above except changed to
IMAGEMODE PC256. You can see that the HATCH fill is completely
haywire.
In both cases the output PNG is 8 bit.


Hmmm, I did not see these two images posted. But regarding HATCH, I will 
defer to Thomas as I have not used HATCH before. I do remember various 
posts in the past, maybe yours, about hatching problems so you might try 
searching for them, also search the tickets for potential hatch bugs.


You might try creating a trivial mapfile that defines a polygon and 
applies a hatch to it. If that show a bug then submit a ticket for it. 
Basically the old GD code is deprecated and you have to use the AGG 
renderer. It antialiases everything so images do not compress as much as 
un-aliased images. If size is REALLY critical, then try JPEG output can 
compress to your hearts content. Its lossy but you can make them small 
and it does not support transparency if I remember correctly.


-Steve W


As always, I appreciate your insight.
Rich



Attached is a GIF from MapServer 5.6. 39K and no HATCH issues. This is
what I like to get from MapServer 6.0




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


Re: [mapserver-users] 8 bit versus 24 bit output in MapServer 6.x

2012-10-23 Thread Stephen Woodbridge

On 10/23/2012 4:31 PM, Richard Greenwood wrote:

All -

I've have always used 8 bit GIFs because they are generally the
smallest. I serve a rural area with flaky internet and I do a good bit
with mobile, so size is more important to me than pixel-perfect.
Since MapServer 6.0 I have found 8 bit output (GIF or PNG) to be much
more buggy than 24 bit output. Bugs that I have been able to isolate
and report have been fixed very quickly by the devs, but I'm
struggling with a couple now that are sporadic and that I can not
shrink down to a reproducible bug report. I see the same issues in
Windows and Linux. I'm running 6.0.3 on both. So:
1. What image format are people generally using? Am I stuck in the
past with 8 bit images? Should I just go with 24 bit and not worry
that my images are several times larger?
2. My general sense is that the root of the issues I'm seeing are in
the shift from GD to AGG. Are PC256 PNGs generated by GD or AGG?
3. Any general advise for 8 bit output? For GIF is use the default (I
don't define an OUTPUTFORMAT block) for PNG I do define an
OUTPUTFORMAT block and use IMAGEMODE PC256.

The two issues that I'm struggling with right now are that my label
colors change as I pan and zoom, and that the HATCH fill pattern
extends outside of its polygons. In both cases switching from an 8 bit
output to a 24 bit output resolves the issue.

Thanks,
Rich



Rich,

I use this:

OUTPUTFORMAT
NAME "agg_qn"
DRIVER "AGG/PNG"
EXTENSION "png"
MIMETYPE "image/png"
IMAGEMODE RGB
FORMATOPTION "INTERLACE=false"
FORMATOPTION "QUANTIZE_NEW=ON"
FORMATOPTION "QUANTIZE_FORCE=ON"
FORMATOPTION "QUANTIZE_DITHER=OFF"
FORMATOPTION "QUANTIZE_COLORS=256"
#TRANSPARENT ON
#FORMATOPTION "TRANSPARENT=ON"
END

It gives me 8-bit png and I have no problem with it. Here is an example 
using mapserver and mapcache


http://imaptools.com:8080/demo/tiger-tiles.html

And here is an example using just mapserver and draw on demand:

http://imaptools.com:8080/demo/tiger2011.html

I think both of these are using:

MapServer version 6.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG SUPPORTS=PROJ 
SUPPORTS=AGG SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI 
SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER 
SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE


Hope this helps,
  -Steve W
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] mapcache_seed segfault when using threading [SEC=UNCLASSIFIED]

2012-10-23 Thread Matthew Doyle
I have created an issue for this on github:

https://github.com/mapserver/mapcache/issues/45



--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/mapcache-seed-segfault-when-using-threading-SEC-UNCLASSIFIED-tp5007582p5010646.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


Re: [mapserver-users] libpng error: image size exceeds user limits in IHDR

2012-10-23 Thread Andrea Peri
Was a dynamic link ?
Perhaps an update of some library has put the mapserver out of sync ?

2012/10/23 Alessandro Pasotti 

> >> 2012/10/23 Andrea Peri :
> >>> Hi,
> >>>
> >>> Perhaps something correlated to the bit of colors ? The GIF is a 256
> only
> >>> color format.
> >>> Instead the png could be to million colors.
> >>
> >> Thanks for the hint, but I believe it's something related to the
> >> libraries or the python bindings on the server: I have a copy which
> >> works perfeclty locally, the OUTPUTFORMAT AGGA is working well here
> >> but crashes on the server.
>
>
> After recompiling gdal, mapserver, all python bindings and restart all
> the server stack and caches the problem seems to be gone away (too
> late to be sure, maybe the dawn of tomorrow will shed some light on
> this nightmare).
>
> I also had to remove
> GDAL_LIBRARY_PATH = '/usr/local/lib/libgdal.so'
> from the project (Django) settings, don't ask me why... the path was
> absolutely correct.
>
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
>



-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libpng error: image size exceeds user limits in IHDR

2012-10-23 Thread Alessandro Pasotti
>> 2012/10/23 Andrea Peri :
>>> Hi,
>>>
>>> Perhaps something correlated to the bit of colors ? The GIF is a 256 only
>>> color format.
>>> Instead the png could be to million colors.
>>
>> Thanks for the hint, but I believe it's something related to the
>> libraries or the python bindings on the server: I have a copy which
>> works perfeclty locally, the OUTPUTFORMAT AGGA is working well here
>> but crashes on the server.


After recompiling gdal, mapserver, all python bindings and restart all
the server stack and caches the problem seems to be gone away (too
late to be sure, maybe the dawn of tomorrow will shed some light on
this nightmare).

I also had to remove
GDAL_LIBRARY_PATH = '/usr/local/lib/libgdal.so'
from the project (Django) settings, don't ask me why... the path was
absolutely correct.


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libpng error: image size exceeds user limits in IHDR

2012-10-23 Thread Alessandro Pasotti
2012/10/23 Alessandro Pasotti :
> 2012/10/23 Andrea Peri :
>> Hi,
>>
>> Perhaps something correlated to the bit of colors ? The GIF is a 256 only
>> color format.
>> Instead the png could be to million colors.
>
> Thanks for the hint, but I believe it's something related to the
> libraries or the python bindings on the server: I have a copy which
> works perfeclty locally, the OUTPUTFORMAT AGGA is working well here
> but crashes on the server.
>
> I suspect that the function
>
> png_set_IHDR(png_ptr, info_ptr, rb->width, rb->height,...
>
> get wrong width and height.
>


Forgot to mention that shp2img on the mapfile saved from the script
runs with no errors.


-- 
Alessandro Pasotti
w3:   www.itopen.it
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libpng error: image size exceeds user limits in IHDR

2012-10-23 Thread Alessandro Pasotti
2012/10/23 Andrea Peri :
> Hi,
>
> Perhaps something correlated to the bit of colors ? The GIF is a 256 only
> color format.
> Instead the png could be to million colors.

Thanks for the hint, but I believe it's something related to the
libraries or the python bindings on the server: I have a copy which
works perfeclty locally, the OUTPUTFORMAT AGGA is working well here
but crashes on the server.

I suspect that the function

png_set_IHDR(png_ptr, info_ptr, rb->width, rb->height,...

get wrong width and height.



-- 
Alessandro Pasotti
w3:   www.itopen.it
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libpng error: image size exceeds user limits in IHDR

2012-10-23 Thread Andrea Peri
Hi,

Perhaps something correlated to the bit of colors ? The GIF is a 256 only
color format.
Instead the png could be to million colors.

I use this :

  IMAGETYPE PNG8
  OUTPUTFORMAT
NAME "AGGA"
DRIVER AGG/PNG
MIMETYPE "image/png"
IMAGEMODE RGBA# need RGBA to have the transparent
EXTENSION "png"
FORMATOPTION "GAMMA=1.0"
FORMATOPTION "INTERLACE=true"
FORMATOPTION "QUANTIZE_DITHER=OFF"
FORMATOPTION "COMPRESSION=6"  # Compression: 0=no compression, 9=best,
6=default compression
FORMATOPTION "QUANTIZE_FORCE=ON"
FORMATOPTION "QUANTIZE_COLORS=256"
   TRANSPARENT ON
  END

The most important thing is that the
FORMATOPTION "QUANTIZE_COLORS=256"

force the mapserver to give only the 256 better colors.

If the question is on the 256 color or million color perhaps this could
work.

Andrea.

2012/10/23 Alessandro Pasotti 

>  hi All,
>
> I'm in big troubles with a wierd error in python mapscript, the log
> reports: libpng error: image size exceeds user limits in IHDR
>
> image size is 256x256... using gif instead of png shows no errors (as
> expected)... any idea?
>
> the very same piece of code run fine on my testing machine, the error
> is only on production server.
>
> Mapserver version is 6.0.3, python 2.5 and the code is basically a
> wrapper to WMS service, the error appears just after
>
> map.OWSDispatch( req )
>
> output format is set to AGGA:
>
> OUTPUTFORMAT
> NAME 'AGGA'
> DRIVER AGG/PNG
> IMAGEMODE RGBA
>END
>
> the complete call is
>
>
> ?LAYERS=track_1&TRANSPARENT=TRUE&FORMAT=image%2Fpng%3B%20mode%3D24bit&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=0.0,5009377.0857,2504688.54285,7514065.62855&WIDTH=256&HEIGHT=256
>
> It seems like wrong HEIGHT and WIDTH are passed to the raster buffer,
> I've already checked that the map object has the right size after
> OWSDispatch.
>
> Thanks in advance for any help!
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] libpng error: image size exceeds user limits in IHDR

2012-10-23 Thread Andrea Peri
I see your bbox has 0 on xmin.

BBOX=0.0,5009377.0857,2504688.54285,7514065.62855

Is only a wrong copy on email ?


2012/10/23 Alessandro Pasotti 

>  hi All,
>
> I'm in big troubles with a wierd error in python mapscript, the log
> reports: libpng error: image size exceeds user limits in IHDR
>
> image size is 256x256... using gif instead of png shows no errors (as
> expected)... any idea?
>
> the very same piece of code run fine on my testing machine, the error
> is only on production server.
>
> Mapserver version is 6.0.3, python 2.5 and the code is basically a
> wrapper to WMS service, the error appears just after
>
> map.OWSDispatch( req )
>
> output format is set to AGGA:
>
> OUTPUTFORMAT
> NAME 'AGGA'
> DRIVER AGG/PNG
> IMAGEMODE RGBA
>END
>
> the complete call is
>
>
> ?LAYERS=track_1&TRANSPARENT=TRUE&FORMAT=image%2Fpng%3B%20mode%3D24bit&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=0.0,5009377.0857,2504688.54285,7514065.62855&WIDTH=256&HEIGHT=256
>
> It seems like wrong HEIGHT and WIDTH are passed to the raster buffer,
> I've already checked that the map object has the right size after
> OWSDispatch.
>
> Thanks in advance for any help!
>
> --
> Alessandro Pasotti
> w3:   www.itopen.it
> ___
> mapserver-users mailing list
> mapserver-users@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>



-- 
-
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


[mapserver-users] libpng error: image size exceeds user limits in IHDR

2012-10-23 Thread Alessandro Pasotti
 hi All,

I'm in big troubles with a wierd error in python mapscript, the log
reports: libpng error: image size exceeds user limits in IHDR

image size is 256x256... using gif instead of png shows no errors (as
expected)... any idea?

the very same piece of code run fine on my testing machine, the error
is only on production server.

Mapserver version is 6.0.3, python 2.5 and the code is basically a
wrapper to WMS service, the error appears just after

map.OWSDispatch( req )

output format is set to AGGA:

OUTPUTFORMAT
NAME 'AGGA'
DRIVER AGG/PNG
IMAGEMODE RGBA
   END

the complete call is

?LAYERS=track_1&TRANSPARENT=TRUE&FORMAT=image%2Fpng%3B%20mode%3D24bit&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&SRS=EPSG%3A900913&BBOX=0.0,5009377.0857,2504688.54285,7514065.62855&WIDTH=256&HEIGHT=256

It seems like wrong HEIGHT and WIDTH are passed to the raster buffer,
I've already checked that the map object has the right size after
OWSDispatch.

Thanks in advance for any help!

-- 
Alessandro Pasotti
w3:   www.itopen.it
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Style paramter of WMS request

2012-10-23 Thread Rahkonen Jukka
Hi,

I have never cascaded any WMS service that supports styles but according to 
Mapserver WMS client documentation you have done it right.
You must first capture the requests that Mapserver is really sending to the 
remote server. That is easy, just add line DEBUG 5 into your layer definitions 
and then you will see all the WMS requests from your MS_ERRORFILE.  Check if 
the requests are using &STYLES=AllIntensity. If not, it may be a Mapserver bug 
or some typo in the Mapfile.  If request contains the correct STYLES, copy the 
request and test it with a browser.  The remote server may not work as it 
should. If the request looks right but the response wrong, email the GetMap URL 
for the administrator of the remote WMS and tell about your problem.

-Jukka Rahkonen-
Sowmya Tiramdasu wrote:

Hi,

  I have a mapfile in which one layer is a wms layer. I need to provide style 
information of WMS getmap request in the WMS Layer.

Under the Metadata i gave "wms_style" "AllIntensity"  but it is just giving 
back the default style. Can anyone please throw some light on this topic. How 
to achieve the required style output through the WMS layer in the mapfile ?

Any help is greatly appreciated. Thanks in advance,

Regards,
Sowmya.
___
Sowmya Tiramdasu
GeoCue Corporation
9668 Madison Blvd., Suite 202
Madison, AL 35758
(256) 461-8289 Telephone
(256) 461-8249 Fax
www.geocue.com

Integrating the Geospatial Workplace...

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