Ignore:
Timestamp:
Jun 29, 2016, 3:40:46 PM (8 years ago)
Author:
djay
Message:

Give the capability to store the main.cfg file in sysconfdir and the services in servicePath if defined in the [main] section.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/sqlapi.c

    r734 r784  
    2727#include "ogrsf_frmts.h"
    2828#include "ogr_p.h"
     29#if GDAL_VERSION_MAJOR >= 2
     30#include <gdal_priv.h>
     31#endif
    2932
    3033#include "sqlapi.h"
     
    3538 * Global GDALDataset pointer
    3639 */
    37 OGRDataSource *zoo_DS = NULL;
     40#if GDAL_VERSION_MAJOR >=2
     41GDALDataset
     42#else
     43OGRDataSource
     44#endif
     45 *zoo_DS = NULL;
    3846
    3947/**
     
    98106  OGRSFDriver *poDriver = NULL;
    99107  OGRRegisterAll();
     108
     109#if GDAL_VERSION_MAJOR >= 2
     110  zoo_DS = (GDALDataset*) GDALOpenEx( sqlInitString,
     111                                      GDAL_OF_UPDATE | GDAL_OF_VECTOR,
     112                                      NULL, NULL, NULL );
     113#else
    100114  zoo_DS = OGRSFDriverRegistrar::Open(sqlInitString,false,&poDriver);
     115#endif
    101116  if( zoo_DS == NULL ){
    102117#ifdef DEBUG
     
    124139    zoo_DS->ReleaseResultSet( zoo_ResultSet );
    125140  if(zoo_DS!=NULL){
     141#if GDAL_VERSION_MAJOR >= 2
     142    GDALClose(zoo_DS);
     143#else
    126144    OGRDataSource::DestroyDataSource( zoo_DS );
     145#endif
    127146    zoo_DS=NULL;
    128147  }
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png