0

I hava another geodata question. I am trying to access the elevation data for specific points with the get_elev_point ()

I have about 160 points that I would like to get the elevation data for, so I would like to not do it one by one but I do not know how to retrieve them all at once.

I have made a data.frame of all my points where the first column x is longitude and the second column y is latitude and these are the only data in the data.frame.

> elevationpoints <-get_elev_point(locations = pontok_df, units="meters", prj = ll_prj, src = "aws")

Error in seq.default(from = ceiling(min_tile[2]), to =
floor(max_tile[2])) :    'to' must be a finite number In addition:
Warning message: In log(tan(lat_rad) + (1/cos(lat_rad))) : NaNs
produced

But it does not seem to yield any results. Could you please help me? Much appreciated!

Kamilla

  • It's easier to help you if you include a simple [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input and desired output that can be used to test and verify possible solutions. Explicitly list any non-base R packages that you are using. – MrFlick Jan 21 '21 at 19:58
  • So here I go. @MrFlick I took the earthquake data from R and transformed it into a data.frame that has only the longitude and latitiude. Then tried to access the elevation points via get_elev_points and got the same error message: `data(quakes)` `head(quakes)` `locations <- data.frame(x = c(quakes$long, 1000), y = c(quakes$lat, 1000))` `quakes_elev <-get_elev_point(locations = locations, units="meters", prj = ll_prj, src = "aws")` – Kamilla Choni Pléh Jan 23 '21 at 11:28
  • Also I am using raster package. – Kamilla Choni Pléh Jan 23 '21 at 11:30

0 Answers0