See discussion: http://osgeo-org.1560.x6.nabble.com/Problem-with-General-Oblique-transform-latitude-td5257089.html Implementation: https://github.com/geotools/geotools/blob/master/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/GeneralOblique.java Original feature Jira issue: GEOT-5190 General Oblique Transform for Rotated Pole Coordinates https://osgeo-org.atlassian.net/browse/GEOT-5190 While attempting use the General Oblique transform, I have encountered a discrepancy between the latitude of the origin and the projected latitude. In the test script: https://github.com/geotools/geotools/blob/master/modules/library/referencing/src/test/resources/org/geotools/referencing/test-data/scripts/GeneralOblique.txt The test General Oblique coordinate system is specified with:
The following assertion is made:
This looks wrong to me because I expected the origin of the rotated coordinate system to have the latitude specified in the parameter latitude_of_origin, that is 37.5. If I specify my own General_Oblique CRS in GeoServer with PARAMETER["central_meridian", -106] and {{PARAMETER["latitude_of_origin", 54]}} and use the reprojection console to reproject (0, 0) to WGS84, I get the (lon, lat) = (-106.0, 36.0) which is incorrect. Likewise {{(-106.0, 54.0)}} projected to this same General Oblique CRS is incorrectly projected to (0.0, 18.0) (should be (0,0)). In each case, it appears to me that the transformed latitude is 90 degrees minus the expected latitude. This is consistent with the latitude being measured from the North Pole not the equator. As this is a common mathematical convention, I think there is a problem with the implementation of the General Oblique transformation. Looking at equations 3.74 on page 25 (PDF page 31) of part one of the COSMO manual: http://www.cosmo-model.org/content/model/documentation/core/cosmoDyncsNumcs.pdf I note that (lambda_g^N, phi_g^N) is the North Pole of the rotated grid, so phi_g^N is not latitudeOfOrigin, which is measured from the equator. According to the javadoc of MapProjection, points are adjusted for central_meridian but not latitude_of_origin: https://github.com/geotools/geotools/blob/master/modules/library/referencing/src/main/java/org/geotools/referencing/operation/projection/MapProjection.java From the discussion On 18/03/16 21:01, Maciej Filocha wrote: > You're right here. Proj's "+o_lat_p" parameter (undocumented, of course) > used in my reference example, is latitude of rotated North Pole, not > latitude of the origin. > Thank you for pointing this out! |