[gdal-dev] Tiling with overlap

Blumentrath, Stefan Stefan.Blumentrath at nina.no
Mon Aug 8 12:01:46 PDT 2016


Hei Madi,



Given that you are quite familiar with GRASS GIS here a GRASS / GDAL solution:



1.      Patch all tiles into one VRT with gdalbuildvrt

2.      Link the VRT and the individual tiles to GRASS (r.external)

3.      Loop over the tiles and adjust you region accordingly and apply what GRASS module you like.



So something like this:



gdalbuildvrt ...



r.external input=vrt ...

r.external input=tile ...



for tile in $(g.list type=raster ...)

do

g.region -p raster=$tile n=n+x s=s-x w=w-x e=e+x (where x is your desired overlap in map units)

r.*

done



Cheers

Stefan

From: gdal-dev [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Margherita Di Leo
Sent: 8. august 2016 15:43
To: Ari Jolma <ari.jolma at gmail.com>
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] Tiling with overlap

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.
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"?
Thank you


[1] 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/69db3272/attachment-0001.html>


More information about the gdal-dev mailing list