Skip to content

Commit

Permalink
fix: l2c meta height/width instead of shape, lazrs lidar backend
Browse files Browse the repository at this point in the history
  • Loading branch information
martibosch committed Mar 28, 2024
1 parent c619239 commit bbb7c19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion detectree/lidar.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,10 @@ def to_canopy_mask(
with rio.open(ref_img_filepath) as src:
meta = src.meta.copy()
lidar_arr = rasterize_lidar(
lidar_filepath, lidar_tree_values, meta["shape"], meta["transform"]
lidar_filepath,
lidar_tree_values,
(meta["height"], meta["width"]),
meta["transform"],
)
canopy_arr = lidar_arr >= self.tree_threshold
if postprocess_func is not None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ requires-python = ">=3.8"
dependencies = [
"dask[delayed,distributed]",
"joblib",
"laspy >= 2.0.0",
"laspy[lazrs] >= 2.0.0",
"lightgbm",
"numpy >= 1.15",
"opencv-python >= 4.0.0",
Expand Down

0 comments on commit bbb7c19

Please sign in to comment.