crs_engine_proj_cmd: PROJ command-line transformation engine

Description Usage Arguments Value Examples

View source: R/engine-proj-cmd.R

Description

PROJ command-line transformation engine

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
crs_engine_proj_cmd(
  projinfo = getOption("crs2crs.projinfo", "projinfo"),
  cct = getOption("crs2crs.cct", "cct"),
  spatial_test = "intersects",
  env = NULL,
  quiet = FALSE
)

crs_has_default_proj_cmd()

## S3 method for class 'crs2crs_engine_proj_cmd'
crs_engine_proj_pipeline(
  engine,
  handleable,
  crs_to,
  crs_from = wk::wk_crs(handleable),
  bbox = wk::wk_bbox(handleable),
  extra_args = character(),
  ...
)

## S3 method for class 'crs2crs_engine_proj_cmd'
crs_engine_proj_pipeline_apply(engine, handleable, pipeline, ...)

## S3 method for class 'crs2crs_engine_proj_cmd'
crs_engine_transform(
  engine,
  handleable,
  crs_to,
  crs_from = wk::wk_crs(handleable),
  ...
)

## S3 method for class 'crs2crs_engine_proj_cmd'
crs_engine_get_wk_trans(engine, handleable, crs_to, crs_from, ...)

Arguments

projinfo

Path to the projinfo executable

cct

Path to the cct executable

spatial_test

Use "none" to skip querying coordinate operations based on bbox. Use "contains" to include only operations that completely contain handleable, or "intersects" for.

env

A list of environment variables to be applied during calls to projinfo and proj

quiet

Use TRUE to suppress output.

engine

A transform engine such as crs_engine_null()

handleable

A geometry vector (e.g., wkb(), wkt(), xy(), rct(), or sf::st_sfc()) for which wk_handle() is defined.

crs_to

Source and destination coordinate reference systems

crs_from

Source and destination coordinate reference systems

bbox

The optional bounding box of the object. Defaults to wk::wk_bbox() of handleable forced to crs_from. Use NULL to skip bounding box selectio for a single transformation.

extra_args

Extra args to pass to projinfo (e.g., to use specific areas or grid options)

...

engine-specific transformation options

pipeline

A PROJ coordinate transformation pipeline definition

Value

Examples

1
2
3
4
5
6
7
if (crs_has_default_proj_cmd()) {
  engine <- crs_engine_proj_cmd()
  crs_transform(
    wk::xy(-64, 45, crs = "OGC:CRS84"), "EPSG:3857",
    engine = engine
  )
}

paleolimbot/crs2crs documentation built on Jan. 8, 2022, 6:25 a.m.