still an issue Re: *cs out EPSG:3042 and *declination auto - weird interaction

Olly Betts olly at survex.com
Thu Oct 19 21:06:11 BST 2023


On Thu, Oct 19, 2023 at 10:05:11AM +0100, Warren Family wrote:
> The log message is
> test_epsg3042.svx:3: info: Declination: -3.5° @ 2005-12-15, grid
> convergence: -90.8°
> and measured in aven the 1->2 leg is pointing almost due east (bearing
> 87.3°)
> 
> If I run the same but with *cs out UTM30N then the declination is the same
> but the grid convergence is reported as 0.8° (positive) and leg is almost
> due north (bearing 355.7°).  I checked that changing the *date doesn't seem
> to affect the problem.

I haven't had a chance to poke with older PROJ yet, but a thought struck
me that given we seem to be 90 degrees out this is probably related to
PROJ changing the default output order of coordinates for some
coordinate system (i.e.  whether you get (long, lat, alt) or (lat, long,
alt).  We have code to switch to explicitly select a consistent order
after every call to proj_create_crs_to_crs() except for the one in the
convergence code.

That would explain why it only affects some output coordinate systems -
it's ones where the output order is different.

So I suspected PROJ itself added a workaround for this after 8.2.1 but
in/before 9.3.0, and a quick poke at the code found this in the 9.3.0
release notes:

|  o proj_factors(): make it work with projected CRS with non-metre unit and/or
|  northing/easting axis order (#3826)

That patch is https://github.com/OSGeo/PROJ/pull/3826

I suspect just adding the code to select a consistent axis order will
solve this.  If not we may be able to copy code from that patch.

Cheers,
     Olly



More information about the Survex mailing list