R/reproj-package.R
reproj-package.RdTransform coordinates from a specified source to a specified target map projection. This uses the 'PROJ' library directly, via the 'PROJ' package. The 'reproj()' function is generic, methods may be added to remove the need for an explicit source definition. This is for use primarily to transform generic data formats and direct leverage of the underlying 'PROJ' library. (There are transformations that aren't possible with 'PROJ' and that are provided by the 'GDAL' library, a limitation which users of this package should be aware of.) The 'PROJ' library is available at https://proj.org/.
reproj provides helpers for easily reprojecting generic data, using the PROJ package as the reprojection engine.
The function reproj is designed to take an input data set x and then a
target coordinate system specification. The source argument is not positional
(must be named) and must be provided.
The coordinate system string may be anything accepted by the PROJ library (libproj).
Methods are provided for data frame and matrix, add S3 methods for you classes in your own package. For classed objects, or objects with a known method for finding the 'source' coordinate system your method can provide that logic.
See reproj for global options to control assumptions about data that is input in longitude latitude form.
Useful links: