A convenience wrapper around gdalraster::transform_xy() for converting
projected coordinates to geographic. Useful for generating regular grids
in a projected CRS to feed to tissot(), which requires lon/lat input.
tissot_unproject(x, target = "EPSG:4326", ..., source = NULL)input coordinates — any xy-ish object: a two-column matrix,
data.frame, tibble, list with x/y or lon/lat components,
or a length-2 numeric vector for a single point
target CRS string (default "EPSG:4326"). Must be geographic.
ignored
source CRS string (required). Must be a projected CRS.
A two-column matrix of longitude and latitude values.
## regular grid in UTM zone 55S, unprojected to lon/lat for tissot()
xy <- expand.grid(x = seq(4e5, 6e5, length.out = 5),
y = seq(5200000, 5400000, length.out = 4))
ll <- tissot_unproject(xy, source = "EPSG:32755")
tissot(ll, "+proj=utm +zone=55 +south")
#> Tissot indicatrix: 20 points, +proj=utm +zone=55 +south
#> # A tibble: 20 × 14
#> x y dx_dlam dy_dlam dx_dphi dy_dphi scale_h scale_k scale_omega
#> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 146. -43.3 1.000 0.0148 -0.0148 1.000 1.000 1.000 0.0000335
#> 2 146. -43.4 1.000 0.00739 -0.00739 1.000 1.000 1.000 0.0000339
#> 3 147 -43.4 1.000 -0.000000599 0 1.000 1.000 1.000 0.0000343
#> 4 148. -43.4 1.000 -0.00739 0.00739 1.000 1.000 1.000 0.0000347
#> 5 148. -43.3 1.000 -0.0148 0.0148 1.000 1.000 1.000 0.0000351
#> 6 146. -42.7 1.000 0.0145 -0.0145 1.000 1.000 1.000 0.0000332
#> 7 146. -42.8 1.000 0.00724 -0.00724 1.000 1.000 1.000 0.0000335
#> 8 147 -42.8 1.000 -0.000000592 0 1.000 1.000 1.000 0.0000340
#> 9 148. -42.8 1.000 -0.00724 0.00724 1.000 1.000 1.000 0.0000343
#> 10 148. -42.7 1.000 -0.0145 0.0145 1.000 1.000 1.000 0.0000347
#> 11 146. -42.1 1.000 0.0142 -0.0142 1.000 1.000 1.000 0.0000328
#> 12 146. -42.2 1.000 0.00708 -0.00709 1.000 1.000 1.000 0.0000332
#> 13 147 -42.2 1.000 -0.000000585 0 1.000 1.000 1.000 0.0000336
#> 14 148. -42.2 1.000 -0.00709 0.00709 1.000 1.000 1.000 0.0000340
#> 15 148. -42.1 1.000 -0.0142 0.0142 1.000 1.000 1.000 0.0000344
#> 16 146. -41.5 1.000 0.0139 -0.0139 1.000 1.000 1.000 0.0000324
#> 17 146. -41.6 1.000 0.00694 -0.00694 1.000 1.000 1.000 0.0000328
#> 18 147 -41.6 1.000 -0.000000578 0 1.000 1.000 1.000 0.0000332
#> 19 148. -41.6 1.000 -0.00694 0.00694 1.000 1.000 1.000 0.0000336
#> 20 148. -41.5 1.000 -0.0139 0.0139 1.000 1.000 1.000 0.0000340
#> # ℹ 5 more variables: scale_a <dbl>, scale_b <dbl>, scale_area <dbl>,
#> # angle_deformation <dbl>, convergence <dbl>