David, In addition to Etienne's suggestion of exportToWkt() and check for emptiness, you might also consider calling Validate() which will return FALSE if it believes the coordinate system is invalid, which would include empty coordinate systems. The main downside to this is that some useful coordinate systems may be identified as invalid because they don't fit a standard pattern.
Best regards, Frank On Tue, Jul 23, 2013 at 8:59 AM, Etienne Tourigny <[email protected]>wrote: > You could try calling exportToWkt() and test if the string is null or > empty (although I haven't tested that) - make sure to free the string > afterwards. > > Etienne > > > On Mon, Jul 22, 2013 at 8:44 PM, David Strip <[email protected]> wrote: > >> Given an OGRSpatialReference class object, how do I tell if it's been >> initialized to anything? (ie,clear() was called or else was constructed >> with a null string an no further action was taken to set the SRS?) >> I've looked over the interface and can't spot anything that tells me it's >> in a clear state, but of course I might have missed it. >> >> Thanks >> David >> >> >> ______________________________**_________________ >> gdal-dev mailing list >> [email protected] >> http://lists.osgeo.org/**mailman/listinfo/gdal-dev<http://lists.osgeo.org/mailman/listinfo/gdal-dev> >> > > > _______________________________________________ > gdal-dev mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/gdal-dev > -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Software Developer
_______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
