[mapserver-users] Mapcache question.

Stephen Woodbridge woodbri at swoodbridge.com
Sun Dec 4 14:37:47 EST 2011


Hi Jerl,

Maybe! is the short answer. The analysis of the problem is:

1. What is the primary purpose of mapcache?

Will it is a flexible tools that can do a lot of things, like on-the-fly 
cache building, compositing images from tiles in the cache, etc. It's 
primary purpose is to provide tile generation and tile serving for 
environments that need tiles instead of draw on demand images.

2. So to some extent this depends on your usage model, ie: tile requests 
per unit time.

3. it sounds like from your description below, that you are serving draw 
on demand images and not using a tile cache at the moment.

To use a tile cache given your current scenario, you would still have to 
do everything the same as before, but you would also have to figure out 
what tiles at the various zoom levels needed to be removed when any of 
the GeoTiffs changed, either replace some existing GeoTiff or got 
removed because of age.

I'm not sure I see anyway that it will magically simplify your process. 
And on the contrary, it will add some complexity to the whole process. 
That said, if your demand is increasing and your server(s) are having 
trouble keeping up with the image demand, then adding mapcache could be 
a solution.

-Steve W

On 12/4/2011 2:13 PM, forums wrote:
> Hi:
>
> I hope this is the proper place to ask questions about Mapcache since
> it's been moved into the trunk of Mapserver.
>
> I'm wondering if Mapcache can help with a particular setup, and if so
> maybe some advice or direction on where to start?
>
> Here's the setup.  Every 5 minutes a new set of GeoTiffs are created in
> a new directory.  I create a tileindex for the GeoTiffs and use those in
> the map layer.  Every hour, anything more than 5hours old gets deleted.
> I have a single mapfile setup.
>
> The general layer is setup like:
>
>      LAYER
>          NAME 'IMG1'
>          METADATA
> 'wms_title' 'IMG 1'
> 'wms_srs' 'EPSG:4326'
> 'wms_extent' 'MINX MINY MAXX MAXY'
> 'default_targetdate' ''
> 'targetdate_validation_pattern' '^[0-9]{12}$'
>          END
>          STATUS ON
>          TILEINDEX '/PATH/TO/IMG/DIR/%targetdate%/TILEINDEX.shp'
>          TILEITEM 'Location'
>          TYPE RASTER
>      END
>
>
> I'm currently loading these images as overlays for Googlemaps. using the
> mode=tile&tilemode=gmaps...&targetdate=2011...etc.
> Problem is it's too slow. I end up loading hundreds of images, as I
> basically create an animation using sequential times.
>
> I'd like to be able to have a single mapcache config file, that will
> pass the date through to pull the proper shapefile, and have the result
> cached so next time it's loading off the disk.  MOST of the images end
> up being blank/transparent tiles.
>
> Is Mapcache a good choice for this?
> The front end for this is just a simple GoogleMaps viewport, but ends up
> loading multiple timeslots for display.  It generates the request URL
> (not currently in WMS fashion but could be).
>
> Thanks for any help I can get.
>
> Jerl
>
>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users



More information about the mapserver-users mailing list