[Tilecache] agg support

Benoit PESTY tchule at hotmail.com
Wed Oct 31 12:17:00 EDT 2007


Hello,

I have a problem similar to Simon' s one but I cannot really apply the same solution.

I have a application with some base layers (rasters) and some overlays. 
In order to make my application work correctly with IE 5.5 and 6 (the transparency problem ...) I have defined 2 types of output :
- One called "PNG24" for the raster (24bits needed to have the correct colors, plus transparency for Firefox, transparency for IE is not mandatory for this layer).
- One called "PNG" with a 8 bits color index in order to make the transparency work on IE (....).

OUTPUTFORMAT
  NAME PNG
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE PC256
  FORMATOPTION  INTERLACE=OFF
  TRANSPARENT ON
END

OUTPUTFORMAT
  NAME PNG24
  DRIVER "GD/PNG"
  MIMETYPE "image/png"
  IMAGEMODE RGBA
  FORMATOPTION  INTERLACE=OFF
  TRANSPARENT ON
END

In the beginning I was only working in 24 bits, the problem is IE. And I can't downgrade the raster layer in 8 bits, it's too ugly.

I've configured Mapserver (v4) and OpenLayers and everything seems OK. 
Now if I add Tilecache in between, I loose the "png24" parameter of the URL ... my raster is ugly ^^

Do you have an idea (even an ugly hack) ? I've tried to add PNG24 as an extension in the configuration of Tilecache but PIL is not happy with it.

Anyway, thanks to the Tilecache developpers for the good job.

Tchule.

(Sorry Christopher for the previous direct mail)

> Date: Wed, 31 Oct 2007 07:41:08 -0400
> To: simon at citysafe.org
> From: crschmidt at metacarta.com
> CC: ed at citysafe.org; tilecache at openlayers.org
> Subject: Re: [Tilecache] agg support
> 
> On Wed, Oct 31, 2007 at 01:03:01AM -0500, Simon Cantem wrote:
> > 
> > -----Original Message-----
> > From: Christopher Schmidt [mailto:crschmidt at metacarta.com] 
> > 
> > > They should return the same result, but that doesn't neccesarily mean
> > > that it's not producing agg. TileCache ignores the format parameter
> > (all
> > > parameters besides Request, Service, BBOX and layers, actually).
> > 
> > > Watch your Apache logs when your run TileCache with a cleared cache.
> > > Open the /cgi-bin/mapserv URL that TC is hitting. View it in a
> > browser,
> > > and tweak the URL until it looks how you want, then tweak  your
> > > TIlecache config to match.
> > 
> > > Since TC sends a 'format=image/'+self.extension, it's possible that
> > this
> > > is overriding your earlier ?format=. I would advise configuring your
> > > AGG/PNG24 IMAGEFORMAT to be the only image format with a mimetype of
> > > "image/png" as a possible solution. (I think that's what I did.)
> > 
> > 
> > Yep you're right, there was a second parameter being passed specifying
> > image/png, when I copy this URL and remove the offending parameter it
> > works fine. I'm not too sure how to make the AGG/PNG24 imageformat the
> > only one with a PNG mimetype, I've tried setting the name of the AGG
> > output format to image/png but that didn't help. I've tried looking
> > through the mapserver reference forcing the output of a particular
> > format, but can't find anything on that either. Any pointers on where I
> > can look for more info?
> 
> 
> http://boston.freemap.in/basemap.map is a mapfile I've used with agg.
> Note the     mimetype "image/png" on the AGG OUTPUTFORMAT . I think
> that's what you're looking for. 
> 
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Tilecache mailing list
> Tilecache at openlayers.org
> http://openlayers.org/mailman/listinfo/tilecache

_________________________________________________________________
Boo! Scare away worms, viruses and so much more! Try Windows Live OneCare!
http://onecare.live.com/standard/en-us/purchase/trial.aspx?s_cid=wl_hotmailnews
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/tilecache/attachments/20071031/6f64326c/attachment.html


More information about the Tilecache mailing list