Ignore:
Timestamp:
Jun 14, 2016, 11:17:20 AM (8 years ago)
Author:
djay
Message:

Add GDAL 2 support to the cgal services. Updadte otb support to build against OTB 5.4.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-services/cgal/cgal_service.c

    r469 r775  
    2929  VSILFILE *ifile=VSIFileFromMemBuffer(filename,(GByte*)tmpm->value,strlen(tmpm->value),FALSE);
    3030  VSIFCloseL(ifile);
     31#if GDAL_VERSION_MAJOR >= 2
     32  GDALDataset *ipoDS =
     33    (GDALDataset*) GDALOpenEx( filename,
     34                               GDAL_OF_READONLY | GDAL_OF_VECTOR,
     35                               NULL, NULL, NULL );
     36#else
    3137  OGRDataSource* ipoDS = OGRSFDriverRegistrar::Open(filename,FALSE);
     38#endif
    3239  if( ipoDS == NULL )
    3340    {
     41#if GDAL_VERSION_MAJOR >= 2
     42      GDALDriverManager* poR=GetGDALDriverManager();
     43#else
    3444      OGRSFDriverRegistrar    *poR = OGRSFDriverRegistrar::GetRegistrar();
     45#endif
    3546     
    3647      fprintf( stderr, "FAILURE:\n"
     
    4051      for( int iDriver = 0; iDriver < poR->GetDriverCount(); iDriver++ )
    4152        {
    42           fprintf( stderr, "  -> %s\n", poR->GetDriver(iDriver)->GetName() );
     53#if GDAL_VERSION_MAJOR >= 2
     54            fprintf( stderr, "  -> %s\n", poR->GetDriver(iDriver)->GetDescription() );
     55#else
     56            fprintf( stderr, "  -> %s\n", poR->GetDriver(iDriver)->GetName() );
     57#endif
    4358        }
    4459      char tmp[1024];
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