pyproj4 / pyproj

Python interface to PROJ (cartographic projections and coordinate transformations library)
https://pyproj4.github.io/pyproj
MIT License
1.04k stars 211 forks source link

False easting / northing not working for ob_tran projection #1312

Closed MHBalsmeier closed 12 months ago

MHBalsmeier commented 1 year ago

pyproj 3.6.0

The following code

import pyproj

proj_model = "+proj=ob_tran +o_proj=longlat +o_lon_p=0 +o_lat_p=90 +lon_0=0 +x_0=1 +y_0=1 +R=6371200"
proj_lat_lon = "epsg:4326"
trans_ll_to_ob_tran = pyproj.Transformer.from_crs(proj_lat_lon, proj_model)

print(trans_ll_to_ob_tran.transform(0, 0))

produces the output (0, 0). According to the documentation it should produce (1, 1).

snowman2 commented 1 year ago

This is what is shown by PROJ:

projinfo -s 'EPSG:4326' -t '+proj=ob_tran +o_proj=longlat +o_lon_p=0 +o_lat_p=90 +lon_0=0 +x_0=1 +y_0=1 +R=6371200 + type=crs' -o PROJ
Candidate operations found: 1
-------------------------------------
Operation No. 1:

unknown id, Ballpark geographic offset from WGS 84 to unknown + unknown, unknown accuracy, World, has ballpark transformation

PROJ string:
+proj=pipeline
  +step +proj=axisswap +order=2,1
  +step +proj=unitconvert +xy_in=deg +xy_out=rad
  +step +proj=ob_tran +o_proj=longlat +o_lon_p=0 +o_lat_p=90 +lon_0=0 +x_0=1
        +y_0=1 +R=6371200
  +step +proj=unitconvert +xy_in=rad +xy_out=deg
echo 0 0 | cs2cs EPSG:4326 +to +proj=ob_tran +o_proj=longlat +o_lon_p=0 +o_lat_p=90 +lon_0=0 +x_0=1 +y_0=1 +R=6371200
0dE 0dS 0.000

If you think the behavior is incorrect, please open an issue here: https://github.com/OSGeo/PROJ/