[gdal-dev] SDTS
Ben Discoe
ben at v...
Fri Jul 13 05:32:27 EDT 2001
Great to hear that SDTS projection got fixed!
My next trouble is with using OGR to read SDTS-DLG files. (I'm using the
version of OGR compiled in that latest GDAL release).
I downloaded some SDTS-DLG files, which i can load and view correctly in the
USGS DlgV32 software. OGR seems to load and parse them "mostly correct",
but i cannot get the feature geometry.
My code looks like this:
OGRRegisterAll();
OGRDataSource *datasource = OGRSFDriverRegistrar::Open( strFileName );
OGRLayer *layer = datasource->GetLayer(0);
int feature_count = layer->GetFeatureCount();
layer->ResetReading();
OGRFeature *pFeature;
while( (pFeature = layer->GetNextFeature()) != NULL )
{
OGRGeometry *geom = pFeature->GetGeometryRef();
[....]
}
Unfortunately the return from GetGeometryRef is always NULL, although the
feature count is correct and there are no errors reported.
Is this functionality known to work in OGR?
Thanks,
Ben
More information about the Gdal-dev
mailing list