Changes between Initial Version and Version 1 of Ticket #4880


Ignore:
Timestamp:
Nov 3, 2012, 3:26:27 AM (11 years ago)
Author:
rsbivand
Comment:

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?

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #4880 – Description

    initial v1  
    33+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 +ellps=GRS80 +towgs84=0,0,0
    44
     5
     6{{{
    57$ gdalinfo img1.tif
    68...
     
    1315'+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 '
    1416
     17}}}
     18
    1519
    1620For two other cases, NAD27 and WGS84:
     
    1822+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs
    1923
     24
     25{{{
    2026$ gdalinfo -proj4 img2.tif
    2127...
     
    2733PROJ.4 string is:
    2834'+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=NAD27 +units=m +no_defs '
     35}}}
     36
    2937
    3038
     
    3341+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs
    3442
     43
     44{{{
    3545$ gdalinfo -proj4 img3.tif
    3646...
     
    4353'+proj=aea +lat_1=29.5 +lat_2=45.5 +lat_0=23 +lon_0=-96 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs '
    4454
     55}}}
     56
    4557
    4658There does not seem to be any reference to this in: