[Gdal-dev] Small issue with SetUTM()

VTP ben at vterrain.org
Tue Apr 1 02:14:20 EST 2003


In the file: ogrspatialreference.cpp
In the method: OGRSpatialReference::SetUTM()

It sets the descriptive name string ("PROJCS") if it was previously set to
"unnamed".  But, it is valid (and common) to call SetUTM() on a project
which is already UTM, e.g. to change the zone from 4 to 5.  In this case,
the name is not updated (e.g. name remains "zone 4", even though the
projection is correctly set to zone 5.)

I think a simple solution would be to not do the test:
    if( EQUAL(GetAttrValue("PROJCS"),"unnamed") )
I can't think of a case where you wouldn't the name string set.

-Ben




More information about the Gdal-dev mailing list