[mapserver-users] Re: Raster Strategies Examples

Edi.Karadumi edikaradumi at gmail.com
Thu Aug 19 08:20:30 EDT 2010


Sorry to bother again, when i use gdal_merge.py the part -ps 160 160, thats
the pixel dimension and i get an image 1kb. The pixel size of the original
file is 0.08 meters. So i think i should use 0.08x32 in the gdal_merge.py
command? And how many tiles should i merge together? Now i have 2T images
and 2000Gb/32 = 62Gb the rezult image. Should i merge them all together and
than recreate tiles? Even if i had 1200gb, 1200/32=37.5gb for an image not
1gb. That is still an image size that cant be handled




On Tue, Aug 3, 2010 at 2:13 PM, Frank Warmerdam [via OSGeo.org]
<ml-node+5368036-667589329-607655 at n2.nabble.com> wrote:

Folks, 

I'm sorry for speaking up on this without having read the other replies. 
Forgive me for repeating information. 

Edi.Karadumi wrote: 
> as you may know, i have very slow performance when i zoom out and im
> stucked 
> here. As i have read i should make a copy of the tiles with reduced 
> resolution. Merge the tiles together and use min/max scale to show
> different 
> layers in different scales. the min/max scales i zoom in/out are 
> 100/1200000. Now my questions are 
> 
> - How can i calculate the scale where i should create another layer of the 
> tiles, or i shoud see it with some tests? 

I find the MapServer scale values very confusing myself.  If I want 
to compute the scale for particular request (for instance to establish 
breakpoints for MINSCALE/MAXSCALE), I do a request at the target resolution 
with shp2img and debug output on and examine the debug output for the scale 
reported. 

> - how much should be the resolution of the new layer? 

You basically want to move to a new mosaiced overview layer at the point 
where a map request is likely to request several tiles at once.  If 
we, roughly, assume a map request is on the order of 500x500 then at 
32 times reduction in resolution would give a request over an area of 
16000 x 16000 which is certain to touch several of your 6000 x 6000 
base files.  So, I'd aim to have this merged mosaic at approximately 
1/32nd of the resolution of the original imagery. 

1200GB of full res imagery reduced to 1/32nd resolution is only about 1GB 
so it is a very managable size for an overview layer. 

> - is there any tools or program to merge the tiles? merging 6000 tiles
> with 
> the gdalwarp by writing the command by myself is frustrating 

gdalwarp can take multiple input files in one run, but there are 
some issues with how gdalwarp is implemented that make it not scale 
well to many input files without great care.  Since the input files 
are quite a modest size I would suggest using gdal_merge.py to 
mosaic them at a reduced resolution.  If your original imagery were 
5m pixels something like: 

gdal_merge.py -o overview_mosaic.tif -ps 160 160 */*.tif 

might do the trick. 

> - how many tiles should i merge together to create the new layer? (how
> many 
> tiles should have the new layer) i know that in each zoomscale its better
> to 
> appear only one tile but i dont know how to calculate it 
> 
> - the tiles that i should merge are the originals or those with internal 
> tiling and overviews? 

If you use gdal_merge.py, it is best to use input files that have overviews 
already built.  This will ensure that the mosaic built uses the same 
downsampling technique (ie. averaging) that you used to build the overviews. 
It will also make the mosaicing much faster. 

Best regards, 
-- 
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Raster-Strategies-Examples-tp5363321p5439959.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list