http://maps.ngdc.noaa.gov/viewers/wcs-client/
, by
default) and a string containing the full path to the downloaded file is returned.
Typically, this return value is used with read.topo
to read the
data. Subsequent calls to download.topo
with identical parameters will simply return the name of the cached file,
assuming the user has not deleted it in the meantime.
For convenience, if destfile
is not
given, then download.topo
will construct a filename from the other arguments.
download.topo(west, east, south, north, resolution, destdir, destfile, format, server, debug = getOption("oceDebug"))
resolution
."."
is used, i.e. the data file
is stored in the present working directory."gmt"
. See Details."http://maps.ngdc.noaa.gov/mapviewer-support/wcs-proxy/wcs.groovy"
will be used.oce
functions. Generally, setting debug=0
turns off the printing, while higher values suggest that more information
be printed.download.*
functions are subject to change through the
autumn of 2016. The plan is to create individual functions
as needs arise in everyday work, thereby discovering patterns of
arguments that might make sense more generally. Therefore, it is likely
that argument order (and even name) may change up until approximately
December 2016. Users are advised to refer to arguments by name,
i.e. not to rely on their order, and they are asked for patience,
because argument names and defaults may vary through the early development.download.file
, using a URL
devised from reverse engineering web-based queries constructed by
the default server
used here. Note that the data source is "etopo1",
which is a 1 arc-second file [1,2].Three values are permitted for format
,
each named after the
targets of menu items on the
NOAA website (as of August 2016): (1) "aaigrid"
(for
the menu item "ArcGIS ASCII Grid"), which
yields a text file, (2) "netcdf"
(the default,
for the menu item named
"NetCDF"), which yields a NetCDF file
and (3) "gmt"
(for the menu item named
"GMT NetCDF"), which yields a NetCDF file in
another format. All of these file formats are
recognized by read.topo
.
(The NOAA server has more options, and if
read.topo
is extended to handle them, they will
also be added here.)
2. Amante, C. and B.W. Eakins, 2009. ETOPO1 1 Arc-Minute Global Relief Model: Procedures, Data Sources and Analysis. NOAA Technical Memorandum NESDIS NGDC-24. National Geophysical Data Center, NOAA. doi:10.7289/V5C8276M [access date: Aug 20, 2016].
download.file
.Other functions that download files: download.amsr
,
download.coastline
Other things related to topo
data: [[,topo-method
,
[[<-,topo-method
, as.topo
,
plot,topo-method
, read.topo
,
subset,topo-method
,
summary,topo-method
,
topo-class
, topoInterpolate
,
topoWorld
## Not run:
# library(oce)
# topoFile <- download.topo(west=-64, east=-60, south=43, north=46,
# resolution=1, destdir="~/data/topo")
# topo <- read.topo(topoFile)
# imagep(topo, zlim=c(-400, 400), drawTriangles=TRUE)
# data(coastlineWorldFine, package="ocedata")
# lines(coastlineWorldFine[["longitude"]], coastlineWorldFine[["latitude"]])
# ## End(Not run)
Run the code above in your browser using DataLab