tiles and overview maps
Frank Warmerdam
fwarmerdam at GMAIL.COM
Thu Jul 28 07:07:18 PDT 2005
On 7/28/05, Frank Rittinger <gis at schnegg.net> wrote:
> Hello list,
>
> I know this subject came up a hundred times, but I couldn't find an
> answer to my questions.
>
> I'm used to using gdaltindex if I have several raster images to create a
> tile index for them. But what if I want to tile one large image? I
> understand that when I have only one large image and I want it tiled, I
> have to use gdalwarp or gdal_transform with the TILED=YES switch. This
> produces only one large image. Is this it, or do I have to use
> gdaltindex for this somehow?
Frank,
Converting a single large image into internally-tiled format can improve
rendering speed for small local areas of the image. When gdal_translate'ing
to GeoTIFF the "-co TILED=yes" causes the output TIFF file to be tiled.
Doing so does not require any changes to your mapfile, nor any tileindex
file.
Conversely you can actually slice up a large file into regular small tile
files, in which case you would need a tileindex and changes to your map
file. I don't have a terribly handy way of doing this, and generally I would
discourage doing it if you can work with just one large file instead. I
call this "external tiling".
> Second, if I use gdaladdo to produce overview images, I think they are
> all stored in the same file. Do I need only one layer and mapserver
> takes the right image according to the current zoom, or do I hav to use
> more than one layer with minscale, maxscale? But than, which image do I
> use for those layers?
Internal overviews within a file are used automatically by GDAL when
needed and you do not need to do anything special in your .map file
to take advantage of them. A separate "overview" layer in your map
file is typically only needed when working with tileindexed layers, to
avoid having to open many tile files for requests for large areas.
Don't feel bad. Lots of folks are uncertain about the two kinds of
tiling and overview building.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the MapServer-users
mailing list