I have height map data from here LR LOLA DEM from the Moon which seems to be "simple spherical" and I want to convert them to latitude and longitude with this: (It's a bit pseudo code)
from affine import Affine
import rasterio
from pyproj import Proj, transform, Transformer, CRS
infile = rasterio.open(GEOTIFF)
p = (0, 0) # pixel position
srcProj = Proj(infile.crs)
destProj = ??? # what goes here?
transformer = Transformer.from_crs(srcProj, destProj)
p = p * infile.transform
lo, la = transformer.transform(p[0], p[1])
What destination projection should I use? I tried different ones, but got various exceptions (for example: src and dest are not the same celestial body
, etc.)
Addendum: Python describes the infield.crs
with the following, maybe that helps:
PROJCS["SimpleCylindrical Moon",
GEOGCS["GCS_Moon",DATUM["D_Moon",SPHEROID["Moon",1737400,0]],
PRIMEM["Reference_Meridian",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Equirectangular"],
PARAMETER["latitude_of_origin",0],
PARAMETER["central_meridian",0],
PARAMETER["standard_parallel_1",0],
PARAMETER["false_easting",0],
PARAMETER["false_northing",0],
UNIT["metre",1,
AUTHORITY["EPSG","9001"]]]