USEPA / elevatr

An R package for accessing elevation data
Other
204 stars 26 forks source link

request for get_elev_raster units option and save dem option for get_elev_points AWS #28

Open ghost opened 4 years ago

ghost commented 4 years ago

Hi there. I love the package but have a couple of hopefully simple feature requests. First, the get_elev_point tool has a "units" option for returning elevations in ft or m but the get_elev_tool seems to return only meters with no "units" option. Second, it might be nice to have a "save raster" option for the get_elev_points tool when using the AWS service since it basically does the work of get_elev_raster. In my current workflow, I'm using get_elev_raster and multiplying by 3.28084 for unit conversion. I then use raster::extract to populate ground elevations at the locations I used in get_elev_raster. A couple of subtle tweaks to the package functions would save a few lines of code.

jsta commented 4 years ago

What do you think of implementing a data cache similar to FedData::get_ned (https://docs.ropensci.org/FedData/reference/get_ned.html) as a solution to the save raster request?

jhollist commented 4 years ago

A data cache is one of the things I would like to do. Lot of reasons it makes sense. Elevation unit conversions should be fairly straightforward; however, I am not immediately sure on how to handle the CRS. Currently the CRS is whatever the users specifies and the elevations come down however requests of the API (the USGS EPQS provides the ft vs m as an option) are made. This pushes off the maintenance of the CRS to the user and the elevation units to the API. If we weave in the conversions, then elevatr has to figure out how to deal with that. I'm sure there is a solution, I just haven't thought about it too much. Let me mull it over (with the caveat that I don't know when I'll have time to work on elevatr in the near future!)

And thanks for the suggestions!

ghost commented 4 years ago

No worries. I have a very easy workaround so I'm not hampered whatsoever. Those feature requests are really just minor conveniences. I had not heard of the FedData package and just used it to get the 1/3 NED from USGS for my area of interest. The elevatr package was not only several times faster, but FedData also saved a couple hunded mbs of dem to my local. It don't see a way to turn that off. Using raw.dir=NULL throws an error.