You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Great package. Thanks. It's very useful for our work and I love the new name.
One small issue, I notice the sf objects are returned with the geometry column as x. My preference (and I think the standard way to represent it) is to use geometry for the column name. @jflowernet and I were chatting and he mentioned there was inconsistency in some of the output so x was used for consistency.
This inconsistency could possibly be due to the use of sf::st_as_sf() rather than sf::st_sf(). I have had this issue to. The first (with _at_) gives you x but the 2nd will consistently give you geometry (as will reading in local files as sf objects). The reprex below illustrates this.
Hope this helps.
library(magrittr)
cCRS="EPSG:4326"# Create tibble with data tib=dplyr::tibble(x= seq(-50, 50, by=1), y=120) %>%
dplyr::bind_rows(dplyr::tibble(x=50, y= seq(120, 180, by=1))) %>%
dplyr::bind_rows(dplyr::tibble(x= seq(50, -50, by=-1), y=180)) %>%
dplyr::bind_rows(dplyr::tibble(x=-50, y= seq(150, 120, by=-1)))
# Convert to sfcsfc<-tib %>%
as.matrix() %>%
list() %>%
sf::st_polygon() %>%
sf::st_sfc(crs="EPSG:4326") %>%
sf::st_transform(crs=cCRS)
# Convert to sf using 2 different methodssf_x<-sfc %>% sf::st_as_sf()
colnames(sf_x)
#> [1] "x"sf_geometry<-sfc %>% sf::st_sf()
colnames(sf_geometry)
#> [1] "geometry"
Thanks for the updates here. Seems to be fixed for oceandatr::get_bathymetry, oceandatr::get_knolls, oceandatr::get_seamounts_buffered, oceandatr::get_coral_habitat.
It's still an issue for oceandatr::get_enviro_regions. Any chance of fix for that as well?
Commit should fix this for get_enviro_regions, but leaving this open as I want to double check all functions are returning geometry as the geometry column
Hi @echelleburns and @jflowernet,
Great package. Thanks. It's very useful for our work and I love the new name.
One small issue, I notice the
sf
objects are returned with the geometry column asx
. My preference (and I think the standard way to represent it) is to usegeometry
for the column name. @jflowernet and I were chatting and he mentioned there was inconsistency in some of the output sox
was used for consistency.This inconsistency could possibly be due to the use of
sf::st_as_sf()
rather thansf::st_sf()
. I have had this issue to. The first (with_at_
) gives youx
but the 2nd will consistently give yougeometry
(as will reading in local files as sf objects). The reprex below illustrates this.Hope this helps.
Created on 2024-01-19 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: