Ignore:
Timestamp:
Dec 19, 2016, 6:01:06 PM (7 years ago)
Author:
djay
Message:

Add support for nested inputs and outputs.

Location:
trunk/zoo-project/zoo-services
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-services/gdal/grid/service.c

    r348 r790  
    10681068        Usage();
    10691069        GDALDestroyDriverManager();
     1070#ifndef ZOO_SERVICE
    10701071        exit( 2 );
     1072#else
     1073        fprintf(stderr,"pszSource %s\n",pszSource);
     1074        fprintf(stderr,"pszDest %s\n",pszDest);
     1075        return SERVICE_FAILED;
     1076#endif
    10711077    }
    10721078
  • trunk/zoo-project/zoo-services/hello-js/cgi-env/hello.js

    r423 r790  
    2929}
    3030
     31function hellojs2(conf,inputs,outputs){
     32    outputs["result"]["value"]="Hello "+inputs["S"]["child"]["nom"]["value"]+" "+inputs["S"]["child"]["prenom"]["value"]+" from the JS World !";
     33    outputs["result1"]["child"]["tata"]["value"]="a"
     34    //SERVICE_SUCEEDED
     35    return {"result": 3,"outputs":outputs};
     36}
     37
    3138function hellojs1(conf,inputs,outputs){
    3239        outputs["result"]["value"]="Hello "+inputs["S"]["value"]+" from the JS World !";
  • trunk/zoo-project/zoo-services/ogr/ogr2ogr/service.c

    r766 r790  
    591591/* -------------------------------------------------------------------- */
    592592#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 );
    594597      GDALDataset *poODS;
    595598      GDALDriverManager* poR=GetGDALDriverManager();
    596599      GDALDriver          *poDriver = NULL;
    597600#else
    598       OGRDataSource* poDS;
     601      OGRDataSource* poDS
     602        = OGRSFDriverRegistrar::Open( pszDataSource, FALSE );
    599603      OGRDataSource *poODS;
    600604      OGRSFDriverRegistrar    *poR = OGRSFDriverRegistrar::GetRegistrar();
     
    737741        if( poODS == NULL )
    738742        {
     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
    739766            fprintf( stderr,  "%s driver failed to create %s\n",
    740767                    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            }
    749769        }
    750770    }
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