diff --git a/R/tmapShape.R b/R/tmapShape.R index b4f1cbd2..5e218246 100644 --- a/R/tmapShape.R +++ b/R/tmapShape.R @@ -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))