Skip to content

Commit

Permalink
fixed #804
Browse files Browse the repository at this point in the history
  • Loading branch information
mtennekes committed Mar 7, 2024
1 parent f694696 commit 1c5f332
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions R/tmapShape.R
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,11 @@ tmapShape.sf = function(shp, is.main, crs, bbox, unit, filter, shp_name, smeta,
}

sfc = sf::st_geometry(shp)

if (inherits(sfc[[1]], c("XYZ", "XYM", "XYZM"))) {
sfc = sf::st_zm(sfc)
}

dt = as.data.table(sf::st_drop_geometry(shp))

dtcols = copy(names(dt))
Expand Down

0 comments on commit 1c5f332

Please sign in to comment.