[R-sig-Geo] raster package and tiling schemes

Tomislav Hengl hengl at spatial-analyst.net
Fri Jan 22 10:12:38 CET 2016


If this can be of any help, I spend a lot of time tiling and working 
with large rasters in R (usually a combination of R, raster and sp 
packages + GDAL utils and SAGA GIS) so eventually I have made my own 
tiling functions:

http://gsif.r-forge.r-project.org/tile.html

The source code is at:

https://github.com/cran/GSIF/blob/master/R/tile.R

Here is an example of how to combine all these things to plot large 
rasters in parallel (still experimental, but you will get the idea):

http://plotkml.r-forge.r-project.org/plotKML.GDALobj.html
https://github.com/cran/plotKML/blob/master/R/plotKML.GDALobj.R

T. (Tom) Hengl
Researcher @ ISRIC - World Soil Information
Team member Africa Soil Information Services http://africasoils.net
Url: http://www.wageningenur.nl/en/Persons/dr.-T-Tom-Hengl.htm
Network: http://profiles.google.com/tom.hengl
Publications: http://scholar.google.com/citations?user=2oYU7S8AAAAJ


On 21-1-2016 15:02, Michael Sumner wrote:
> On Thu, 21 Jan 2016 at 04:00 Alex Mandel <tech_dev at wildintellect.com> wrote:
>
>> On 01/19/2016 09:22 PM, Michael Sumner wrote:
>>> Hi there, does raster or any related package have any built-in  schemes
>>> that allow for easy management of tiles?
>>>
>>> Raster itself provides a very powerful platform for building such a
>> scheme,
>>> since we can reasonably easily reclassify analogous RasterLayers at
>>> different resolutions, and map cell values from one raster to another -
>>> being careful with tile overlaps and alignment of course.
>>>
>>> Anyone working on such a thing already, or got any grand plans?
>>>
>>> I know rgdal and friends provide access to the GDAL tools in various
>> ways,
>>> but I want something in R only.
>>>
>>> Cheers, Mike
>>>
>>
>> What's the goal of tiling? And when you say tiles do you mean multiple
>> zoom levels like web tiles, or more a raster catalog like a VRT of
>> multiple rasters next to each other?
>>
>> If you mean zoom levels, things like pyramids in tiffs are local
>> equivalent but that's only for viewing data, not really useful for
>> analysis.
>>
>> If you mean things that are adjacent to each other, I would assume that
>> if they aren't all the same resolution/scale then you need to go to the
>> lowest common denominator and resample everything to that to get a
>> seamless data set. In this case the Raster merge and mosaic functions.
>> Though if you want to keep the files in pieces, save them all out into
>> the same resolution/scale, clipped to no longer have overlap, and
>> gdal_buildvrt.
>>
>> Or am I missing the point?
>>
>>
> Thanks Alex, these are good questions. I just want to be able to do it
> arbitrarily for lots of reasons, but right now I want to tile up some
> global data sets and allow my code to access them from a website at
> different resolutions.
>
> Basic stuff. Stuff that should be basic and on hand. The machinery behind
> raster::getData is probably a good place to start, to augment the SRTM with
> non-land areas.
>
> I'll get to it, but keen to hear of alternatives. (It's kind of amazing
> that there's still no comprehensive global source for bathymetry/topography
> data as a service.)
>
> Cheers, Mike
>
>
> -Alex



More information about the R-sig-Geo mailing list