getPrjFromNCDF: Get projection from NetCDF-CF Grid Mapping

Description Usage Arguments Details Value Examples

Description

This function takes a NetCDF-CF projection container and returns a proj4 string.

Usage

1

Arguments

gm

A list of attributes of the grid mapping variable as returned by ncdf or ncdf4's get attributes functions.

Details

The WGS84 datum is used as a default if one os not provided in the projectiuon container, warnings will be provided in that case.

If only a semi_major axis is provided, a sperical earch is assumed.

https://en.wikibooks.org/wiki/PROJ.4 https://trac.osgeo.org/gdal/wiki/NetCDF_ProjectionTestingStatus http://cfconventions.org/cf-conventions/cf-conventions.html#appendix-grid-mappings

Value

A proj4 string for use with the sp CRS function.

Examples

1
2
3
4
5
crs <- list(grid_mapping_name="latitude_longitude",
            longitude_of_prime_meridian = 0,
            semi_major_axis = 6378137,
            inverse_flattening = 298)
prj <- getPrjFromNCDF(crs)

dblodgett-usgs/NCDFSG documentation built on May 15, 2019, 1:21 a.m.