Changeset 38 for trunk/zoo-services/ogr/ogr2ogr
- Timestamp:
- Oct 23, 2010, 4:49:28 PM (14 years ago)
- Location:
- trunk/zoo-services/ogr/ogr2ogr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-services/ogr/ogr2ogr/Makefile
r1 r38 1 GDAL_SRC=/var/tmp/portage/sci-libs/gdal-1.6.1/work/gdal-1.6.1/ogr/ 2 CFLAGS=-I$(GDAL_SRC) -I../../../zoo-kernel-svn/ -I./ `xml2-config --cflags` `python-config --cflags` -DLINUX_FREE_ISSUE #-DDEBUG 3 CC=gcc 1 GDAL_SRC=./gdal_src/ 4 2 5 cgi-env/ogr2ogr_service.zo: service.c 6 g++ -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/ogr2ogr_service.zo ./service.c -lgdal 3 include $(GDAL_SRC)GDALmake.opt 4 5 CPPFLAGS := $(GDAL_INCLUDE) -I$(GDAL_ROOT)/frmts $(CPPFLAGS) 6 DEP_LIBS = $(EXE_DEP_LIBS) $(XTRAOBJ) 7 BIN_LIST = cgi-env/ogr2ogr_service.zo 8 9 default: $(BIN_LIST) 10 11 all: default 12 13 lib-depend: 14 (cd $(GDAL_SRC)/gcore ; $(MAKE) ) 15 (cd $(GDAL_SRC)/port ; $(MAKE) ) 16 17 CFLAGS=-DZOO_SERVICE -I../../../zoo-kernel/ 18 19 #cgi-env/ogr2ogr_service.zo: service.c 20 # g++ -DZOO_SERVICE ${CFLAGS} -shared -fpic -o cgi-env/ogr2ogr_service.zo ./service.c -lgdal 21 22 cgi-env/ogr2ogr_service.zo: service.c $(DEP_LIBS) 23 g++ $(CFLAGS) $(CPPFLAGS) -shared -fpic $< `gdal-config --libs` -o $@ 7 24 8 25 clean: 9 rm -f cgi-env/* .zo26 rm -f cgi-env/*zo -
trunk/zoo-services/ogr/ogr2ogr/cgi-env/Ogr2Ogr.zcfg
r1 r38 1 1 [Ogr2Ogr] 2 Title = Convert raster data from one format to another.3 Abstract = Converts raster data between different formats.2 Title = Convert vector data from one format to another. 3 Abstract = Converts vector data between different formats. 4 4 processVersion = 1 5 5 storeSupported = true … … 7 7 serviceType = C 8 8 serviceProvider = ogr2ogr_service.zo 9 <MetaData lang="en">10 title = My Demo9 <MetaData> 10 Title = My Demo 11 11 </MetaData> 12 12 <DataInputs> … … 19 19 DataType = string 20 20 <Default> 21 value = AAIGrid21 value = ESRI ShapeFile 22 22 </Default> 23 23 <Supported> 24 value = AAIGrid25 24 </Supported> 26 25 </LiteralData> … … 33 32 DataType = string 34 33 <Default> 35 uom = feet36 34 </Default> 37 35 <Supported> 38 value = AAIGrid39 36 </Supported> 40 37 </LiteralData> 41 38 [OutputDSN] 42 39 Title = The output data source name 43 Abstract = The output data source name to use as source for convertion.40 Abstract = The full path of the output data source name created. 44 41 minOccurs = 1 45 42 maxOccurs = 1 … … 47 44 DataType = string 48 45 <Default> 49 uom = feet50 46 </Default> 51 47 <Supported> 52 value = AAIGrid53 48 </Supported> 54 49 </LiteralData> … … 61 56 DataType = string 62 57 <Default> 63 uom = feet64 58 </Default> 65 59 <Supported> 66 value = AAIGrid67 60 </Supported> 68 61 </LiteralData> -
trunk/zoo-services/ogr/ogr2ogr/service.c
r1 r38 101 101 { 102 102 fprintf(stderr,"Not correct version of the gdal library\n"); 103 setMapInMaps(conf,"lenv","message","Unable to check gdal version for ogr2ogr_service.zo"); 103 104 return SERVICE_FAILED; 104 105 } … … 548 549 Usage(); 549 550 #ifdef ZOO_SERVICE 551 setMapInMaps(conf,"lenv","message","Wrong parameter"); 550 552 return SERVICE_FAILED; 551 553 } … … 575 577 } 576 578 #ifdef ZOO_SERVICE 579 char tmp[1024]; 580 sprintf(tmp,"Unable to open datasource `%s' with the following drivers.",pszDataSource); 581 setMapInMaps(conf,"lenv","message",tmp); 577 582 return SERVICE_FAILED; 578 583 #else … … 595 600 pszDestDataSource ); 596 601 #ifdef ZOO_SERVICE 602 char tmp[1024]; 603 sprintf(tmp,"Unable to open existing output datasource `%s'.",pszDestDataSource); 604 setMapInMaps(conf,"lenv","message",tmp); 597 605 return SERVICE_FAILED; 598 606 #else … … 637 645 } 638 646 #ifdef ZOO_SERVICE 647 char tmp[1024]; 648 sprintf(tmp,"Unable to find driver `%s'.",pszFormat); 649 setMapInMaps(conf,"lenv","message",tmp); 639 650 return SERVICE_FAILED; 640 651 #else … … 648 659 pszFormat ); 649 660 #ifdef ZOO_SERVICE 661 char tmp[1024]; 662 sprintf(tmp,"%s driver does not support data source creation.",pszFormat); 663 setMapInMaps(conf,"lenv","message",tmp); 650 664 return SERVICE_FAILED; 651 665 #else … … 663 677 pszFormat, pszDestDataSource ); 664 678 #ifdef ZOO_SERVICE 679 char tmp[1024]; 680 sprintf(tmp,"%s driver failed to create %s",pszFormat, pszDestDataSource); 681 setMapInMaps(conf,"lenv","message",tmp); 665 682 return SERVICE_FAILED; 666 683 #else … … 681 698 pszOutputSRSDef ); 682 699 #ifdef ZOO_SERVICE 700 char tmp[1024]; 701 sprintf(tmp,"Failed to process SRS definition: %s",pszOutputSRSDef); 702 setMapInMaps(conf,"lenv","message",tmp); 683 703 return SERVICE_FAILED; 684 704 #else … … 699 719 pszSourceSRSDef ); 700 720 #ifdef ZOO_SERVICE 721 char tmp[1024]; 722 sprintf(tmp,"Failed to process SRS definition: %s",pszOutputSRSDef); 723 setMapInMaps(conf,"lenv","message",tmp); 701 724 return SERVICE_FAILED; 702 725 #else … … 752 775 iLayer ); 753 776 #ifdef ZOO_SERVICE 777 char tmp[1024]; 778 sprintf(tmp,"Couldn't fetch advertised layer %d!",iLayer); 779 setMapInMaps(conf,"lenv","message",tmp); 754 780 return SERVICE_FAILED; 755 781 #else … … 780 806 781 807 #ifdef ZOO_SERVICE 808 char tmp[1024]; 809 sprintf(tmp,"Terminating translation prematurely after failed of layer %s",poLayer->GetLayerDefn()->GetName() ); 810 setMapInMaps(conf,"lenv","message",tmp); 782 811 return SERVICE_FAILED; 783 812 #else
Note: See TracChangeset
for help on using the changeset viewer.