[mapserver-users] Mapcache support for multiple format types

thomas bonfort thomas.bonfort at gmail.com
Tue Nov 22 23:49:17 PST 2016


On Tue, Nov 22, 2016 at 9:51 PM Cechini, Matthew F. (GSFC-423.0)[Science
Systems & Applications, Inc.] <matthew.f.cechini at nasa.gov> wrote:

> A compelling situation could be a layer that has uses cases where you want
> it have transparency or not, making it an “overlay” or “base layer”
> respectively.
>
In theory that would be a use case. In practice, I doubt that you would be
using the exact same layers in an overlay or in a base layer. Plus you
would probably want to use a different wms <source> in order to include the
TRANSPARENT=ON|OFF KVP parameter. I.e. you need distinct tileset
definitions.
Supposing the previous limitations do not apply to you (i.e. you use exact
same layers in overlay or basemap, and you always set TRANSPARENT=ON in
your source (letting mapcache set your transparent background to black when
saving as jpeg)), you'd get an advantage by supporting both jpeg and png
only if the jpeg tile file sizes are significantly smaller than the png
ones, and that the network bandwidth you plan to spare with that offsets
the cost of having to store all your tiles twice.

>
>
> Though, if you’re serving it as 24+1bit PNG with transparency, you’re
> gonna lose quality in JPEG, so you would probably want to return a 24bit
> PNG.  And at that point, you would have to have separate layers because the
> mime type is the same.
>
> As an aside, a member of our team did work on a JPNG approach where tiles
> that require transparency are PNG and those that do not are JPEG.  The
> devil is in the details of quality mapping with that though.
>
Mapcache supports JPNG (called "mixed" in mapcache terms) since 2012.
Should that support not have been available, support for both jpeg and png
for a single tileset would make more sense.

--
thomas

>
> Matt
> .................................................................
> Matthew Cechini
> Contractor, Science Systems and Applications, Inc.
> NASA GIBS Systems/Software Engineer
> 410.205.6272
>
> From: mapserver-users <mapserver-users-bounces at lists.osgeo.org> on behalf
> of thomas bonfort <thomas.bonfort at gmail.com>
> Date: Tuesday, November 22, 2016 at 1:28 PM
> To: tellett <thomas.ellett at statkart.no>, "mapserver-users at lists.osgeo.org"
> <mapserver-users at lists.osgeo.org>
> Subject: Re: [mapserver-users] Mapcache support for multiple format types
>
> Hi Tom,
> My question wasn't clear, or you did not answer my question ;-)
> I was looking for a compelling *use-case* where the solution requires a
> tile server to support both jpeg and png for a given tileset. My stance for
> mapcache is that the data producer (i.e. you as the mapcache administrator)
> knows his data and therefore which format (*singular*) is best suited for a
> given tileset. I'd be happy to revisit my judgment if presented with a
> scenario where more than one format per tileset is actually needed.
>
> Cheers,
> Thomas
>
> On Tue, Nov 22, 2016 at 12:19 PM tellett <thomas.ellett at statkart.no>
> wrote:
>
> Hi Thomas,
>
> Really, its just so that we don't need to have 2 separate layers in the
> service for each format type. The norwegian mapping authority has about 25
> cache 'services' and so its a bit messy in the config and WMTS capabilities
> file if we have to have 50 tilesets instead of 25.
>
> Its no problem technically having 2 tilesets called 'topo2_png' and
> 'topo2_jpeg' for example (they would have the same title and abstract), it
> just would have been preferable for us to have 1 layer support multiple
> formats so that the client could call the same service/layer/tileset and
> choose the format type through the kvp parameter. Not a show-stopper for
> us,
> we just have to change our way of thinking :)
>
> Tom
>
>
>
> --
> View this message in context:
> http://osgeo-org.1560.x6.nabble.com/Mapcache-support-for-multiple-format-types-tp5296486p5296917.html
> Sent from the Mapserver - User mailing list archive at Nabble.com.
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20161123/d3f83fc9/attachment-0001.html>


More information about the mapserver-users mailing list