TILEINDEX and overviews (gdaladdo) ?
Manfred Zerndl
manfred.zerndl at BVV.BAYERN.DE
Thu Sep 29 03:42:56 PDT 2005
Does mapserver not take advantage of overviews calculated with
"gdaladdo" when
the files are accessed with TILEINDEX?
I have 77300 TIFF-Files. Each of them has 2500x2500 Pixels and each is
equivalent to one square kilometer
(Ground-resolution is 0.4 meters per pixel (1000 meters / 2500 pixels)).
(by the way, creating a Tile-Index with gdaltindex failed, becuase of
the amount of comand-line parameters.
So I generated a tileindex-Shapefile for my own, calculated each
bondingbox and used the tools "shpadd" and "dbfadd".)
For each of the 77300 TIFF-Files I generate overviews with the tool
"gdaladdo"
(for example: gdaladdo -r average file77300.tif 2 4 8 16 32 64 128)
Then I add the layer in the mapfile as following:
LAYER
NAME "DOP"
TILEINDEX "dop/dop.shp"
TILEITEM "LOCATION"
TYPE RASTER
STATUS ON
END
When I try with mapserver to view 200 meters with an image size of 500
Pixel,
the response is reasonably fast, because mapserver do not have to scale
the image
(the ground-resolution is 0.4 m/px).
But when I try to view 10 km or 20 km (kilometers) with an imagesize of
500 pixel,
mapserver take a very long time to answer (up to 1 Minutes).
Does mapserver not take advantage of the precalculated overviews in the
tiff-files generated with "gdaladdo"
when the files are accessed with TILEINDEX?
I have compiled mapserver on linux with --with-gdal and --without-tiff !!
$ mapserv -v
MapServer version 4.6.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
SUPPORTS=WCS_SERVER SUPPORTS=FASTCGI SUPPORTS=GEOS INPUT=EPPL7
INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
Regards, Manfred
----- <start of additional infos> ---
Each of my TIFF-Files looks like this:
$ gdalinfo file77300.tif
Driver: GTiff/GeoTIFF
Size is 2500, 2500
Coordinate System is `'
Origin = (4467999.800000,5321000.200000)
Pixel Size = (0.40000000,-0.40000000)
Metadata:
TIFFTAG_XRESOLUTION=125
TIFFTAG_YRESOLUTION=125
TIFFTAG_RESOLUTIONUNIT=3 (pixels/cm)
Corner Coordinates:
Upper Left ( 4467999.800, 5321000.200)
Lower Left ( 4467999.800, 5320000.200)
Upper Right ( 4468999.800, 5321000.200)
Lower Right ( 4468999.800, 5320000.200)
Center ( 4468499.800, 5320500.200)
Band 1 Block=2500x1 Type=Byte, ColorInterp=Red
Overviews: 1250x1250, 625x625, 313x313, 157x157, 79x79, 40x40, 20x20
Band 2 Block=2500x1 Type=Byte, ColorInterp=Green
Overviews: 1250x1250, 625x625, 313x313, 157x157, 79x79, 40x40, 20x20
Band 3 Block=2500x1 Type=Byte, ColorInterp=Blue
Overviews: 1250x1250, 625x625, 313x313, 157x157, 79x79, 40x40, 20x20
The tool "tiffinfo" generates this:
TIFF Directory at offset 0x11e685a
Subfile Type: (0 = 0x0)
Image Width: 2500 Image Length: 2500
Resolution: 125, 125 pixels/cm
Bits/Sample: 8
Compression Scheme: None
Photometric Interpretation: RGB color
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 3
Rows/Strip: 1
Planar Configuration: single image plane
TIFF Directory at offset 0x11e6920
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 1250 Image Length: 1250
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Samples/Pixel: 3
Planar Configuration: separate image planes
TIFF Directory at offset 0x11e732e
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 625 Image Length: 625
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Samples/Pixel: 3
Planar Configuration: separate image planes
TIFF Directory at offset 0x11e7634
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 313 Image Length: 313
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Samples/Pixel: 3
Planar Configuration: separate image planes
TIFF Directory at offset 0x11e77ba
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 157 Image Length: 157
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Samples/Pixel: 3
Planar Configuration: separate image planes
TIFF Directory at offset 0x11e78c8
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 79 Image Length: 79
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Samples/Pixel: 3
Planar Configuration: separate image planes
TIFF Directory at offset 0x11e798e
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 40 Image Length: 40
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Samples/Pixel: 3
Planar Configuration: separate image planes
TIFF Directory at offset 0x11e7a54
Subfile Type: reduced-resolution image (1 = 0x1)
Image Width: 20 Image Length: 20
Tile Width: 128 Tile Length: 128
Bits/Sample: 8
Sample Format: unsigned integer
Compression Scheme: None
Photometric Interpretation: RGB color
Samples/Pixel: 3
Planar Configuration: separate image planes
----- <end of additional infos> -----
More information about the MapServer-users
mailing list