Skip to content

Commit b046727

Browse files
authored
Merge pull request #22 from e-kotov/raster-chunking
add raster chunking
2 parents 5aa136d + a450210 commit b046727

16 files changed

+1749
-159
lines changed

R/backend_future.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ run_parallel_future <- function(grid_extent, cellsize_m, crs, dot_args) {
3535
}
3636

3737
# --- 2. CREATE TILES (DEFINITIVE CORRECT LOGIC) ---
38-
full_bbox <- sf::st_bbox(grid_extent)
38+
full_bbox <- .get_bbox_from_grid_extent(grid_extent, grid_crs)
3939
xmin <- floor(as.numeric(full_bbox["xmin"]) / cellsize_m) * cellsize_m
4040
ymin <- floor(as.numeric(full_bbox["ymin"]) / cellsize_m) * cellsize_m
4141
xmax <- ceiling(as.numeric(full_bbox["xmax"]) / cellsize_m) * cellsize_m

R/backend_mirai.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ run_parallel_mirai <- function(grid_extent, cellsize_m, crs, dot_args) {
3838
}
3939

4040
# --- 2. CREATE TILES (DEFINITIVE CORRECT LOGIC) ---
41-
full_bbox <- sf::st_bbox(grid_extent)
41+
full_bbox <- .get_bbox_from_grid_extent(grid_extent, grid_crs)
4242
xmin <- floor(as.numeric(full_bbox["xmin"]) / cellsize_m) * cellsize_m
4343
ymin <- floor(as.numeric(full_bbox["ymin"]) / cellsize_m) * cellsize_m
4444
xmax <- ceiling(as.numeric(full_bbox["xmax"]) / cellsize_m) * cellsize_m

R/backend_sequential.R

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,17 @@ inspire_grid_from_extent_internal <- function(
8585
)
8686
}
8787

88+
if (output_type != "sf_points" && point_type != "centroid") {
89+
warning(
90+
sprintf(
91+
"Argument 'point_type' ('%s') is ignored when output_type is '%s'.",
92+
point_type,
93+
output_type
94+
),
95+
call. = FALSE
96+
)
97+
}
98+
8899
# --- 3. PROCESS INPUT GEOMETRY ---
89100
input_sf <- NULL
90101
if (inherits(grid_extent, c("sf", "sfc"))) {

0 commit comments

Comments
 (0)