[PROJ] Axis order

Javier Jimenez Shaw j1 at jimenezshaw.com
Tue Jul 4 00:00:02 PDT 2023


Hi

In FOSS4G I was talking with somebody about axis order mess.
Well, I have done an SQL query on proj.db to count how many systems are
using which convention. This is the counting for the projected_crs table:

auth_nameaxis_ordercounted
EPSG Easting - Northing 3983
EPSG Northing - Easting 1537
EPSG Westing - Southing 28
EPSG Northing - Westing 17
EPSG Southing - Westing 9
EPSG Westing - Northing 2
ESRI Easting - Northing 2048
ESRI
174
IAU_2015 Easting - Northing 1853
IAU_2015 Westing - Northing 221
IGNF Easting - Northing 258
IGNF Northing - Easting 2

This is the query (that may be improved)

SELECT P.auth_name, A.axis_order , count(*) AS counted

FROM
projected_crs P

LEFT OUTER JOIN
(
SELECT A1.coordinate_system_auth_name, A1.coordinate_system_code, (A1.name
|| ' - ' || A2.name) AS axis_order
FROM axis A1
INNER JOIN axis A2
ON A1.coordinate_system_auth_name = A2.coordinate_system_auth_name
AND A1.coordinate_system_code = A2.coordinate_system_code
AND A1.coordinate_system_order = 1
AND A2.coordinate_system_order = 2
) A

ON A.coordinate_system_auth_name = P.coordinate_system_auth_name AND
P.coordinate_system_code = A.coordinate_system_code
GROUP by A.axis_order, P.auth_name
ORDER by P.auth_name, counted DESC

Enjoy!

PS. There are some polar systems that have name as Easting-Northing, but
the direction is north-north or south-south. That difference is not
displayed here.

.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20230704/90a31aa3/attachment.htm>


More information about the PROJ mailing list