-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
The Berghaus Star projection is not within the standard EPSG codes identified by sf
. Technically, it has the EPSG of ESRI 102299, which is not recognized. When copying the WKT2 given here: https://epsg.io/102299 and creating a projection in string format, st_transform()
accepts the string projection in the crs
argument. No errors are given. However, when plotting the resulting transformed data, all spatial units are read as empty.
See the reprex below:
library(sf)
#> Linking to GEOS 3.10.2, GDAL 3.4.2, PROJ 8.2.1; sf_use_s2() is TRUE
library(spData)
library(tmap)
data('world')
proj='PROJCRS["Berghaus_Star_AAG",
BASEGEOGCRS["WGS 84",
DATUM["World Geodetic System 1984",
ELLIPSOID["WGS 84",6378137,298.257223563,
LENGTHUNIT["metre",1]]],
PRIMEM["Greenwich",0,
ANGLEUNIT["Degree",0.0174532925199433]]],
CONVERSION["Berghaus_Star_AAG",
METHOD["Berghaus_Star"],
PARAMETER["False_Easting",0,
LENGTHUNIT["metre",1]],
PARAMETER["False_Northing",0,
LENGTHUNIT["metre",1]],
PARAMETER["Central_Meridian",-52,
ANGLEUNIT["Degree",0.0174532925199433]],
PARAMETER["Latitude_Of_Origin",90,
ANGLEUNIT["Degree",0.0174532925199433]],
PARAMETER["XY_Plane_Rotation",36,
ANGLEUNIT["Degree",0.0174532925199433]]],
CS[Cartesian,2],
AXIS["(E)",east,
ORDER[1],
LENGTHUNIT["metre",1]],
AXIS["(N)",north,
ORDER[2],
LENGTHUNIT["metre",1]],
USAGE[
SCOPE["Not known."],
AREA["World."],
BBOX[-90,-180,90,180]],
ID["ESRI",102299]]'
Berghaus_Star = world %>%
st_transform(., crs = proj)
tm_shape(Berghaus_Star)+
tm_borders()
#> Error: The shape Berghaus_Star only contains empty units.
Created on 2022-10-12 with reprex v2.0.2
Metadata
Metadata
Assignees
Labels
No labels