Changeset 790 for trunk/zoo-project/zoo-services/ogr/ogr2ogr
- Timestamp:
- Dec 19, 2016, 6:01:06 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-services/ogr/ogr2ogr/service.c
r766 r790 591 591 /* -------------------------------------------------------------------- */ 592 592 #if GDAL_VERSION_MAJOR >= 2 593 GDALDataset *poDS; 593 GDALDataset *poDS 594 = (GDALDataset*) GDALOpenEx( pszDataSource, 595 GDAL_OF_READONLY | GDAL_OF_VECTOR, 596 NULL, NULL, NULL ); 594 597 GDALDataset *poODS; 595 598 GDALDriverManager* poR=GetGDALDriverManager(); 596 599 GDALDriver *poDriver = NULL; 597 600 #else 598 OGRDataSource* poDS; 601 OGRDataSource* poDS 602 = OGRSFDriverRegistrar::Open( pszDataSource, FALSE ); 599 603 OGRDataSource *poODS; 600 604 OGRSFDriverRegistrar *poR = OGRSFDriverRegistrar::GetRegistrar(); … … 737 741 if( poODS == NULL ) 738 742 { 743 poODS = 744 #if GDAL_VERSION_MAJOR >= 2 745 (GDALDataset*) GDALOpenEx( pszDestDataSource, 746 GDAL_OF_UPDATE | GDAL_OF_VECTOR, 747 NULL, NULL, NULL ) 748 #else 749 OGRSFDriverRegistrar::Open( pszDestDataSource, TRUE ) 750 #endif 751 ; 752 if( poODS == NULL ) 753 { 754 fprintf( stderr, "FAILURE:\n" 755 "Unable to open existing output datasource `%s'.\n", 756 pszDestDataSource ); 757 #ifdef ZOO_SERVICE 758 char tmp[1024]; 759 sprintf(tmp,"Unable to open existing output datasource `%s'.",pszDestDataSource); 760 setMapInMaps(conf,"lenv","message",tmp); 761 return SERVICE_FAILED; 762 #else 763 exit( 1 ); 764 #endif 765 739 766 fprintf( stderr, "%s driver failed to create %s\n", 740 767 pszFormat, pszDestDataSource ); 741 #ifdef ZOO_SERVICE 742 char tmp[1024]; 743 sprintf(tmp,"%s driver failed to create %s",pszFormat, pszDestDataSource); 744 setMapInMaps(conf,"lenv","message",tmp); 745 return SERVICE_FAILED; 746 #else 747 exit( 1 ); 748 #endif 768 } 749 769 } 750 770 }
Note: See TracChangeset
for help on using the changeset viewer.