A small enhancement to gt_wkt_srs.cpp

Roger James rogerjames99 at b...
Wed Oct 2 08:35:59 EDT 2002


charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Frank,

I have added the following few lines to gt_wkt_srs.cpp. It seemed a shame n=
ot to take advantage of the EPSG data if it was present. It would be nice i=
f you could include them. The idea could be extended to look for a GEOGCS s=
tring in the same file if the PROJCS one failed.


/* GTIFSetFromOGISDefn() */
/* */
/* Write GeoTIFF projection tags from an OGC WKT definition. */
/************************************************************************/

int GTIFSetFromOGISDefn( GTIF * psGTIF, const char *pszOGCWKT )

{
............
/* -------------------------------------------------------------------- */
/* Handle the projection transformation. */
/* -------------------------------------------------------------------- */
const char *pszProjection =3D poSRS->GetAttrValue( "PROJECTION" );
// RFJ
// Find the EPSG projected cs code from the wkt proj cs name
if (nPCS =3D atoi(CSVGetField( CSVFilename("horiz_cs.csv"),
"HORIZCS_EPSG_NAME", poSRS->GetAttrValue(=
"PROJCS"), CC_ApproxString,
"HORIZCS_CODE")))
{
GTIFKeySet(psGTIF, ProjectedCSTypeGeoKey, TYPE_SHORT, 1, nPCS );
GTIFKeySet(psGTIF, GTModelTypeGeoKey, TYPE_SHORT, 1, ModelTypeProjected);
}
else
// RFJ
if( pszProjection =3D=3D NULL )



Roger


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20021002/4611f053/attachment.html


More information about the Gdal-dev mailing list