From c706a76d66c50747bb5230171d620889da4feb31 Mon Sep 17 00:00:00 2001 From: anthonynorth Date: Sun, 14 Jan 2024 23:10:59 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20hypertid?= =?UTF-8?q?y/PROJ@e5cc06f257215eb503e6e3ce2e3519446a0042ed=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- news/index.html | 2 +- pkgdown.yml | 2 +- reference/index.html | 8 +- reference/proj_trans_create.html | 127 +++++++++++++++++++++++++++++++ sitemap.xml | 6 +- 5 files changed, 136 insertions(+), 9 deletions(-) create mode 100644 reference/proj_trans_create.html diff --git a/news/index.html b/news/index.html index aa7ad57..f2deffe 100644 --- a/news/index.html +++ b/news/index.html @@ -54,7 +54,7 @@

Changelog

diff --git a/pkgdown.yml b/pkgdown.yml index 75824ff..aba588b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,5 +3,5 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: PROJ: PROJ.html -last_built: 2024-01-11T12:40Z +last_built: 2024-01-14T23:10Z diff --git a/reference/index.html b/reference/index.html index 243c8f8..0c402bf 100644 --- a/reference/index.html +++ b/reference/index.html @@ -57,10 +57,6 @@

All functions ok_proj6()

Is 'PROJ library >= 6' available

- -

proj_create()

- -

Create a transformation object

proj_crs_text()

@@ -69,6 +65,10 @@

All functions proj_trans()

Transform a set of coordinates with 'PROJ'

+ +

proj_trans_create()

+ +

Create a transformation object

proj_version()

diff --git a/reference/proj_trans_create.html b/reference/proj_trans_create.html new file mode 100644 index 0000000..403107a --- /dev/null +++ b/reference/proj_trans_create.html @@ -0,0 +1,127 @@ + +Create a transformation object — proj_trans_create • PROJ + + +
+
+ + + +
+
+ + +
+

Creates a transformation object that transforms coordinates in a wk +pipeline.

+
+ +
+
proj_trans_create(source_crs, target_crs, use_z = NA, use_m = NA)
+
+ +
+

Arguments

+
source_crs, target_crs
+

Source/Target CRS definition, coerced with wk::wk_crs_proj_definition()

+ + +
use_z, use_m
+

Used to declare the output type. Use TRUE to +ensure the output has that dimension, FALSE to ensure it does not, +and NA to leave the dimension unchanged.

+ +
+
+

Value

+ + +

A PROJ transformation object

+
+ +
+

Examples

+
(trans <- proj_trans_create("OGC:CRS84", "EPSG:3857"))
+#> <proj_trans at 0x55846df221b0 with source_crs=OGC:CRS84 target_crs=EPSG:3857>
+wk::wk_transform(wk::xy(1:5, 1:5), trans)
+#> <wk_xy[5]>
+#> [1] (111319.5 111325.1) (222639.0 222684.2) (333958.5 334111.2)
+#> [4] (445278.0 445640.1) (556597.5 557305.3)
+
+library(wk)
+(invtrans <- wk_trans_inverse(trans))
+#> <proj_trans at 0x5584737421c0 with source_crs=EPSG:3857 target_crs=OGC:CRS84>
+
+h <- 1852 * 60
+## the stretch of Mercator to a square
+wk::wk_transform(wk::xy(c(-h * 180, 0, h * 180), c(-h * 180,0, h * 180)), invtrans)
+#> <wk_xy[3]>
+#> [1] (-179.6774 -85.02322) (   0.0000   0.00000) ( 179.6774  85.02322)
+
+
+
+
+ +
+ + +
+ +
+

Site built with pkgdown 2.0.7.

+
+ +
+ + + + + + + + diff --git a/sitemap.xml b/sitemap.xml index 08fff4b..b13b938 100644 --- a/sitemap.xml +++ b/sitemap.xml @@ -30,15 +30,15 @@ /reference/ok_proj6.html - - /reference/proj_create.html - /reference/proj_crs_text.html /reference/proj_trans.html + + /reference/proj_trans_create.html + /reference/proj_version.html