addGeometry: addGeometry

View source: R/addGeometry.R

addGeometryR Documentation

addGeometry

Description

Enriches land use data on cluster resolution geometry information as required for conversion by magclass::as.SpatVector

Usage

addGeometry(x, clustermap)

Arguments

x

Landuse data on cluster/cell resolution as a magclass object

clustermap

A dataframe mapping with columns cluster, cell, and country

Value

A magclass object enriched with geometry information

Author(s)

Jan Philipp Dietrich, Pascal Sauer

Examples

## Not run: 
landUse <- magpie4::land("fulldata.gdx", level = "cell")
clustermap <- readRDS(Sys.glob("clustermap_*.rds"))
landUseEnriched <- magpie4::addGeometry(landUse, clustermap)
attr(landUseEnriched, "geometry")
attr(landUseEnriched, "crs")

## End(Not run)


pik-piam/magpie4 documentation built on Dec. 20, 2024, 1:59 p.m.