1

I am looking to recreate the map on the American Association of Geographers logo using R:

enter image description here

However, I cannot find a proj4string or an epsg code for the Berghaus Star map projection. There is an ESRI site that notes the Berghaus Star projection has an ESRI epsg of 102299, but st_transform(df,crs=102299) does not work.

Is there a non-ESRI epsg code for this projection, or is there a way to use st_transform() to project with ESRI epsg codes?

5
  • 1
    Having found a relevant question in PROJ FAQ, I thought it would be a smart move to copy the WKT2 representation of the CRS from e.g. here and use it as string input for crs of st_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 calling st_transform() but all geometries are empty as a result - so I'm not sure if this is a bug or working as expected.
    – dimfalk
    Commented Oct 12, 2022 at 10:04
  • @falk-env Do you think it's worth a new SE post or perhaps opening a new issue in sf? Commented Oct 12, 2022 at 15:12
  • Not sure either, but since I seem to have followed the instructions cited and a (corrupt) result is produced without errors, I'd at least expect a message that something did not work as intended and the result is to be used with caution. Just make sure you're able to reproduce this behaviour described. But maybe it's also possible to fix this in terms of content. Personally, I would give it a shot at r-spatial/sf and see what happens. If it is not recognized, we'll at least learn something new.
    – dimfalk
    Commented Oct 12, 2022 at 16:01
  • 1
    @falk-env done: github.com/r-spatial/sf/issues/2014 Commented Oct 12, 2022 at 16:09
  • the authority of 102299 is not epsg but esri, the right input string is "ESRI:102299", st_crs assumes numeric input is "EPSG:<code>" - just to add a tiny bit to Spacedman's answer
    – mdsumner
    Commented Oct 12, 2022 at 23:28

1 Answer 1

1

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.