[mapserver-users] preparing orthos for Mapserver?

Even Rouault even.rouault at mines-paris.org
Sun Oct 6 03:34:10 PDT 2013


Le dimanche 06 octobre 2013 11:49:05, Rahkonen Jukka a écrit :
> Andrea Aime wrote:
> > Hi Frank,
> > this is quite interesting. Can you elaborate a bit of what "one block
> > scanline" means? E.g., what is the actual tiling structure of this file?
> > Does presence of compression affect the ability to do the subsampling?
> > How about quality of the output? (e.g., is GDAL reading one pixel every N
> > to generate the reduced resolution version?)
> 
> One scanline blocks can be created by using GeoTIFF creation option
> BLOCKYSIZE. For example
> 
> gdal_translate -of GTiff -co blockysize=1 -outsize 1000 1000 test_in.TIF
> test_out.tif
> 
> gdalinfo test_out.tif
> ...
> ...
> Band 1 Block=1000x1 Type=Byte, ColorInterp=Red
> Band 2 Block=1000x1 Type=Byte, ColorInterp=Green
> Band 3 Block=1000x1 Type=Byte, ColorInterp=Blue
> 
> I can't tell about usability for compressed images and quality of
> subsampling without making some tests.

Subsampling will be nearest neighbour, with all known limits of such 
subsampling.

One scanline blocks (a.k.a one line "strips" in TIFF language) are possible 
for most TIFF compression schemes : deflate, lzw, packbits, etc...

So if you need a 8 x reduction of the full resolution image, it will read one 
line every 8 lines (decompressing the whole line), and for that line, it will 
use 8 pixel every 8 pixels.

An exception is JPEG compression where strip height must be a multiple of 8 
(or 16 if using YCbCr photometric interpretation). GDAL can also make use of 
it, but it will be much less efficient since it will need to decompress the data 
for the 8 lines. So you will have a gain only at 16 or 32 x reduction levels.

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the mapserver-users mailing list