PROJ icon indicating copy to clipboard operation
PROJ copied to clipboard

Berghaus Star projection (EPSG = ESRI:102299) does not work

Open coconn41 opened this issue 2 years ago • 2 comments

When using sf in R to project to the Berghaus Star projection (EPSG = ESRI 102299,) all shapes become empty. Specifically, PROJ does not generate a forward projection pipeline. See the reprex below:

>library(sf)
>library(spData)
>library(tmap)
>data('world')

>world_transformed=st_transform(world,crs='ESRI:102299')

>tm_shape(world_transformed)+tm_borders()
#> Error: The shape world_transformed only contains empty units.

>system("projinfo ESRI:102299 -o PROJ")
PROJ.4 string:
Error when exporting to PROJ string: Unsupported conversion method: Berghaus_Star

>sf_proj_pipelines(st_crs(world), "ESRI:102299")$definition
[1] "+"

>system("projinfo -s EPSG:4326 -t ESRI:102299 -o PROJ")
Candidate operations found: 1
-------------------------------------
Operation No. 1:

unknown id, axis order change (2D) + Berghaus_Star_AAG, 0 m, World

PROJ string:
Error when exporting to PROJ string: Unsupported conversion method: Berghaus_Star

Problem description

R recognizes the Berghaus Star projection information, but there is an error when trying to convert the spatial data to this projection.

Expected Output

The expected output following the tm_shape(world_transformed)+tm_borders() call is a map of all world countries, with the Berghaus Star projection, similar to this:

image

Environment Information

  • PROJ version 6.3.2
  • Operation System Information: MacOS Monterey Version 12.5.1

Installation method

  • homebrew

coconn41 avatar Oct 13 '22 14:10 coconn41

The error message is quite clear: "Error when exporting to PROJ string: Unsupported conversion method: Berghaus_Star", i.e. the projection in question is not implemented in PROJ. Pull requests are welcome.

It can be argued that we shouldn't include it in the database if we can't use it.

kbevers avatar Oct 13 '22 17:10 kbevers

d3js (MIT licensed) implementation in https://github.com/d3/d3-geo-projection/blob/main/src/berghaus.js .

rouault avatar Oct 13 '22 17:10 rouault