This is probably another representation of #3450, as this shows:
$ OVERRIDE_PROJ_DATUM_WITH_TOWGS84=NO gdalinfo -proj4 img1.tif
...
PROJCS["unnamed",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
...
PROJ.4 string is:
'+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs '
but it isn't obvious why the user/calling program should have to intervene in this case. Even when the file is written with:
+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs
we still see:
$ gdalinfo -proj4 img1a.tif
...
PROJCS["unnamed",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
...
PROJ.4 string is:
'+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs '
that is a conversion to +ellps +towgs84 even though neither were in the input.
$ OVERRIDE_PROJ_DATUM_WITH_TOWGS84=NO gdalinfo -proj4 img1a.tif
...
PROJCS["unnamed",
GEOGCS["NAD83",
DATUM["North_American_Datum_1983",
SPHEROID["GRS 1980",6378137,298.2572221010002,
...
PROJ.4 string is:
'+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD83 +units=m +no_defs '
Is the conclusion that calling programs must first find "NAD83" in the input WKT, if it is there set the environment variable, export to Proj4, then remove the environment variable?