man-roxygen/class_geocontainer_constructor.R

# class_geocontainer_constructor.R


# Always merged with class_geocontainer.R.


#' @inheritParams Container
#'
#' @param xcol a character of length 1 naming a field in `x` that holds
#' (east-west) spatial coordinates.
#'
#' @param ycol a character of length 1 naming a field in `x` that holds
#' (north-south) spatial coordinates.
#'
#' @param crs either an integer of length 1 or an object of class
#' [`sp::CRS`][sp::CRS-class]. Passing an integer to this argument triggers
#' an implicit conversion, see Details.
#'
#' @return
#' The constructor function [GeoContainer()] returns an object of class
#' `GeoContainer`.
#'
#' @details
#' ## Passing objects of class [`Schema`][Schema-class] to [GeoContainer()]
#'
#' If a [`Schema`][Schema-class] object is passed to [GeoContainer()], an empty
#' `GeoContainer` is generated. It will have empty columns defined with names
#' and types matching the underlying [`Schema`][Schema-class]. Argument `schema`
#' is ignored for that special case.
#'
#' ## Passing integer values to the `crs` argument of [GeoContainer()]
#'
#' The integer must represent a valid EPSG code (a standardized index for the
#' underlying coordinates reference system). It must hold be recognized by the
#' PROJ.4 projection system. To learn more on EPSG codes (or to search for one),
#' use the excellent online API [epsg.io](https://epsg.io).
jeanmathieupotvin/cargo documentation built on Oct. 27, 2020, 5:22 p.m.