From 20d39c616db38e6d9156d1a95e8e0c8a104d3893 Mon Sep 17 00:00:00 2001 From: mpadge Date: Wed, 26 Jun 2024 14:43:58 +0200 Subject: [PATCH] fix call to sfheaders in osm-surface for #61 --- DESCRIPTION | 2 +- R/add-osm-surface.R | 3 ++- codemeta.json | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 70a9296..0893fda 100755 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: osmplotr Title: Bespoke Images of 'OpenStreetMap' Data -Version: 0.3.5.007 +Version: 0.3.5.008 Authors@R: c(person(given = "Mark", family = "Padgham", diff --git a/R/add-osm-surface.R b/R/add-osm-surface.R index 986321e..6c5bf71 100755 --- a/R/add-osm-surface.R +++ b/R/add-osm-surface.R @@ -290,7 +290,8 @@ list2df_with_data <- function (map, obj, obj_type, xy_mn, dat, bg, } if (!missing (bg)) { - xy <- sfheaders::sf_point (cbind (xyz$x, xyz$y)) |> + xy <- cbind (as.numeric (xyz$x), as.numeric (xyz$y)) |> + sfheaders::sf_point () |> sf::st_sf (crs = 4326) |> reproj_equal_area () bdry <- sf::st_convex_hull (sf::st_combine (xy)) diff --git a/codemeta.json b/codemeta.json index 8da3bcc..426ca5a 100755 --- a/codemeta.json +++ b/codemeta.json @@ -8,7 +8,7 @@ "codeRepository": "https://github.com/ropensci/osmplotr", "issueTracker": "https://github.com/ropensci/osmplotr/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.3.5.007", + "version": "0.3.5.008", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",