readpartGDAL: partial readGDAL

Description Usage Arguments Value Author(s) Examples

Description

Load geotiff maps partially, only the area of interest delimited by xlim and ylim.

Usage

1

Arguments

x

full path to the map to be loaded

xlim

a two dimensions vector containing the longitude limits of the area of interest.
xlim=NULL indicates no longitude limits. By default, xlim=NULL.
Please note that xlim have to be in the same units and projection as the ndvi maps.

ylim

a two dimensions vector containing the latitude limits of the area of interest.
ylim=NULL indicates no longitude limits. By default, ylim=NULL.
Please note that ylim have to be in the same units and projection as the ndvi maps.

...

further arguments sent to readGDAL.

Value

Returns the map of the region of interest.

Author(s)

Romain Frelat and Bruno Gerard

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(ndvits)
# Local variables
ndvidirectory=paste(system.file("extdata/VITO_Mzimba", package="ndvits"), "/", sep="")
region="Mzimba"
year=2004
#Define the limit of the area of interest :
xlim=c(33.5, 33.6)
ylim=c(-11.6, -11.4)
#call timetoMap to get the full path to the image
filein=timetoMap(ndvidirectory,region, year, 1, 1)

map = readpartGDAL(filein, xlim, ylim)

#display the loaded map
savemap(map)

ndvits documentation built on May 2, 2019, 4:47 p.m.

Related to readpartGDAL in ndvits...