Jean-Romain / lidRplugins

Extra functions and algorithms for lidR package
42 stars 15 forks source link

delineate_lakes() with new version of lidR #17

Closed gsapijaszko closed 1 year ago

gsapijaszko commented 1 year ago

Hi Jean-Romain,

in function delineate_lakes.LAScatalog() the definition of

   output@proj4string <- las@proj4string

is not valid any longer. As suggestion, maybe CRS shall be provided as option? Os something silly like:

   output@proj4string <- lidR::crs(las)

That's the message:

> a <- lidRplugins::delineate_lakes(ctg)
Processing [==============================================================================================] 100% (8/8) eta:  0s
Error in delineate_lakes.LAScatalog(ctg) : 
  no slot of name "proj4string" for this object of class "LAScatalog"

> packageVersion("lidR")
[1] ‘4.0.2’
> packageVersion("lidRplugins")
[1] ‘0.4.0’

Regards, Grzegorz

Jean-Romain commented 1 year ago

Thank you, it should indeed fix it. Give it a try.

gsapijaszko commented 1 year ago

Thank you, quicker then my pull_request :). Will delete my fork.