polygon metrics does not work with LAScatalog #774
-
Hi, I am just adapting my workflow from using single LAS files to the LAScatalog processing workflow. Is it possible to use a LAScatalog with polygon_metrics or do I have to use catalog_apply? temp <- polygon_metrics(las = mylas, func = ~list(
minZ = min(Z),
maxZ = max(Z),
nZ = length(Z)),
geometry = mygeometry)
#> Error in UseMethod("polygon_metrics", las):
#> non-applicable method for 'polygon_metrics' applied to an object of class "LAScatalog" Best Gregor |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This is correct there is no Assume you have a large and long polygon polygon that encompasses 3 tiles. This is impossible to handle with an processing engine that processes sequentially square regions. If you are sure your polygons are relatively small and can fit in a chunk + its buffer, then, below are the steps of a custom function in
Process with a relatively large buffer to ensure that the polygons with a centroid inside the chunk are not beyond the chunk + buffer. |
Beta Was this translation helpful? Give feedback.
This is correct there is no
polygon_metrics
forLAScatalog
. The reason is that it is impossible to handle such algorithm in the general case with theLAScatalog
processing engine.Assume you have a large and long polygon polygon that encompasses 3 tiles. This is impossible to handle with an processing engine that processes sequentially square regions.
If you are sure your polygons are relatively small and can fit in a chunk + its buffer, then, below are the steps of a custom function in
catalog_apply
:polygon_metrics
with these polygonsProcess with a relatively large buffer to ensure that the polygon…