OGRDataSource *OGRGMLDriver::CreateDataSource( const char * pszName,
        char **papszOptions )

{
    OGRGMLDataSource    *poDS = new OGRGMLDataSource();

    if( !poDS->Create( pszName, papszOptions ) )
    {
        delete poDS;
        return NULL;
    }
    else
        return poDS;
}
Beispiel #2
0
static GDALDataset *OGRGMLDriverCreate( const char * pszName,
                                        CPL_UNUSED int nBands,
                                        CPL_UNUSED int nXSize,
                                        CPL_UNUSED int nYSize,
                                        CPL_UNUSED GDALDataType eDT,
                                        char **papszOptions )
{
    OGRGMLDataSource    *poDS = new OGRGMLDataSource();

    if( !poDS->Create( pszName, papszOptions ) )
    {
        delete poDS;
        return NULL;
    }
    else
        return poDS;
}
OGRDataSource *OGRGMLDriver::Open( const char * pszFilename,
                                   int bUpdate )

{
    OGRGMLDataSource    *poDS;

    if( bUpdate )
        return NULL;

    poDS = new OGRGMLDataSource();

    if( !poDS->Open( pszFilename ) )
    {
        delete poDS;
        return NULL;
    }
    else
        return poDS;
}
Beispiel #4
0
static GDALDataset *OGRGMLDriverOpen( GDALOpenInfo* poOpenInfo )

{
    OGRGMLDataSource    *poDS;

    if( poOpenInfo->eAccess == GA_Update )
        return NULL;

    if( OGRGMLDriverIdentify( poOpenInfo ) == FALSE )
        return NULL;

    poDS = new OGRGMLDataSource();

    if( !poDS->Open(  poOpenInfo ) )
    {
        delete poDS;
        return NULL;
    }
    else
        return poDS;
}