[R-sig-Geo] strange srtm3 query in geonames package
Michael Denslow
michael.denslow at gmail.com
Sun Nov 22 19:23:30 CET 2009
Dear r-sig-geo and Barry,
I am getting a strange value when doing a query using the function
GNsrtm3 in the geonames package.
Here is the code.
library(geonames)
GNsrtm3(34.63874,-79.10111) # outside Lumberton North Carolina USA!
srtm3 lng lat
1 -32768 -79.10111 34.63874
Warning message:
In readLines(u) :
incomplete final line found on
'http://ws.geonames.org/srtm3JSON?lat=34.63874&lng=-79.10111'
I think the elevation value should be around 47 meters. The geonames
website says 'ocean areas have been masked as "no data" and have been
assigned a value of -32768'.
http://www.geonames.org/export/web-services.html#srtm3
I tried adjusting the lat, long values to query some nearby cells but
I still get -32768.
Are these kinds of errors common in this dataset? Any suggestions?
I am would actually prefer to get an average elevation for the county
(Robeson) but am settling for the county centroid at this point.
Thanks in advance,
Michael
--
Michael Denslow
Graduate Student & Adjunct Instructor
I.W. Carpenter Jr. Herbarium [BOON]
Department of Biology
Appalachian State University
Boone, North Carolina U.S.A.
-- AND --
Communications Manager
Southeast Regional Network of Expertise and Collections
sernec.org
36.214177, -81.681480 +/- 3103 meters
More information about the R-sig-Geo
mailing list