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

Forest Information from LiDAR data-your title #4

Open
utterances-bot opened this issue Dec 8, 2021 · 19 comments
Open

Forest Information from LiDAR data-your title #4

utterances-bot opened this issue Dec 8, 2021 · 19 comments

Comments

@utterances-bot
Copy link

Forest Information from LiDAR data-your title

https://gisma-courses.github.io/gi-modules/gi-modules/post/2021-11-20-forest-information-from-lidar-data/

Copy link

Muenchj4 commented Dec 8, 2021

Trying to run "make_CHM_tiles.R" and reading the given las File the warning message came: "Invalid data: ScanAngleRank greater than 90 degrees".
Further trying lasnormalize the warning message came: "1: lidR::lasnormalize is deprecated. Use normalize_height instead.
2: There were 14 degenerated ground points. Some X Y Z coordinates were repeated. They were removed.
3: There were 180 degenerated ground points. Some X Y coordinates were repeated but with different Z coordinates. min Z were retained."
At the end when trying to visualize using mapview the error came: "Error in if (x == "" | x == ".") { : argument is of length zero".
How can I handle this problem?

@gisma
Copy link
Contributor

gisma commented Dec 8, 2021

everythng fine so far just dont use mapview. Try to plot the result

@Muenchj4
Copy link

Muenchj4 commented Dec 8, 2021 via email

Copy link

Muenchj4 commented Dec 8, 2021

Now, I am trying to run the Script using MOF_las file. But it does not know "espg_number". What should I input instead?

@gisma
Copy link
Contributor

gisma commented Dec 8, 2021

@Muenchj4 we discussed during the last course it is: https://epsg.io/25832

@Muenchj4
Copy link

Muenchj4 commented Dec 8, 2021 via email

Copy link

Muenchj4 commented Dec 8, 2021

Ok I have set epsg_number = 25832.
p2r and knnidw worked well. But trying to normalize height the error came: Processing [========>-------------------------------------------------------------------------------------------------------] 8% (1/12) eta: 9sError: Dataset copy failed
What could be the problem?

Copy link

Muenchj4 commented Dec 8, 2021

sorry, normalize_height also worked well, but it was not able to grid canopy.

Copy link

Muenchj4 commented Dec 8, 2021

I have found the problem myself. There was not setted a path normalized. I set it myself and rast was able to write the file "chm_distmin_1m", plotted it, but mapview did not work again, since it could not find the function "pal".

@gisma
Copy link
Contributor

gisma commented Dec 8, 2021

@Muenchj4 yup the col function pal is not defined. Just delete the row

@Muenchj4
Copy link

Muenchj4 commented Dec 8, 2021 via email

Copy link

GeoKL commented Dec 14, 2021

Hello,
the script is running, but whenever I try to knit it (for putting it on the website) I get the error:

"C:/Program Files/RStudio/bin/pandoc/pandoc" +RTS -K512m -RTS agis_lidar_13-12.knit.md --to html4 --from markdown+autolink_bare_uris+tex_math_single_backslash --output agis_lidar_13-12.html --lua-filter "E:\edu\Packages\rmarkdown\rmarkdown\lua\pagebreak.lua" --lua-filter "E:\edu\Packages\rmarkdown\rmarkdown\lua\latex-div.lua" --self-contained --variable bs3=TRUE --standalone --section-divs --template "E:\edu\Packages\rmarkdown\rmd\h\default.html" --no-highlight --variable highlightjs=1 --variable theme=bootstrap --include-in-header "C:\Users\Kathi\AppData\Local\Temp\Rtmp4UVnEJ\rmarkdown-str23f05223275.html" --mathjax --variable "mathjax-url:https://mathjax.rstudio.com/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
pandoc.exe: Cannot decode byte '\xb2': Data.Text.Internal.Encoding.decodeUtf8: Invalid UTF-8 stream
Error: pandoc document conversion failed with error 1
Execution halted

What could this be about? Online I didn't find anything about this..

@gisma
Copy link
Contributor

gisma commented Dec 14, 2021

Please sent or upload the markdown file

Copy link

GeoKL commented Dec 14, 2021

@gisma took me a while, but now I did and sent you an invite.

Copy link

Muenchj4 commented Jan 9, 2022

Er findet momentan bei mir die Funktion "get_vrt_img" nicht. Wie kann ich diese Funktion einbauen?

Copy link

Ich habe das "mof_chm_one_tile.tif" nochmals zu plotten versucht. Es ist prinzipiell auch immer noch im Ordner. Er gibt aber die Meldung aus: Error in h(simpleError(msg, call)) :
Fehler bei der Auswertung des Argumentes 'x' bei der Methodenauswahl für Funktion 'plot': object 'mof_chm_one_tile.tif' not found

Copy link

Ich habe den Fehler gefunden und den Katalog jetzt erstellt.

@gisma
Copy link
Contributor

gisma commented Jan 14, 2022

versuchen sie es mal mit raster::plot() zu plotten.

@gisma
Copy link
Contributor

gisma commented Jan 14, 2022

das ist eine Funktion die ich ihnen im Kurskontext zur Verfügung gestellt hatte.

get_vrt_img = function(name,path,tag,rasterStack = TRUE) {
  fList = list.files(path, 
                     pattern = glob2rx(paste0("*",tag,".tif")),
                     full.names = TRUE)
  
  res = invisible(gdalUtils::mosaic_rasters(gdalfile = fList,
                            output_Raster = TRUE,
                            dst_dataset = paste0(path,name,".tif"),verbose = FALSE))
  
  if (rasterStack) return(raster::stack(paste0(path,name,".tif")))
  
}

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

4 participants