[gdal-dev] Tiling with overlap

Ari Jolma ari.jolma at gmail.com
Mon Aug 8 07:26:24 PDT 2016


08.08.2016, 16:42, Margherita Di Leo kirjoitti:
> Ari,
>
> On Mon, Aug 8, 2016 at 3:01 PM, Ari Jolma <ari.jolma at gmail.com 
> <mailto:ari.jolma at gmail.com>> wrote:
>
>     08.08.2016, 15:19, Margherita Di Leo kirjoitti:
>>     Dear all,
>>
>>     is there a simple way to create tiles with a certain overlap?
>
>     Do you mean by "overlap" the geographic area the tiles should
>     cover? gdal2tiles.py creates the tiles for the area the source
>     dataset covers. So you can control the area through the source
>     dataset.
>
>
> Thanks for your answer, sorry I'm not sure I understand the 
> methodology you are proposing. Let me explain what I'm trying to do so 
> that the problem is clearer. I have a dataset that is a global 
> coverage, e.g. GMTED [1]. That is a tiled dataset. However for my 
> processing chain I need tiles that overlap on each other for a certain 
> number of pixels. This means that the area at the border of each tile 
> should be covered by the tile itself and by the adjacent one to 
> certain extent.

Ok. I've done similar thing when I needed to get overlapping tiles to 
produce shaded relief tiles on the fly from a DEM. My processing chain was:

1) define the wanted tile (rectangle)
2) expand it by some amount
3) grab the expanded tile from the source (GDAL Translate)
4) process the expanded tile (in my case DEMProcessing)
5) shrink the wanted tile
6) grab the original wanted tile from the result of the processing (GDAL 
Translate again)
7) deliver the final product

(BTW, I'll present this in my FOSS4G 2016 talk)

As the first thought I'd do the same access the source dataset with GDAL 
and grab the data as such rectangles as you need (not the native tiles 
on the server) - i.e., your overlapping tiles.

> My method would be the following. I would create a virtual mosaic and 
> then create the tiles with this rule. From the manual of gdal2tiles.py 
> it is not clear to me if i can obtain this result. What do you mean by 
> "you can control the area through the source dataset"?

I mean simply set the area of the source but it is not relevant here 
since your problem is different.

I think you need to write your own code as gdal2tiles is probably not 
the solution.

Ari

>
> Thank you
>
>
> [1] http://topotools.cr.usgs.gov/gmted_viewer/ 
> <http://topotools.cr.usgs.gov/gmted_viewer/>
>
>
> -- 
> Margherita Di Leo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20160808/455a495c/attachment.html>


More information about the gdal-dev mailing list