Very nice! Where were you three years ago when I really needed this? The other R package you could look at is lidR. That one has all the tools you need if you are working with raw LIDAR.
Nice, thanks for the suggestion Scott. I'll take a look at lidR. Also, I'm not sure this package existed 3 years ago looking at the docs for ForestTools.
Hello! This was a great adjusted code coming off the Pennsylvania's group code. You said there were some things we could do to adjust the code. Could you please elaborate on that? Some of my points are not falling within the crown polygon features and I would like to fix that
Yes, if you take a look at the documentation for the R package you can see what can be changed, the relationship for height to crown, search radius, all sorts really.
I've been playing around with this on a couple of projects comparing it to on the ground data and so far I'm pretty impressed. I've been using zoomstack to filter out generated canopies over buildings but wondering if using NDVI in the raster calculator might achieve better results?
wow what a great video! for a school project i need point data and tree canopy area data of a city in the usa but it's so hard to find. there's 1 good source but you need to pay. so i might follow this tutorial to get the data myself if i really cannot find what i need!
I followed the instructions on the Pennsylvania tutorial but buildings were also included in my tree canopy and heigh output and I wanted to ask what can i do differently to make sure that only trees are being detected
Good question. This isn't something i'm using day to day. It just piqued my interest. If you can find a building footprint layer (check the MS GitHub repo) then maybe you could subtract them from the canopy height model. Have you contacted the penn team? They may have figured this out
Really useful stuff. I have noticed that it struggles to find individual trees if they are clustered together. Any thoughts on how to get the tool to grab those tree tops more effectively? I thought perhaps something to do with the variable window filter? Thanks!
There's a few variables you could tweak as well as processing the lidar before you run it. Smoothing the lidar and potentially clipping out building footprints might be useful steps too?
I've noticed the outputs are not projected directly over the raster pixels. For some reason the projected coordinate system is not porting over to my Shapefiles but projection is. It's mostly plotting where it should be but it's about 1.5 meters off. Any ideas?
Thanks for watching. I hadn't noticed that and I'm not using this in produciton, I just thought it was a neat R package. It might be worth getting in touch with the author of the package to find out if this is a known issue.
I keep receiving the warning: Input function for 'winFun' yields a window diameter of 197which is particularly large. Adjusting the 'winFun' function is recommended. I've changed the values for minimum input as I am using elevation in ft; and played a bit the script, (changing the 'lin =' values as it is linked to the winFun), but I receive the same warning. I have also gotten the message: Error: C stack usage 49027216 is too close to the limit Not sure if it is an issue with memory then...? Do you have an idea what might be occurring? My location also has a lot of buildings.
Have you tried the same script with a different (more simple) raster? It may help to rule out the effect of buildings. If you're still having difficulty it may be worth contacting the author of the r package
Hey, did you find a work-around for this/good values for 'lin='? I'm still hitting the same issue after scrubbing the buildings from the raster. (warning for window diameter of 307)
I have been trying to run this code. However, I keep getting the following error message: unexpected input 1: ï» I saw and there is another comment with the same error, but I didn't understand how to solve it.
Hey there, i've been trying out this tutorial but when i run the tool arcgispro crashes. Has that ever happened to you? Any idea why? I'm thinking maybe there's something i forgot to do in Rstudio? I have R and Rstudio both downloaded and i've ran the script in Rstudio + installed some packages, is there anything else i should've done? What arcgis pro version are you using? Coding is not my strongest asset :p
I have been trying to get this to run but using the original code from PA or the code here I receive the same geoprocessing error: P:\Tools\CrownDelineation\tree-top-delineation\tree-top-delineation:1:2: unexpected input 1: ï» ^ Any thoughts?
Thanks for watching and i do have thoughts! Using python check the type of your input data and then also check the ForestTools docs to see what data type is expceted. Perhaps you need to change it. Are you using dsm amd dtm data from defra?
I have been trying to run the code. However, I get an error message: unexpected input. 1: ï» I saw and there is another comment with the same error, but I didn't understand how to solve it.
Very nice! Where were you three years ago when I really needed this? The other R package you could look at is lidR. That one has all the tools you need if you are working with raw LIDAR.
Nice, thanks for the suggestion Scott. I'll take a look at lidR. Also, I'm not sure this package existed 3 years ago looking at the docs for ForestTools.
Hello! This was a great adjusted code coming off the Pennsylvania's group code. You said there were some things we could do to adjust the code. Could you please elaborate on that? Some of my points are not falling within the crown polygon features and I would like to fix that
Yes, if you take a look at the documentation for the R package you can see what can be changed, the relationship for height to crown, search radius, all sorts really.
I've been playing around with this on a couple of projects comparing it to on the ground data and so far I'm pretty impressed. I've been using zoomstack to filter out generated canopies over buildings but wondering if using NDVI in the raster calculator might achieve better results?
Have you tested both of them James? Let me know what you find. I suspect a combination would be most effective
wow what a great video! for a school project i need point data and tree canopy area data of a city in the usa but it's so hard to find. there's 1 good source but you need to pay. so i might follow this tutorial to get the data myself if i really cannot find what i need!
I'm sure there's a free lidar data pool somewhere. I can't remember what it is called though!
I followed the instructions on the Pennsylvania tutorial but buildings were also included in my tree canopy and heigh output and I wanted to ask what can i do differently to make sure that only trees are being detected
Good question. This isn't something i'm using day to day. It just piqued my interest. If you can find a building footprint layer (check the MS GitHub repo) then maybe you could subtract them from the canopy height model. Have you contacted the penn team? They may have figured this out
Really useful stuff. I have noticed that it struggles to find individual trees if they are clustered together. Any thoughts on how to get the tool to grab those tree tops more effectively? I thought perhaps something to do with the variable window filter? Thanks!
There's a few variables you could tweak as well as processing the lidar before you run it. Smoothing the lidar and potentially clipping out building footprints might be useful steps too?
I've noticed the outputs are not projected directly over the raster pixels. For some reason the projected coordinate system is not porting over to my Shapefiles but projection is. It's mostly plotting where it should be but it's about 1.5 meters off. Any ideas?
Thanks for watching. I hadn't noticed that and I'm not using this in produciton, I just thought it was a neat R package. It might be worth getting in touch with the author of the package to find out if this is a known issue.
Great work
Thank you. Not really my work, just putting the bits together. Reach out to Andrew who wrote the R package!
Great tutorial. The link to you edited code appears broken.
Thanks I've updated that now
I keep receiving the warning:
Input function for 'winFun' yields a window diameter of 197which is particularly large.
Adjusting the 'winFun' function is recommended.
I've changed the values for minimum input as I am using elevation in ft; and played a bit the script, (changing the 'lin =' values as it is linked to the winFun), but I receive the same warning. I have also gotten the message:
Error: C stack usage 49027216 is too close to the limit
Not sure if it is an issue with memory then...? Do you have an idea what might be occurring? My location also has a lot of buildings.
Have you tried the same script with a different (more simple) raster? It may help to rule out the effect of buildings. If you're still having difficulty it may be worth contacting the author of the r package
Hey, did you find a work-around for this/good values for 'lin='? I'm still hitting the same issue after scrubbing the buildings from the raster. (warning for window diameter of 307)
Great work, but i keep getting this error 'Error in library : there is no package called 'sf'' ' how do i fix that, I am using ArcGIS Pro 3.2.2
Have you tried installing the sf package and running it again?
I have been trying to run this code. However, I keep getting the following error message: unexpected input
1: ï»
I saw and there is another comment with the same error, but I didn't understand how to solve it.
Unexpected input indicates that your inputs might not be in the correct format. Have you double checked the format?
Hey there, i've been trying out this tutorial but when i run the tool arcgispro crashes. Has that ever happened to you? Any idea why? I'm thinking maybe there's something i forgot to do in Rstudio? I have R and Rstudio both downloaded and i've ran the script in Rstudio + installed some packages, is there anything else i should've done? What arcgis pro version are you using? Coding is not my strongest asset :p
How are you getting on with this? Are tthere any error messageas as to why Arc is crashing. I think I made this tuttorial using ArcGIS Pro 2.8.
I have been trying to get this to run but using the original code from PA or the code here I receive the same geoprocessing error: P:\Tools\CrownDelineation\tree-top-delineation\tree-top-delineation:1:2: unexpected input
1: ï»
^
Any thoughts?
Thanks for watching and i do have thoughts! Using python check the type of your input data and then also check the ForestTools docs to see what data type is expceted. Perhaps you need to change it. Are you using dsm amd dtm data from defra?
Hi, I would like to ask you if you could solve that error. I am having the same issue.
Great video, I would like to try it with my data.
Could you please provide the link to download the script?
The links are in the description but here you go:
github.com/Ojaybee/tree-top-delineation/blob/main/treeTopTool-ArcGISPro.R
Can we do this in QGIS?
Undoubtedly. I'm working on it 😉
Yes! raw.githubusercontent.com/Ojaybee/tree-top-delineation/main/treeTopTool-QGIS.r Video to follow.
I have been trying to run the code. However, I get an error message: unexpected input.
1: ï»
I saw and there is another comment with the same error, but I didn't understand how to solve it.
See my other comment