[gdal-dev] How would I build a custom pyramid ?

christian.mueller at nvoe.at christian.mueller at nvoe.at
Mon Aug 22 08:45:59 EDT 2011


Again, geoserver will rescale to your zoom levels < 0.5 m/pxl. I would  
take a small subset of your tiles (neighbors, of course) and make a test

Another important hint. What is your target platform ?. If your  
platform supports native JAI  as described here

http://docs.geoserver.org/latest/en/user/webadmin/server/JAI.html

you are lucky. AFIAK, this is the case for Windows/Linux.


Another idea. If you use gdal_merge to create on big geotiff picture  
with inner tiling, you can use
http://www.gdal.org/gdaladdo.html to add your pyramids to the geotiff.  
  The prepared geotiff should work out of the box with geoserver.

Cheers




Zitat von Alain Camus <aca at ngi.be>:

> Hi Christian,
>
> Thanks for your reply. OK, so I don't need my custom zoom levels.
>
> But I have one question remaining : two of the zoom levels that will  
>  be requested are smaller than the resolution of the original data   
> (0.166667 and 0.333333 are smaller than the original 0.5). So I   
> would need to increase (instead of decrease) the number of pixels to  
>  create the lowest pyramid level. Or is it useless considering the   
> way geoserver handles pyramid data ?
>
> Alain
>
> ----- Mail original -----
> De: "christian mueller" <christian.mueller at nvoe.at>
> À: "Alain Camus" <aca at ngi.be>
> Cc: gdal-dev at lists.osgeo.org
> Envoyé: Lundi 22 Août 2011 14:04:03
> Objet: Re: [gdal-dev] How would I build a custom pyramid ?
>
> 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.
>
>
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



More information about the gdal-dev mailing list