sen2r (version 1.2.1)

projpar: Return a parameter used in a WRT projection

Description

Return the value of a parameter (or the name) present in the WKT of the given proj4string.

Usage

projpar(proj4string, par, abort = FALSE)

projname(proj4string, abort = FALSE)

Arguments

proj4string

The proj4string to be named.

par

Character corresponding to the parameter name.

abort

logical: if TRUE, the function aborts in case an invalid proj4string is passed; if FALSE (default), the function returns NA, and a warning is shown.

Value

A character with the content of the parameter (NULL if the parameter is not recognised) or the name of the projection, and an attribute proj4string with the input projection checked using sf::st_crs().

Examples

Run this code
# NOT RUN {
projpar("+init=epsg:4326", "Unit")
# }
# NOT RUN {
projname("+init=epsg:4326")
# }

Run the code above in your browser using DataLab