Ignore:
Timestamp:
May 7, 2019, 2:17:08 PM (6 years ago)
Author:
djay
Message:

Merge prototype-v0 branch in trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/zoo-project/zoo-services/ogr/ogr2ogr/service.c

    r790 r917  
    9696#endif
    9797{
     98    char  *pszDialect = NULL;
    9899    const char  *pszFormat = "ESRI Shapefile";
    99100    const char  *pszDataSource = NULL;
     
    155156      sprintf(serverAddress,"%s",tmpMap->value);
    156157    }
    157    
     158
    158159    tmpMap=NULL;
    159160    char tmpurl[1024];
     
    223224    if(tmpMap!=NULL && strncasecmp(tmpMap->value,"NULL",4)!=0){
    224225      pszSQLStatement = tmpMap->value;
     226    }
     227
     228    tmpMap=getMapFromMaps(inputs,"dialect","value");
     229    if(tmpMap!=NULL){
     230      pszDialect=strdup(tmpMap->value);
    225231    }
    226232
     
    360366          dfMaxSegmentLength = atof(tmpMap->value);
    361367    }
    362 
    363     /*tmpMap=NULL;
    364     tmpMap=getMapFromMaps(inputs,"segmentize","value");
    365     if(tmpMap!=NULL){
    366           dfMaxSegmentLength = atof(tmpMap->value);
    367     }*/
    368 
     368   
    369369    tmpMap=NULL;
    370370    tmpMap=getMapFromMaps(inputs,"InputDSN","value");
     
    825825       
    826826        poResultSet = poDS->ExecuteSQL( pszSQLStatement, poSpatialFilter,
    827                                         NULL );
     827                                        pszDialect );
    828828
    829829        if( poResultSet != NULL )
     
    841841            }
    842842            poDS->ReleaseResultSet( poResultSet );
    843         }
    844     }
     843        }else{
     844          setMapInMaps(conf,"lenv","message","There was an error when running yoru SQL query.");
     845          if(pszDialect!=NULL)
     846            free(pszDialect);
     847          return SERVICE_FAILED;
     848        }
     849    }
     850    if(pszDialect!=NULL)
     851      free(pszDialect);
    845852
    846853/* -------------------------------------------------------------------- */
     
    901908
    902909#ifdef ZOO_SERVICE
    903     outputs->content=createMap("value",(char*)pszwebDestData);
     910    setMapInMaps(outputs,"OutputedDataSourceName","value",(char*)pszwebDestData);
     911    //outputs->content=createMap("value",(char*)pszwebDestData);
    904912#endif
    905913
     
    930938    fprintf(stderr,"%s %d\n",__FILE__,__LINE__);
    931939
    932     OGRCleanupAll();
     940    //OGRCleanupAll();
    933941    fprintf(stderr,"%s %d\n",__FILE__,__LINE__);
    934942
     
    939947   
    940948#ifdef ZOO_SERVICE
     949    //sleep(10);
    941950    return SERVICE_SUCCEEDED;
    942951#else
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