Skip to content

Commit

Permalink
fasterize update
Browse files Browse the repository at this point in the history
  • Loading branch information
jhollist committed Aug 9, 2024
1 parent 574bdc6 commit 8873c45
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@ Imports:
sp,
sf,
geosphere,
cluster
cluster,
fasterize
RoxygenNote: 7.2.3
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ lakemorpho 1.3.3 (2024-XX-xx)
## Bug Fixes
- Bug on very skinny polys for lakeMajorAxis and lakeMinorAxis. Checks for matrix and returns NA if not.

## Updates
- Added fasterize for rasterizing lakes

lakemorpho 1.3.2 (2023-09-15)
==========================

Expand Down
2 changes: 1 addition & 1 deletion R/lakeSurroundTopo.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ lakeSurroundTopo <- function(inLake, inElev = NULL, inCatch = NULL,
ymax <- extent(tmpBuff)@ymax
xmin <- extent(tmpBuff)@xmin
ymin <- extent(tmpBuff)@ymin
lakepr <- rasterize(inLake, raster(xmn = xmin, xmx = xmax, ymn = ymin, ymx = ymax,
lakepr <- fasterize::fasterize(inLake, raster(xmn = xmin, xmx = xmax, ymn = ymin, ymx = ymax,
nrows = nr, ncols = nc, crs = CRS(sf::st_crs(inLake)$wkt)))
lakepr2 <- lakepr
lakepr2[is.na(lakepr2)] <- 0
Expand Down

0 comments on commit 8873c45

Please sign in to comment.