USEPA / elevatr

An R package for accessing elevation data
Other
202 stars 25 forks source link

Returned value of get_elev_point() is NA #57

Closed BFonteh closed 3 years ago

BFonteh commented 3 years ago

I wish to know what to do if the return value of this function is NA. How can this be handles?

BFonteh commented 3 years ago

Hello, Please I wish to know the interpretation of a negative altitude.

jhollist commented 3 years ago

Sorry for delay in responding.

Can you provide example code for each of these issues? There are legitimate reasons that get_elev_point would return NA or a negative value but hard to say without seeing what code is returning this.

Thanks

jhollist commented 3 years ago

@Fonteh-Bonaventure I am trying to clean up some of my issues. Happy to help out if you can provide some example code. If I don't hear back with some example code in a couple of weeks, I will close this issue out..

lindsaypoirier commented 3 years ago

Hi @jhollist , Thank you for this fantastic package. I have a similar question. When running get_elev_point() on a simple features df, when an NA gets returned for the elevation of a certain row, it overwrites the whole row of data with NAs (codes/images below). I could rejoin it with the original df based on row number, but I was wondering if there was any way to avoid this overwrite.

library(elevatr) elevation_airports <- get_elev_point(updated_aiports_sf, prj = 4269, src = "epqs")

Screen Shot 2021-07-21 at 11 15 48 AM Screen Shot 2021-07-21 at 11 15 34 AM
jhollist commented 3 years ago

Well, that's no good! Sorry!

Let me take a look.

On Wed, Jul 21, 2021 at 11:17 AM Lindsay Poirier @.***> wrote:

Hi @jhollist https://github.com/jhollist , Thank you for this fantastic package. I have a similar question. When running get_elev_point() on a simple features df, when an NA gets returned for the elevation of a certain row, it overwrites the whole row of data with NAs (codes/images below). I could rejoin it with the original df based on row number, but I was wondering if there was any way to avoid this overwrite.

library(elevatr) elevation_airports <- get_elev_point(updated_aiports_sf, prj = 4269, src = "epqs")

[image: Screen Shot 2021-07-21 at 11 15 48 AM] https://user-images.githubusercontent.com/2657884/126514010-3e31d28b-5900-46aa-8892-7c4b9725f8f0.png

[image: Screen Shot 2021-07-21 at 11 15 34 AM] https://user-images.githubusercontent.com/2657884/126514082-fccfabd9-9136-4585-9531-9e88f667f5e3.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/jhollist/elevatr/issues/57#issuecomment-884272810, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABJPYS6JVLKLKNQPIOLTK7LTY3QI7ANCNFSM455LKGHQ .

-- Jeffrey W. Hollister email: @.*** cell: 401 556 4087 https://jwhollister.com

jhollist commented 3 years ago

Just pushed a fix for this to install from GitHub will fix. Working on a push to CRAN soon.

lindsaypoirier commented 3 years ago

Fantastic, thank you!