Exemple #1
0
OGRDataSource *OGRGPXDriver::CreateDataSource( const char * pszName,
                                               char **papszOptions )

{
    OGRGPXDataSource   *poDS = new OGRGPXDataSource();

    if( !poDS->Create( pszName, papszOptions ) )
    {
        delete poDS;
        poDS = NULL;
    }

    return poDS;
}
Exemple #2
0
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;
}
Exemple #3
0
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;
}
Exemple #4
0
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;
}
Exemple #5
0
static void XMLCALL dataHandlerValidateCbk(void *pUserData, const char *data, int nLen)
{
    OGRGPXDataSource* poDS = (OGRGPXDataSource*) pUserData;
    poDS->dataHandlerValidateCbk(data, nLen);
}
Exemple #6
0
static void XMLCALL startElementValidateCbk(void *pUserData, const char *pszName, const char **ppszAttr)
{
    OGRGPXDataSource* poDS = (OGRGPXDataSource*) pUserData;
    poDS->startElementValidateCbk(pszName, ppszAttr);
}