Assuming PROJ 6.3.1 and GDAL 3.0.4:
There is registered in the PROJ database the ESRI:104905
aerographic CRS:
C:\>projinfo ESRI:104905
PROJ.4 string:
+proj=longlat +a=3396190 +rf=169.894447223612 +no_defs +type=crs
WKT2:2019 string:
GEOGCRS["GCS_Mars_2000",
DATUM["D_Mars_2000",
ELLIPSOID["Mars_2000_IAU_IAG",3396190,169.894447223612,
LENGTHUNIT["metre",1]]],
PRIMEM["Reference_Meridian",0,
ANGLEUNIT["degree",0.0174532925199433]],
CS[ellipsoidal,2],
AXIS["geodetic latitude (Lat)",north,
ORDER[1],
ANGLEUNIT["degree",0.0174532925199433]],
AXIS["geodetic longitude (Lon)",east,
ORDER[2],
ANGLEUNIT["degree",0.0174532925199433]],
USAGE[
SCOPE["unknown"],
AREA["World"],
BBOX[-90,-180,90,180]],
ID["ESRI",104905]]
To define the Cartesian 'ocentric coordinate system, we can use the +proj=geocent
parameter:
C:\>projinfo "+proj=geocent +a=3396190 +rf=169.894447223612 +no_defs +type=crs"
PROJ.4 string:
+proj=geocent +a=3396190 +rf=169.894447223612 +units=m +no_defs +type=crs
WKT2:2019 string:
GEODCRS["unknown",
DATUM["unknown",
ELLIPSOID["unknown",3396190,169.894447223612,
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]],
PRIMEM["Reference meridian",0,
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]],
CS[Cartesian,3],
AXIS["(X)",geocentricX,
ORDER[1],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["(Y)",geocentricY,
ORDER[2],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]],
AXIS["(Z)",geocentricZ,
ORDER[3],
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]]
About the Universal Polar Stereographic projection, for the South Pole, we can use the +proj=ups +south
parameters:
C:\>projinfo "+proj=ups +south +a=3396190 +rf=169.894447223612 +no_defs +type=crs"
PROJ.4 string:
+proj=ups +south +a=3396190 +rf=169.894447223612 +no_defs +type=crs
WKT2:2019 string:
PROJCRS["unknown",
BASEGEOGCRS["unknown",
DATUM["unknown",
ELLIPSOID["unknown",3396190,169.894447223612,
LENGTHUNIT["metre",1,
ID["EPSG",9001]]]],
PRIMEM["Reference meridian",0,
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]]],
CONVERSION["unknown",
METHOD["PROJ ups south"],
PARAMETER["rf",169.894447223612,
ANGLEUNIT["degree",0.0174532925199433,
ID["EPSG",9122]]]],
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]]]]
About the projection from 'ocentric coordinates, it can be performed as a transformation (with a pipeline), but I don't know if we can define the CRS from PROJ.
To transform from 'ographic to 'ocentric coordinates, we need to define a pipeline:
+proj=pipeline +step +proj=longlat +a=3396190 +rf=169.894447223612 +step +proj=geoc +a=3396190 +rf=169.894447223612
For instance, the 45 degrees latitude:
C:\>cct +proj=pipeline +step +proj=longlat +a=3396190 +rf=169.894447223612 +step +proj=geoc +a=3396190 +rf=169.894447223612
0 45 0
0.0000000000 44.6617680466 0.0000 inf
Take into account that 'ographic and 'ocentric coordinate systems may have the latitude as first axis order, so we need to swap the axes:
C:\>cct +proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=latlong +a=3396190 +rf=169.894447223612 +step +proj=geoc +a=3396190 +rf=169.894447223612 +step +proj=axisswap +order=2,1
45 0 0
44.6617680466 0.0000000000 0.0000 inf
We can use the pipeline to transform a raster file with the gdalwarp
utility and the -ct
parameter. The command could be:
gdalwarp -ct "+proj=pipeline +step +proj=axisswap +order=2,1 +step +proj=latlong +a=3396190 +rf=169.894447223612 +step +proj=geoc +a=3396190 +rf=169.894447223612 +step +proj=axisswap +order=2,1" input.tif output.tif
Lastly, to project a raster file defined in 'ocentric coordinates to a Universal South Pole Stereographic CRS, we need to go through a 'ographic one:
gdalwarp -ct "+proj=pipeline +step +proj=axisswap +order=2,1 +proj=geoc +inv +a=3396190 +rf=169.894447223612 +step +proj=ups +south +a=3396190 +rf=169.894447223612" input.tif output.tif