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

get_elev_point() error #96

Open
jresasco opened this issue Jan 28, 2024 · 1 comment
Open

get_elev_point() error #96

jresasco opened this issue Jan 28, 2024 · 1 comment

Comments

@jresasco
Copy link

Hi Jeffrey

Thanks for your work on this package.

I'm coming back to some elevatr code that was working previously but now something seems to be wrong.
Here's the error:

Error in `[.data.frame`(x, coords) : undefined columns selected

Here's the chunk.

coords <- data.frame(obs$decimalLongitude,obs$decimalLatitude)
elevs <- get_elev_point(locations = coords, units="meters",  prj = "EPSG:4326", src = "epqs")

I tried specifying src = "aws" but the error is the same.

Here's a sample of what the first few rows of coords

> coords[1:3,]
  obs.decimalLongitude obs.decimalLatitude
1            -105.4198            39.84143
2            -105.2032            38.54277
3            -104.9507            39.60565

R version 4.2.2 (2022-10-31)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.6.9
elevatr_0.99.0

Thanks for any advice on how to get this working again!

Julian

@jresasco
Copy link
Author

Ah! looks like I just needed to call the columns "x" and "y".
colnames(coords)<-c("x","y")
All set - thanks

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

No branches or pull requests

1 participant