Skip to content

Commit

Permalink
Merge pull request #946 from mdsumner/patch-1
Browse files Browse the repository at this point in the history
fix message about drop_zm
  • Loading branch information
edzer committed Jan 11, 2019
2 parents 12fcccb + 8dc6a3b commit 0444a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/sp.R
Expand Up @@ -237,10 +237,10 @@ as_Spatial = function(from, cast = TRUE, IDs = paste0("ID", 1:length(from))) {
zm = class(from[[1]])[1]
if (zm %in% c("XYM", "XYZM"))
stop("geometries containing M not supported by sp\n",
'use `drop_zm(..., what = "M")`')
'use `st_zm(..., what = "M")`')
StopZ = function(zm) { if (zm %in% c("XYZ", "XYZM"))
stop("sp supports Z dimension only for POINT and MULTIPOINT.\n",
'use `drop_zm(...)` to coerce to XY dimensions') }
'use `st_zm(...)` to coerce to XY dimensions') }
switch(class(from)[1],
"sfc_POINT" = sfc2SpatialPoints(from),
"sfc_MULTIPOINT" = sfc2SpatialMultiPoints(from),
Expand Down

0 comments on commit 0444a9a

Please sign in to comment.