grass icon indicating copy to clipboard operation
grass copied to clipboard

[Feat] change "epsg" parameter name for a more generic support to projection codes and IDs

Open afrigeri opened this issue 2 years ago • 2 comments

Starting from proj v8.2, we can use the International Astronomical Union definition (IAU) for planetary bodies for pointing a GCS or CRS/SRS for a planetary body. For example projinfo IAU:49900 now reports the correct shape for the Martian ellipsoid (referred to the most up-to-date IAU definition).

from the v.import the epsg parameter should be updated to something which allow to specify the authority in the pattern 'AUTHORITY:CODE', so we can both specify EPSG:4362 for latlong GCS on Earth and IAU:49900 for GCS on Mars (*).

I see two possible fixes:

1 - introducing srsauth and changing epsg parameter to srscode

2 - changing epsg parameter to srs (or equivalent) and parse the EPSG:4326 or WHATEVER:XXXX.

(*) watch out! that Authority can issue updated versions of the definition. Every x years IAU issues a new version of the ellipse definition, and numbers can change between versions. The approach in this case would be AUTH:VERSION:CODE. gdalsrsinfo works with this pattern, and if you do not specify VERSION, it refers to the most up to date.

For more details on IAU codes see Hare and Malapert, 2021: abstract about the IAU codes proposed to be used in OGC Web Services

List of codes in a restful service: http://voparis-vespa-crs.obspm.fr:8080/web/all_ids.html which will be eventually adopted by OGC

afrigeri avatar Aug 28 '22 09:08 afrigeri

The parameter is passed to g.proj which also has epsg, so something like crs_code is needed there...or perhaps crs_definition.

wenzeslaus avatar Aug 28 '22 10:08 wenzeslaus

agree! something like

g.proj ... srscode=EPSG:4326 with some smart parsing which allows also the AUTH/VERSION/CODE scheme: g.proj ... srscode=IAU:2018:49900 which when version is omitted, it defaults to the latest version g.proj ... srscode=IAU:49900 ----> defaults to 2018 or whatever is the latest version (higher number?)

afrigeri avatar Aug 28 '22 10:08 afrigeri