Structuring rasters?

Matthew Perry perrygeo at GMAIL.COM
Fri May 18 16:49:48 EDT 2007


On 5/18/07, Jeff Dege <jdege at korterra.com> wrote:
> The question is, given a few tens of thousands of hi-res jpegs, what is
> the best way to restructure them so as to give acceptable performance
> through Mapserver?
>


First, as Ed mentioned, convert them to TIFFs if disk space allows.
TIFF is many, many times faster than jpegs at the expense of disk
space.

Secondly the goal for performance is to allow mapserver to open up as
few images as possible, use as much of each image as possible and
avoid resampling.

For the zoomed-in views, you can add overviews to each of the tiles
(essentially these are built-in reduced resolution versions of the
image; see gdaladdo) . Then create a tileindex shapefile (look at
gdaltindex) to provide efficient access to them (ie mapserver will
only open tiles in the extent)

Given your scale range you'll also want to create a few
lower-resolution, combined versions of the dataset using gdal_warp.
Then set up multiple layers with scale dependencies in your mapfile to
force the use of the appropriate dataset given the scale.


-- 
Matthew T. Perry
http://www.perrygeo.net

"You never change things by fighting the existing reality.
To change something, build a new model that makes
the existing model obsolete" - R. Buckminster Fuller



More information about the mapserver-users mailing list