예제 #1
0
OGRDataSource *OGRDGNDriver::Open( const char * pszFilename, int bUpdate )

{
    OGRDGNDataSource    *poDS;

    poDS = new OGRDGNDataSource();

    if( !poDS->Open( pszFilename, TRUE, bUpdate )
        || poDS->GetLayerCount() == 0 )
    {
        delete poDS;
        return NULL;
    }
    else
        return poDS;
}
예제 #2
0
static GDALDataset *OGRDGNDriverOpen( GDALOpenInfo* poOpenInfo )

{
    if( !OGRDGNDriverIdentify(poOpenInfo) )
        return NULL;

    OGRDGNDataSource *poDS = new OGRDGNDataSource();

    if( !poDS->Open( poOpenInfo->pszFilename, TRUE,
                     (poOpenInfo->eAccess == GA_Update) )
        || poDS->GetLayerCount() == 0 )
    {
        delete poDS;
        return NULL;
    }

    return poDS;
}