RE: https://rstats.me/@mdsumner/116342704610395368

If someone (@NASA ?) can provide us with a PROJ recognized CRS definition + affine transformation for https://www.nasa.gov/wp-content/uploads/2026/04/art002e000192.jpg , the next version of GDAL will automatically attach it to the image

@gdal After frankly putting in way too much time to solve this problem I have come up with the following:

Custom CRS:
+proj=tpers +lat_0=-1.6359082148 +lon_0=-17.4323556611 +h=10290019.124 +tilt=-4.15 +azi=121.5 +ellps=WGS84 +datum=WGS84 +units=m +no_defs

World file coefficients:
2696.573432377803783
-1200.914091298234780
-1217.796090473256299
-2692.426978579904244
-5220974.110484968870878
7596838.538583464920521

#Artemis

@gdal I converted the Ephemeris file published by NASA (https://www.nasa.gov/missions/artemis/artemis-2/track-nasas-artemis-ii-mission-in-real-time/) to a Spice kernel, then used Spice to calculate the sub-observer point and distance to make an initial nsper projection. I then used QGIS to georeference the image to the NASA BlackMarble night light image (https://science.nasa.gov/earth/earth-observatory/earth-at-night/maps/).

Unfortunately, an affine transform couldn't fit this perfectly, since the image is not exactly pointed to nadir and needs perspective correction.

Track NASA’s Artemis II Mission in Real Time - NASA

As NASA invites the public to follow the Artemis II mission as a crew of four astronauts venture around the Moon inside the agency’s Orion spacecraft, people

NASA

@gdal This required switching to the tilted perspective projection which needs tilt and azimuth values that can't directly be calculated.

At this point I gave in to the LLM temptation and had Codex write me a custom optimization routine to fit the affine transform, tilt value and even optimize the capture time since the EXIF time is often slightly off.

@gdal The resulting transformation has an RMS error of ~1.7px which might be limited by the precision of my GCPs and the fact that +tpers ignores the oblateness and just uses a spherical Earth.

Below two comparisons between the datasets:

@stim3on Thanks so much for your work on this. So great to have as tallented members in our community. As promised, https://github.com/OSGeo/gdal/pull/14296
JPEG: automatically set georeferencing for Hello world picture taken by Reid Wiseman from Artemis II by rouault · Pull Request #14296 · OSGeo/gdal

Huge thanks to Simeon Schmauß (@sschmaus) for the hard work into deriving the CRS and the (approximate) geotransformation matrix! Details at https://mastodon.social/@[email protected]/116353749...

GitHub