Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MakeCHMCatalog #1

Open
Muenchj4 opened this issue Dec 20, 2020 · 0 comments
Open

MakeCHMCatalog #1

Muenchj4 opened this issue Dec 20, 2020 · 0 comments

Comments

@Muenchj4
Copy link


title: "MakeCHMCatalog"
author: "Muench"
date: "17 12 2020"
output: html_document

===============================================================================

makeChmCatalog.R

Author: Chris Reudenbach, creuden@gmail.com

Copyright: Chris Reudenbach, Thomas Nauss 2017-2019, GPL (>= 3)

===============================================================================

#' creates a canopy height model from generic Lidar las data using the lidR package
#'
#' In addition the script cuts the area to a defined extent using the lidR catalog concept.
#' Furthermore the data is tiled into a handy format even for poor memory
#' and a canopy height model is calculated
#'
#' Input: regular las LiDAR data sets
#' Output: Canopy heightmodel RDS file of the resulting catalog

#================================================================================

0 - load packages

#-----------------------------
library("future")
library("raster")
require(envimaR)
install.packages("rlang")
devtools::install_github("r-spatial/link2GI")
require(link2GI)

1 - source files

#-----------------
source(file.path(envimaR::alternativeEnvi(root_folder = "D:/Benutzer/Muench/edu/mpg-envinsys-plygrnd",
alt_env_id = "COMPUTERNAME",
alt_env_value = "PCRZP",
alt_env_root_folder = "F:/BEN/edu"),
"src/mpg_course_basic_setup.R"))

source("D:/Benutzer/Muench/edu/mpg-envinsys-plygrnd/src/cut_mof.R")

2 - define variables

#---------------------

get viridris color palette

pal<-mapview::mapviewPalette("mapviewTopoColors")

define current projection (It is not magic you need to check the meta data or ask your instructor)

ETRS89 / UTM zone 32N

proj4 = "+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0"

3 - start code

#-----------------

cut the origdata to the AOI

mof <- cut_mof(coord = c(477600.0,5632500.0,478350.0,5632500.0),
proj = proj4<- sp::CRS("+init=epsg:32632"),
envrmt = envrmt)
<Fehler in cut_mof(coord = c(477600, 5632500, 478350, 5632500), proj = proj4 <- sp::CRS("+init=epsg:32632"), :
konnte Funktion "cut_mof" nicht finden

Fehler: Versuch einen Variablennamen der Länge 0 zu nutzen>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant