get.proj.info.M3: Obtain information about the projection used in the Models3...

Description Usage Arguments Details Value Warning Note Author(s) References See Also Examples

Description

Obtain information about the projection used by in the Models3-formatted file. Build a string describing the projection which can be used by the R package rgdal.

Usage

1
get.proj.info.M3(file, earth.radius=6370000)

Arguments

file

File name of Models3-formatted file which contains information about the projection. Currently, this function can only handle files with a Lambert conic conformal, polar stereographic, and longitude/latitude projections.

earth.radius

Radius of the earth (in meters), which is assumed to be spherical by the Models3 I/O API. Default value is 6 370 000 m. Note that the radius in some previous version of the Models3 I/O API was 6 370 997 m, which may be appropriate for some users. For instance, this latter value was used in previous packages supplied by Battelle.

Details

This function assumes that the file uses the Lambert conic conformal projection, polar stereographic projection, or longitude/latitude.
The Models3 I/O API assumes a spherical earth. The default value for earth.radius is 6 370 000 m (sometimes referred to as “sphere 20”), which is the current value used in the Models3 I/O API. Note that the radius in some previous versions of the Models3 I/O API was 6 370 997 m, and this value was also used in previous packages for reading Models3-formatted files, which were developed for EPA by Battelle.

Value

String describing model projection, which can be utilized by the rgdal package (for projections to and from longitude/latitude, for example).

Warning

Currently, this function can only handle files with Lambert conic conformal, polar stereographic, and longitude/latitude projections.

Note

This function relies on the R package ncdf4 to read information from Models3-formatted files, since the Models3 format is built on netCDF
(http://www.unidata.ucar.edu/software/netcdf).
The string that is returned by this function is appropriate for interface with GDAL (Geospatial Data Abstraction Library, http://www.gdal.org) through package rgdal. Usually, the user will not call this function directly; instead, it will be called by other functions in this package.

Author(s)

Jenise Swall

References

See information about the meaning of Models3 I/O API projection arguments at
http://www.baronams.com/products/ioapi/GRIDS.html.

See Also

project.lonlat.to.M3, project.M3.to.lonlat,
project.M3.1.to.M3.2, get.map.lines.M3.proj

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Find the path to a demo file on lambert conic conformal projection.
lcc.file <- system.file("extdata/ozone_lcc.ncf", package="M3")
## Get string with projection information, using previous value for
## the earth's radius.
get.proj.info.M3(lcc.file, earth.radius=6370997)

## Find the path to a demo file on polar stereographic projection.
polar.file <- system.file("extdata/surfinfo_polar.ncf", package="M3")
## Get string with projection information.
get.proj.info.M3(polar.file)

M3 documentation built on May 2, 2019, 11:04 a.m.