To automate the use of this tool in order to (within R) obtain elevation/depth readings at a sample
of latitude/longitude points,
Here is some R code for 2 R functions
[at the end of the R code, JH has also added some notes on how to generate random locations on a sphere]
...
getDataforOneLocation(lat,long) ... the reading at, or nearest to, a single point
getDataforRectangle(latN,latS, longW,longE) ... readings for all locations in the box
these functions use the same conventions as below,. There is some error checking, but
the function is provided 'as is', without any warranty -- so don't try to sue the author if
your boat runs aground somewhere.