Skip to content

Commit

Permalink
Merge branch 'suite' into suite_dev
Browse files Browse the repository at this point in the history
  • Loading branch information
RubD committed Mar 12, 2024
2 parents 2ab8806 + 3828f8f commit 79a3e16
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions R/general_help.R
Original file line number Diff line number Diff line change
Expand Up @@ -1149,11 +1149,13 @@ readPolygonFilesVizgenHDF5 = function(boundaries_path,
#' can be selected.
#' @param file parquet file to load
#' @param z_index either 'all' or a numeric vector of z_indices to get polygons for
#' @param calc_centroids calculate centroids for the polygons (default = TRUE)
#' @param verbose be verbose
#' @keywords internal
#' @export
readPolygonVizgenParquet = function(file,
z_index = 'all',
calc_centroids = TRUE,
verbose = TRUE) {

# package checks
Expand Down Expand Up @@ -1223,6 +1225,12 @@ readPolygonVizgenParquet = function(file,
spatVector = sv,
unique_ID_cache = poly_table$EntityID
)

if(isTRUE(calc_centroids)) {
# NOTE: will not recalculate if centroids are already attached
gpoly = .calculate_centroids_polygons(gpolygon = gpoly, append_gpolygon = TRUE)
}

})

return(out)
Expand Down

0 comments on commit 79a3e16

Please sign in to comment.