<div dir="ltr"><div>Hi</div><div><br></div><div>In FOSS4G I was talking with somebody about axis order mess.</div><div>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:<br></div><div><br></div><div><span></span><table cellspacing="0" cellpadding="2" border="1"><tbody><tr><th>auth_name</th><th>axis_order</th><th>counted</th></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">EPSG</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Easting - Northing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">3983</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">EPSG</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Northing - Easting</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">1537</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">EPSG</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Westing - Southing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">28</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">EPSG</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Northing - Westing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">17</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">EPSG</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Southing - Westing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">9</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">EPSG</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Westing - Northing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">2</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">ESRI</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Easting - Northing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">2048</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">ESRI</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:italic;font-weight:normal;background-color:rgb(255,255,255);color:rgb(192,192,192);text-align:left"><br></td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">174</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">IAU_2015</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Easting - Northing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">1853</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">IAU_2015</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Westing - Northing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">221</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">IGNF</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Easting - Northing</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">258</td></tr><tr><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">IGNF</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:left">Northing - Easting</td><td style="font-family:"DejaVu Sans";font-size:10pt;font-style:normal;font-weight:normal;background-color:rgb(255,255,255);color:rgb(0,0,0);text-align:right">2</td></tr></tbody></table></div><div><br></div><div>This is the query (that may be improved)<br></div><div><br></div><span style="font-family:monospace">SELECT P.auth_name, A.axis_order , count(*) AS counted<br><br>FROM<br>projected_crs P<br><br>LEFT OUTER JOIN <br>(<br>SELECT A1.coordinate_system_auth_name, A1.coordinate_system_code, (A1.name || ' - ' || A2.name) AS axis_order<br>FROM axis A1<br>INNER JOIN axis A2<br>ON A1.coordinate_system_auth_name = A2.coordinate_system_auth_name <br>AND A1.coordinate_system_code = A2.coordinate_system_code<br>AND A1.coordinate_system_order = 1<br>AND A2.coordinate_system_order = 2<br>) A<br><br>ON A.coordinate_system_auth_name = P.coordinate_system_auth_name AND P.coordinate_system_code = A.coordinate_system_code<br>GROUP by A.axis_order, P.auth_name<br>ORDER by P.auth_name, counted DESC</span><br><br><div><span style="font-family:monospace"></span></div><div>Enjoy!</div><div><br></div><div>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.<br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div></div><div>.___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__</div></div></div></div></div></div>