FW: [Tilecache] Symbol image transparency problem

Marco Nijdam marco at west.nl
Wed Aug 11 15:39:07 EDT 2010


Dear Jez,

I'm quite sure it is not a tilecache problem. Both as WMS via OpenLayer
and Mapserver, and as tiled WMS via TileCache and Mapserver, you request
both the topo layer and the point layer in one Mapserver request.
So the difference must be in the Mapserver call.

Can you check in the Webserver logs which Mapserver URL parameters
are used in either case?

In the OpenLayers/Layer/WMS.js code it seems the default is to request with
format=image/jpeg. Have you tried extension=jpeg in the tilecache config?

In your map file you have no explicit OUTPUTFORMAT section specified.
I'm not into the internals of Mapserver, so I don't know for sure which
kind of PNG you will be getting: via AGG or GD, 256 or 24bits,
with or without alpha. See http://mapserver.org/mapfile/outputformat.html.

Since you are requesting metatiles, python (PIL) must be able to read
and split the image. Have you seen the comments in this page on PIL:
http://mapserver.org/faq.html?

Kind regards,
--
-- Marco Nijdam
--

As quoted from Jez Walters:
> Marco,
>
>
> Looks like I've hit a mailbox limit, so I'll divide the attachment in two.
>  Please put the contents of the attached zip archive in the same folder as
> the contents of the zip archive to follow.
>
>
> Jez
>
>
> -----Original Message-----
> From: Jez Walters
> Sent: Wednesday 11 August 2010 17:27
> To: 'Marco Nijdam'
> Cc: 'tilecache at openlayers.org'
> Subject: RE: [Tilecache] Symbol image transparency problem
>
> Marco,
>
>
> After quite a bit of work, please find attached a cut down configuration
> that demonstrates the transparency problem I am experiencing.  After
> you've tweaked my setup to match your OpenLayers/TileCache/MapServer
> configuration, the "Test.html" page can then be easily edited to switch
> between using OpenLayers/MapServer and OpenLayers/TileCache/MapServer.
>
> For the avoidance of any doubt, I've also included two images using this
> configuration: one using OpenLayers/MapServer (MapServer.jpg) and one
> using OpenLayers/TileCache/MapServer (TileCache.jpg).  As you can see, the
> latter image does not display the tree symbols transparently.
>
> I trust this wraps up the reproducibility issue, but do let me know if
> anything is missing or unclear!  :-)
>
>
> Regards,
>
>
> Jez
>
>
> -----Original Message-----
> From: Marco Nijdam [mailto:marco at west.nl]
> Sent: Wednesday 11 August 2010 15:25
> To: Jez Walters
> Cc: 'tilecache at openlayers.org'
> Subject: RE: [Tilecache] Symbol image transparency problem
>
> Dear Jez,
>
> As quoted from Jez Walters:
>> I've already tried that and I'm afraid it makes no difference.  Is it
>> time to raise a TileCache bug?
>
> No, since we don't know the cause of the problem yet. Please make a simple
> configuration with all relevant layers that explains the problem.  As
> mentioned, your earlier configuration didn't contain a topographic layer,
> so could not explain the actual problem.
>
> Kind regards,
> --
> -- Marco Nijdam
> --
>
>>
>>
>> -----Original Message-----
>> From: Marco Nijdam [mailto:marco at west.nl]
>> Sent: Wednesday 11 August 2010 13:57
>> To: Jez Walters
>> Subject: RE: [Tilecache] Symbol image transparency problem
>>
>> Dear Jez,
>>
>> You may want to try adding "&TRANSPARENT=true" to the URL parameters
>> of the WMS service URL in the tilecache.cfg file.
>>
>> Kind regards,
>> --
>> -- Marco Nijdam
>> --
>>
>> As quoted from Jez Walters:
>>> Marco,
>>>
>>>
>>> My sample configuration is a cut-down version of my current 'live'
>>> mapfile, which is over 1500 lines long and is split over several
>>> files.
>>> I'll see if I can knock up a better example that demonstrates the
>>> problem I'm still having.
>>>
>>> In the meantime, I tried adding "extension=png" to my tilecache.cfg
>>> and adding "format: 'image/png'" to my OpenLayers invocation (as well
>>> as flushing the tile cache), but this had no effect.  The comments in
>>> the default tilecache.cfg indicate that "extension=png" is the
>>> default setting, so I guess adding this wouldn't make a difference
>>> anyway?
>>>
>>>
>>> Warm regards,
>>>
>>>
>>> Jez
>>>
>>>
>>> -----Original Message-----
>>> From: Marco Nijdam [mailto:marco at west.nl]
>>> Sent: Tuesday 10 August 2010 13:58
>>> To: Jez Walters
>>> Cc: 'tilecache at openlayers.org'
>>> Subject: RE: [Tilecache] Symbol image transparency problem
>>>
>>> Dear Jez,
>>>
>>> In your config files, I do not see the underlying topographic layer
>>> you had in your original screen capture.
>>> If you tilecache only the symbols, and the format would not be PNG, I
>>> would expect the background topo layer to be completely hidden.
>>> Since the problem you originally showed was the symbols only to be
>>> non-transparent, but not the room between the symbols, I'm not sure
>>> if we have the complete solution.
>>>
>>> Based on the config files you provided, I agree with Jess you need to
>>> add "extension=png" to you tilecache.cfg, in the [ipmap] section.
>>>
>>> You also need to request the tiles as PNG, by specifying the format
>>> in the OpenLayers.Layers.WMS constructor, as part of the list of
>>> options in the third argument. So
>>>
>>>     layer = new OpenLayers.Layer.WMS("Map",
>>>                                   urls,
>>>                                   {
>>>                                     layers: 'ipmap',
>>>                                     format: 'image/png'
>>>                                   });
>>>
>>> Finally you need to remove all existing tiles, to make sure they are
>>> properly generated.
>>>
>>> Kind regards,
>>> --
>>> -- Marco Nijdam
>>> --
>>>
>>> As quoted from Jez Walters:
>>>> Marco,
>>>>
>>>> It took some work, but I've pared it down to the attached mapfile
>>>> and tilecache.cfg.  For completeness I've enclosed my OpenLayers
>>>> configuration and the image file too, just in case either of these
>>>> are the culprit.
>>>>
>>>> Any thoughts as to where I'm going wrong - or is it a bug in
>>>> TileCache?
>>>>
>>>> Jez
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Marco Nijdam [mailto:marco at west.nl]
>>>> Sent: Monday 9 August 2010 19:56
>>>> To: Jez Walters
>>>> Cc: tilecache at openlayers.org
>>>> Subject: Re: [Tilecache] Symbol image transparency problem
>>>>
>>>> Dear Jez,
>>>>
>>>> Could you please give more information on you setup?
>>>> E.g. mapfile, tilecache.cfg file.
>>>> Are all layers tiled into one tilecache, or are you overlaying
>>>> multiple layers?
>>>>
>>>> Kind regards,
>>>> --
>>>> -- Marco Nijdam
>>>> --
>>>>
>>>> As quoted from Jez Walters:
>>>>>
>>>>> Hello TileCachers,
>>>>>
>>>>> I'm not sure if I posted this question correctly last time, so I'm
>>>>> trying again!  ;-)
>>>>>
>>>>> I'm displaying UK Ordnance Survey MasterMap vector maps using
>>>>> OpenLayers, TileCache and MapServer.  The maps display perfectly
>>>>> when I use just MapServer (
>>>>> http://osgeo-org.1803224.n2.nabble.com/file/n5389483/MapServer.jpg
>>>>> MapServer.jpg  ), as well as when I also use OpenLayers.  However,
>>>>> when I add TileCache to the mix, the various symbol images are no
>>>>> longer transparent (
>>>>> http://osgeo-org.1803224.n2.nabble.com/file/n5389483/TileCache.jpg
>>>>> TileCache.jpg  ).
>>>>>
>>>>> I don't have that much experience of TileCache, so any
>>>>> help/explanation would be most appreciated!
>>>>>
>>>>> Jez
>>>>> --
>>>>> View this message in context:
>>>>> http://osgeo-org.1803224.n2.nabble.com/Symbol-image-transparency-pr
>>>>> oblem-tp5389483p5389483.html Sent from the TileCache mailing list
>>>>> archive at Nabble.com.
>>>>> _______________________________________________
>>>>> Tilecache mailing list
>>>>> Tilecache at lists.osgeo.org
>>>>> http://lists.osgeo.org/mailman/listinfo/tilecache
>
>
> The information transmitted is intended only for the person
> or entity to which it is addressed and may contain
> confidential and/or privileged material. If you are not the
> addressee, any disclosure, reproduction, copying,
> distribution, or other dissemination or use of this
> communication is strictly prohibited. If you have received
> this transmission in error please notify the sender
> immediately and then delete this email.
>
> Any representations or commitments expressed in this email
> are subject to contract.
>
> This message has been scanned for viruses and dangerous
> content. However, it is essential that the recipient also
> checks this message using commercially available mail
> scanning and anti-virus software. IPL Information Processing
> Limited accepts no liability for any loss or damage resulting
> from any virus or other dangerous content in this message.
>
> IPL Information Processing Limited is registered in England
> and Wales under company registration number 1418818.
> Registration took place at Cardiff on 10 May 1979. IPL
> Information Processing Limited's registered office and
> normal place of business is Eveleigh House, Grove Street,
> Bath, BA1 5LR, United Kingdom. IPL is also registered for
> Value Added Tax (VAT) under registration number GB 601 2931 83.
>
>




More information about the Tilecache mailing list