[GRASS-dev] Axis-orientation in GRASS GIS

Dear devs,

One of my colleagues is working on a GRASS module for parametrized viewsheds.

In that context she asked if the Y-axis in GRASS GIS (and in amongst other raster2numpy in particular) always refers to north-south direction/coordinates, even if the CRS of the location is one of the weird CRS that label north-south-direction as X-axis? Since I could not answer that question with full confidence I am forwarding it to this list.

Is it safe to assume that Y always refers to North-South in GRASS GIS?

We are thankful for any clarification…

Cheers

Stefan

On Wed, Dec 2, 2020 at 10:43 PM Stefan Blumentrath
<Stefan.Blumentrath@nina.no> wrote:

Dear devs,

One of my colleagues is working on a GRASS module for parametrized viewsheds.

In that context she asked if the Y-axis in GRASS GIS (and in amongst other raster2numpy in particular) always refers to north-south direction/coordinates, even if the CRS of the location is one of the weird CRS that label north-south-direction as X-axis? Since I could not answer that question with full confidence I am forwarding it to this list.

Is it safe to assume that Y always refers to North-South in GRASS GIS?

Probably no:

to my knowledge at least the Krovak's Projection (used in Czech
Republic / Slovak Republic) is differently oriented:

http://crs.bkg.bund.de/crseu/crs/eu-description.php?crs_id=Y1NLX1MtSlRTSyslMkYrS1JPVkFL
"The axis X is the image of longitude 42°30' eastwards of Ferro
(24°50' E wrt Greenwich)
  with the positive branch oriented to the south.
  The axis Y is perpendicular to it and its positive branch is
oriented to the west."

Maybe others know more here.

Cheers
Markus

Thanks, Markus.

In order to investigate a bit more I created a location with EPSG:2065

grass -c EPSG:2065 /data/scratch/$USER/flip_crs

There, I looked output from
g.proj -w
To see if it gives any hints on the GRASS internal axis orientation. Output is

PROJCS["S-JTSK (Ferro) / Krovak",
    GEOGCS["S-JTSK (Ferro)",
    (...)
    PARAMETER["false_easting",0],
    PARAMETER["false_northing",0],
    (...)
    AXIS["Southing",SOUTH],
    AXIS["Westing",WEST],

In comparison, WKT on https://epsg.io/2065 says:
    AXIS["X",SOUTH],
    AXIS["Y",WEST],

Shellscript output gives me additionally this line:
axis=swu

And when I measure distance, along the Y-axis, bearing is reported as 0 degree clockwise from grid-north, and along the X-axis it is 90 degree clockwise from grid-north...

I have to admit that I am still not sure about axis orientation (and how to evtl. test for that if it has impacts computations)...

Cheers
Stefan

-----Original Message-----
From: Markus Neteler <neteler@osgeo.org>
Sent: onsdag 2. desember 2020 23:07
To: Stefan Blumentrath <Stefan.Blumentrath@nina.no>
Cc: GRASS developers list <grass-dev@lists.osgeo.org>
Subject: Re: [GRASS-dev] Axis-orientation in GRASS GIS

On Wed, Dec 2, 2020 at 10:43 PM Stefan Blumentrath <Stefan.Blumentrath@nina.no> wrote:

Dear devs,

One of my colleagues is working on a GRASS module for parametrized viewsheds.

In that context she asked if the Y-axis in GRASS GIS (and in amongst other raster2numpy in particular) always refers to north-south direction/coordinates, even if the CRS of the location is one of the weird CRS that label north-south-direction as X-axis? Since I could not answer that question with full confidence I am forwarding it to this list.

Is it safe to assume that Y always refers to North-South in GRASS GIS?

Probably no:

to my knowledge at least the Krovak's Projection (used in Czech Republic / Slovak Republic) is differently oriented:

https://eur01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcrs.bkg.bund.de%2Fcrseu%2Fcrs%2Feu-description.php%3Fcrs_id%3DY1NLX1MtSlRTSyslMkYrS1JPVkFL&amp;data=04|01||59c1848587bb42fe608508d8970e9bb3|6cef373021314901831055b3abf02c73|0|0|637425436293147847|Unknown|TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D|1000&amp;sdata=WwnQTNR95IUN22iOVo6E2gQMwvJ6wCjYcQ4seMu1zi0%3D&amp;reserved=0
"The axis X is the image of longitude 42°30' eastwards of Ferro (24°50' E wrt Greenwich)
  with the positive branch oriented to the south.
  The axis Y is perpendicular to it and its positive branch is oriented to the west."

Maybe others know more here.

Cheers
Markus