The goal of crsmeta is to extract map projection metadata from in-memory spatial R objects. The map projection is a set of parameters that describe a coordinate reference system (‘crs’) and there are various systems that do so with different sets of aliases and assumptions. With crsmeta we are only obtaining the value from various formats so that we can develop tools that use them rather than concern ourselves with format-specific plumbing.

We cannot obtain a crsmeta value from out of memory sources like files, databases, or URLs. Use another tool for that.

Installation

You can install the released version of crsmeta from CRAN with:

install.packages("crsmeta")

Install the development version of crsmeta from Github.

Example

This is a basic example which shows you how to obtain the PROJ string from spatial objects (raster, or silicate):

This also works for sp, and sf. The function crs_epsg() also works for sf objects, and crs_wkt2() for sf and sp objects for later system-level versions of the PROJ library.

Now sp or sf objects:

Code of Conduct

Please note that the crsmeta project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.