Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return data for points and multi points #50

Open
jaseeverett opened this issue Jul 3, 2024 · 2 comments
Open

Return data for points and multi points #50

jaseeverett opened this issue Jul 3, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@jaseeverett
Copy link
Collaborator

@clairedavies and I regularly have need to extract data for points in the ocean. For example at mooring locations, CPR data points etc. It seems that oceandatr doesn't support the use of points. I understand this is slightly out of scope for you original intention, but it would certainly open up the package to new users.

For example we would like to get bathymetry data for multiple locations.

library(tidyverse)

dat = data.frame(lon = c(156, 158, 160, 162), lat = -42) %>% 
  sf::st_as_sf(coords = c("lon", "lat"), crs = "EPSG:4326")

out <- oceandatr::get_bathymetry(spatial_grid = dat, raw = TRUE)
#> This may take seconds to minutes, depending on grid size
#> Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'mask': [crop] extents do not overlap

Created on 2024-07-03 with reprex v2.1.0

Is it possible to return the nearest neighbour for point data.

@jflowernet jflowernet added the enhancement New feature or request label Jul 9, 2024
@jflowernet
Copy link
Member

I like this idea. As you said, could increase the usefulness of the package. It would be good to have this work for any data request, i.e. not just bathymetry, so I will need to make changes to spatialgridr for this to work consistently.

I'm going to be working though issues over the coming weeks, so will try to get to this.

@clairedavies
Copy link

Thanks Jason, we would also potentially use it for other datasets too if it worked with some of the other functions you have, i.e. distance from shore and ecoregions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants