From 1c5f332b1e5796724716615bcd7b2afe2688560c Mon Sep 17 00:00:00 2001 From: mtennekes Date: Thu, 7 Mar 2024 16:08:16 +0100 Subject: [PATCH] fixed #804 --- R/tmapShape.R | 5 +++++ 1 file changed, 5 insertions(+) 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))