export_tif: Export result grid as GeoTiff

View source: R/export_tif.R

export_tifR Documentation

Export result grid as GeoTiff

Description

This function exports the result grid as a GeoTiff.

Usage

export_tif(grid, origin, resolution, epsg_code, directory=getwd(), 
		filename="grid.tif")

Arguments

grid

The grid that should be exported.

origin

The geographic coordinates of the origin of the grid.

resolution

The resolution of the grid in (geographical) degree.

epsg_code

The epsg_code of the origin coordines. Defauls to 4326.

directory

The directory in which the file will be created.

filename

The name of the created GeoTiff-file.

Details

This routine exports a grid as a GeoTiff-file.

Author(s)

Maximilian Lange

Examples

##load data
data(dataset.all.species)
data(dataset.landwater)

##create grid parameters
dimension <- getDimension(dataset.all.species, resolution=1)
origin <- getOrigin(dataset.all.species)

##create landwatermask
landwatermask.nocoast <- createLandwatermask(dataset.landwater, 
						dimension, origin, resolution=1)

##estimate species richness
species.richness.weighted <- species.richness(dataset.all.species,
	landwatermask.nocoast, distances=1:5, weight=0.5, dimension,
	origin, resolution=1, upperbound=3000, all.species=1:2)

##export
## Not run:  
export_tif(species.richness.weighted, origin, resolution=1, epsg_code="4326",
	    directory=getwd(), filename="species.richness.tif")

## End(Not run)

sperich documentation built on July 26, 2023, 5:49 p.m.

Related to export_tif in sperich...