addHorizontalDistances: Helper function: add horizontal distances from left boundary...

Description Usage Arguments Value Examples

View source: R/gis.R

Description

Helper function: add horizontal distances from left boundary coordinates

Usage

1
addHorizontalDistances(gisData, leftBoundaryRow = 1)

Arguments

gisData

data.frame as retrieved by importShapefiles()

leftBoundaryRow

row number index of "gisData" which contains the left model boundary (Default: 1)

Value

Model coordinates instead of "real" world coordinates

Examples

1
2
3
4
5
6
7
8
9
shp.dir <- system.file("extdata", "qgis", package="kwb.demeau")
shp.files <- dir(path = shp.dir, pattern = ".shp", full.names = TRUE)
### Store GIS data in R data.frame "gisData"
gisData <- importShapefiles(shp.files)
### Add horizontal distances from left boundary and ignore all features that 
### have larger distances than "right" boundary
gisData <- addHorizontalDistances(gisData)
### Plot horizontal model coordinates
maxVertical <- -abs(max(gisData$fcBottom, na.rm=TRUE))

KWB-R/kwb.demeau documentation built on Sept. 10, 2019, 12:19 p.m.