If the Berghaus Star projection isn't supported by the underlying PROJ library then this isn't going to work. Its not listed by proj -lp
for me at the command line.
Having the projection type name stored in the WKT isn't sufficient for PROJ to do the transform, and it does know about codes that it can't transform. For example at the command line to convert lat-long to ESRI Berghaus star:
$ cs2cs epsg:4326 esri:102299
0N 0E
* * inf
1N 1E
* * inf
all points are returned as * *
which is the default error string for cs2cs.
My PROJ knows the WKT definition of ESRI:102299 (projinfo esri:102299
lists the WKT out) but it can't work with it.
I don't know if the error status here can or should be trapped by sf
, or if it lets it continue because this same error in returned coordinates is used to indicate points being transformed to infinity or are invisible on the target system, such as being on the far side of an azimuthal projection.
It has been implemented in D3 [https://www.jasondavies.com/maps/berghaus-star/] so the formulae and code in JS must be out there as open source if you want to implement it in R for your particular purpose!
crs
ofst_transform()
. Good news is, no error or even warning is prompted and the CRS of the created sf object seems to be recognized as "Berghaus_Star_AAG" after callingst_transform()
but all geometries are empty as a result - so I'm not sure if this is a bug or working as expected.