OGRDataSource *OGRGPXDriver::CreateDataSource( const char * pszName, char **papszOptions ) { OGRGPXDataSource *poDS = new OGRGPXDataSource(); if( !poDS->Create( pszName, papszOptions ) ) { delete poDS; poDS = NULL; } return poDS; }
static GDALDataset *OGRGPXDriverCreate( const char * pszName, CPL_UNUSED int nBands, CPL_UNUSED int nXSize, CPL_UNUSED int nYSize, CPL_UNUSED GDALDataType eDT, CPL_UNUSED char **papszOptions ) { OGRGPXDataSource *poDS = new OGRGPXDataSource(); if( !poDS->Create( pszName, papszOptions ) ) { delete poDS; poDS = NULL; } return poDS; }
OGRDataSource *OGRGPXDriver::Open( const char * pszFilename, int bUpdate ) { if (bUpdate) { return NULL; } OGRGPXDataSource *poDS = new OGRGPXDataSource(); if( !poDS->Open( pszFilename, bUpdate ) ) { delete poDS; poDS = NULL; } return poDS; }
static GDALDataset *OGRGPXDriverOpen( GDALOpenInfo* poOpenInfo ) { if( poOpenInfo->eAccess == GA_Update || poOpenInfo->fpL == NULL ) return NULL; if( strstr((const char*)poOpenInfo->pabyHeader, "<gpx") == NULL ) return NULL; OGRGPXDataSource *poDS = new OGRGPXDataSource(); if( !poDS->Open( poOpenInfo->pszFilename, FALSE ) ) { delete poDS; poDS = NULL; } return poDS; }
static void XMLCALL dataHandlerValidateCbk(void *pUserData, const char *data, int nLen) { OGRGPXDataSource* poDS = (OGRGPXDataSource*) pUserData; poDS->dataHandlerValidateCbk(data, nLen); }
static void XMLCALL startElementValidateCbk(void *pUserData, const char *pszName, const char **ppszAttr) { OGRGPXDataSource* poDS = (OGRGPXDataSource*) pUserData; poDS->startElementValidateCbk(pszName, ppszAttr); }