[gdal-dev] PGeo TestCapability always returns FALSE

Todd.Southen at bentley.com Todd.Southen at bentley.com
Wed Oct 8 12:45:25 EDT 2008

Hi all,

In my application, I'm calling layer->TestCapability(OLCRandomRead)
before calling layer->GetFeature(fid).  When I try this with a PGeo
datasource, TestCapability always returns FALSE.  

Looking at the OGRPGeoLayer code this indeed seems to be the case:

    int OGRPGeoLayer::TestCapability( const char * pszCap )
        if( EQUAL(pszCap,OLCRandomRead) )
            return FALSE;

        else if( EQUAL(pszCap,OLCFastFeatureCount) )
            return FALSE;

        else if( EQUAL(pszCap,OLCFastSpatialFilter) )
            return FALSE;

        else if( EQUAL(pszCap,OLCTransactions) )
            return FALSE;

            return FALSE;

Is this a bug?

Should I be calling TestCapability before calling GetFeature?
GetFeature seems to work for the PGeo datasource even though
TestCapability is returning FALSE.


More information about the gdal-dev mailing list