Skip to content

Commit

Permalink
fixed #876
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed May 11, 2024
1 parent 19da021 commit 4780aa7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions R/tmapGridAux.R
Original file line number Diff line number Diff line change
Expand Up @@ -662,10 +662,9 @@ tmapGridGrid = function(bi, bbx, facet_row, facet_col, facet_page, id, pane, gro

# quick fix for #564
if (!all(sf::st_geometry_type(lns_crop) == "MULTILINESTRING")) {
lns_crop_split_geo = split_geometry_collection(lns_crop$geometry)
lns_crop_split_geo = lns_crop_split_geo[sf::st_geometry_type(lns_crop_split_geo) == "MULTILINESTRING"]
stopifnot(nrow(lns_crop) == length(lns_crop_split_geo))
lns_crop$geometry = lns_crop_split_geo
lns_crop_lns = sf::st_collection_extract(lns_crop, "LINESTRING")
stopifnot(nrow(lns_crop) == length(lns_crop_lns))
lns_crop$geometry = sf::st_geometry(lns_crop_lns)
}

if (any(selx)) {
Expand Down

0 comments on commit 4780aa7

Please sign in to comment.