# CRS-class

From sp v0.9-94
0th

Percentile

##### Class "CRS" of coordinate reference system arguments

Interface class to the PROJ.4 projection system. The class is defined as an empty stub accepting value NA in the sp package. If the rgdal package is available, then the class will permit spatial data to be associated with coordinate reference systems. The arguments must be entered exactly as in the PROJ.4 documentation, in particular there cannot be any white space in += strings, and successive such strings can only be separated by blanks.

Keywords
classes, spatial
##### Usage
CRS(projargs)
##### Arguments
projargs
A character string of projection arguments; the arguments must be entered exactly as in the PROJ.4 documentation; if the projection is unknown, use as.character(NA), it may be missing or an empty string of zero length and will then set to the
##### Note

Lists of projections may be seen by using the programs installed with the PROJ.4 library, in particular proj and cs2cs; with the latter, -lp lists projections, -le ellipsoids, -lu units, and -ld datum(s) known to the installed software (available in rgdal using projInfo). These are added to in successive releases, so tracking the website or compiling and installing the most recent revisions will give the greatest choice. Finding the very important datum transformation parameters to be given with the +towgs84 tag is a further challenge, and is essential when the datums used in data to be used together differ. Tracing projection arguments is easier now than before the mass ownership of GPS receivers raised the issue of matching coordinates from different argument sets (GPS output and paper map, for example).

##### Objects from the Class

Objects can be created by calls of the form CRS("projargs"), where "projargs" is a valid string of PROJ.4 arguments. The initiation function calls the PROJ.4 library to verify the argument set against those known in the library, returning error messages where necessary. The function CRSargs() can be used to show the expanded argument list used by the PROJ.4 library.

##### References

http://trac.osgeo.org/proj/

##### Aliases
• CRS-class
• CRS
• CRSargs
• print.CRS
• show,CRS-method
##### Examples
CRS()
CRS("")
CRS(as.character(NA))
CRS("+proj=longlat +datum=WGS84")
if (require(rgdal)) {
}