Calculates coordinate mappings for spherical fm_mesh_2d projections.
This is an internal function not intended for general use.
Usage
fm_mesh_2d_map(loc, projection = NULL, inverse = TRUE)
fm_mesh_2d_map_lim(loc = NULL, projection = NULL)Arguments
- loc
Coordinates to be mapped.
- projection
The projection type. One of
NULL, "default", "longlat", "longsinlat", or "mollweide".- inverse
If
TRUE,locare map coordinates and coordinates in the spherical domain are calculated. IfFALSE,locare coordinates in the spherical domain and the forward map projection is calculated. Default:TRUE
Value
For fm_mesh_2d_map_lim, a list:
- xlim
X axis limits in the map domain
- ylim
Y axis limits in the map domain
No attempt is made to find minimal limits for partial spherical domains.
Author
Finn Lindgren Finn.Lindgren@gmail.com
Examples
(loc <- fm_mesh_2d_map(cbind(20, 10), "longlat"))
#> [,1] [,2] [,3]
#> [1,] 0.9254166 0.3368241 0.1736482
fm_mesh_2d_map(loc, "longlat", inverse = FALSE)
#> [,1] [,2]
#> [1,] 20 10