[gdal-dev] Projection description class

Ben Discoe ben at v...
Fri Jul 13 06:06:24 EDT 2001


> -----Original Message-----
> From: Frank Warmerdam
>
> I would encourage you to use OGRSpatialReference
> directly, as it is intended to superceed the GDALProjDef.

OK. I will migrate my whole code base to using OGRSpatialReference. This
may generate some questions! :)

1. Is there a good reason why there is no OGRSpatialReference::GetDatum()?
I suppose datum could be parsed out of the text returned by one of the
"exportTo" methods.

2. The datum can be set as one of the arguments to SetGeogCS(), but how
would i set the datum if specifying some other projection, such as UTM?

3. Must the projection be fully initialized before it can be queried? I
tried the following:
OGRSpatialReference test;
int zone = test.GetUTMZone();
which results not in an error message, but a crash.

> Note that OGRSpatialReference and company are not easily separated from
> GDAL. Are you prepared to build in an absolute dependence on GDAL in your
> application? If so, It think the OGRSpatialReference and company will
> serve you well.

Yes; i currently have a dependence on a number of smaller, older libraries
which GDAL/OGR will replace, so i am comfortable with the dependency.

Thanks,
Ben





More information about the Gdal-dev mailing list