[gdal-dev] How would I build a custom pyramid ?
christian.mueller at nvoe.at
christian.mueller at nvoe.at
Mon Aug 22 08:04:03 EDT 2011
Zitat von Alain Camus <aca at ngi.be>:
>
> Hello list,
>
> I have a set of tiles at resolution 0.5 m/pxl. Based on this data,
> I'd like to create a pyramid that has zoom levels 0.166667,
> 0.333333, 0.666667 and 1.66667 (the data will only be viewed in
> geoserver at these levels, so I guess it will be faster if I prepare
> the data at these levels).
Geoserver will rescale your raster data depending on the envelope in
world coordinates and the pixel dimensions. It es very unlikely that a
request needs one of your precalculated resolutions. Pyramids lower
the amount of calculations giving you a better response time. Within
geoserver, pyramids are hidden. you see only one layer, the logic
chooses the best fitting pyramid level and does the required
calculations.
I would try a gdal_retile job with 10 pyramids and look at the result
in geoserver. A zoom level of 2 means that 4 pixels are reduced to 1
pixel. The 10th pyramid reduces a 1024x1024 pixel area to one pixel.
Cheers
Christian
>
> I think gdal_retile only allows multiplying the zoom levels by 2.
> Thus I think I will need those steps :
>
>
> 1. gdal_translate to get the lowest zoom level (0.5 --> 0.166667)
> 2. gdal_retile to give these tiles the good size in pixels,
> mosaic them and to create the next two levels (0.333333 and 0.666667 )
> 3. gdal_translate again to get the highest zoom level (1.66667 ,
> which is not the double of the previous one) starting from the
> 0.666667 tiles .
> 4. gdal_retile again to give these tiles the good size in pixels
> and mosaic them
> 5. manually adapt the pyramid config files
>
> At 0.5 m/pxl, I have 8000 geotiffs each 4000 x 4000 pxls, so I think
> it'll take a lot of time, especially steps 1 and 2.
>
> Would you have an advice to speed up the process or decrease the
> number of steps ?
>
> Alain
>
>
>
>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the gdal-dev
mailing list