I want to convert my coodrinates from lon, lat to x, y of orthographic projection. I tried to use PyProj to do it, but it uses sphere, not ellipsoid. Here it is:

lonlat_proj = pyproj.Proj(proj="longlat", ellps="WGS84")
lat = 90
lon = 0
alt = 0

ecef_proj = pyproj.Proj(proj="geocent", ellps="WGS84")
ortho_proj = pyproj.Proj(proj="ortho", lat_0=0, lon_0=0, ellps="WGS84")

x, y, z = pyproj.transform(lonlat_proj, ecef_proj, lon, lat, alt)
print(x, y, z)
# Gives: 3.918e-10 (okay), 0.0, 6356752.314 (okay, it's earth semiminor)

x_ortho, y_ortho = pyproj.transform(lonlat_proj, ortho_proj, lon, lat)
print(x_ortho, y_ortho)
# Gives: 0.0 (okay), 6378137,0 (earth SEMIMAJOR instead of semiminor)
# WHY?!!

How can I cope with it?

1 Answer 1


The orthographic projection is a sphere-only projection. The standard orthographic algorithm does not support ellipsoids. If an ellipsoid is given, many implementers will use the semimajor axis of the ellipsoid as the radius of the sphere.

I have seen some software packages which will calculate a particular sphere type. For instance, if the projection is equal area, also known as authalic, the software will calculate the authalic radius and use that. Orthographic doesn't have a property like that, so there's no obvious type of sphere to use in place of the ellipsoid.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.