[PROJ] Understanding dropped parameters for stere and latlong

David Hoese dhoese at gmail.com
Sun Apr 12 11:30:07 PDT 2020


I recently started converting a Python project from using PROJ 
parameters (strings and dicts) to WKT by using pyproj's CRS object's 
"to_wkt" method. I ran in to a couple surprises with some of my 
project's unit tests and asked the pyproj folks about it here:

https://github.com/pyproj4/pyproj/issues/592

It seems like most of the confusion is from a misunderstanding of the 
`stere` and `latlong` projections in PROJ and how they translate to WKT. 
I was hoping someone could help me understand some of these cases. First:


crs = CRS("+proj=stere +a=6378144.0 +b=6356759.0 +lat_0=50.00 
+lat_ts=35.00 +lon_0=8.00")

crs.to_wkt()
# Outputs: 
'PROJCRS["unknown",BASEGEOGCRS["unknown",DATUM["unknown",ELLIPSOID["unknown",6378144,298.253168108487,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]]],CONVERSION["unknown",METHOD["Stereographic"],PARAMETER["Latitude 
of natural 
origin",50,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8801]],PARAMETER["Longitude 
of natural 
origin",8,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8802]],PARAMETER["Scale 
factor at natural 
origin",1,SCALEUNIT["unity",1],ID["EPSG",8805]],PARAMETER["False 
easting",0,LENGTHUNIT["metre",1],ID["EPSG",8806]],PARAMETER["False 
northing",0,LENGTHUNIT["metre",1],ID["EPSG",8807]]],CS[Cartesian,2],AXIS["(E)",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["(N)",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]'

I noticed that the `lat_ts` parameter gets dropped for any case where 
`lat_0` isn't -90 or 90. Is this expected? Like I said, this case was in 
a unit test in our project for a long time so I assume it must have been 
valid at some point. This behavior with lat_ts isn't mentioned in the 
projection description here 
(https://proj.org/operations/projections/stere.html). So I'm wondering 
if this is a new-ish more strict specification of it. Where could I go 
to find out more?

Second case:

Is it no longer valid (or maybe it never was) to specify a "lon_0" for a 
lat/lon projection:

crs = CRS("+proj=latlong +lon_0=45")

crs.to_wkt()
# Outputs:
'GEOGCRS["unknown",DATUM["World Geodetic System 1984",ELLIPSOID["WGS 
84",6378137,298.257223563,LENGTHUNIT["metre",1]],ID["EPSG",6326]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433],ID["EPSG",8901]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433,ID["EPSG",9122]]]]'

Any help is much appreciated. Thanks.

Dave


More information about the PROJ mailing list