Ignore:
Timestamp:
Feb 1, 2018, 11:27:28 AM (6 years ago)
Author:
djay
Message:

Add the capability to publish heatmap or any templated mapfile using the epecific msInclude and msLayer keys for an output. For MapServer? published output, define 4096 as the default maxsize and use pixel width or height for raster files. use the correct MapServer? imagemode depending on GDALGetRasterDataType (MS_IMAGEMODE_BYTE for GDT_Byte, MS_IMAGEMODE_INT16 for GDT_Int16 and MS_IMAGEMODE_FLOAT32 for GDT_Float32). Create a text file (.maps) listing every mapfiles created for a MapServer? published output (or inputs) using saveMapNames function. Fixes in ulinet, use uuid for naming temporary files. Add dialect input to the ogr2ogr service. Use the .maps file for removing a file from the DeleteData? service

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-services/ogr/ogr2ogr/service.c

    r790 r862  
    9696#endif
    9797{
     98    const 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
     
    367373    }*/
    368374
     375   
    369376    tmpMap=NULL;
    370377    tmpMap=getMapFromMaps(inputs,"InputDSN","value");
     
    825832       
    826833        poResultSet = poDS->ExecuteSQL( pszSQLStatement, poSpatialFilter,
    827                                         NULL );
     834                                        pszDialect );
    828835
    829836        if( poResultSet != NULL )
     
    841848            }
    842849            poDS->ReleaseResultSet( poResultSet );
    843         }
    844     }
     850        }else{
     851          setMapInMaps(conf,"lenv","message","There was an error when running yoru SQL query.");
     852          if(pszDialect!=NULL)
     853            free(pszDialect);
     854          return SERVICE_FAILED;
     855        }
     856    }
     857    if(pszDialect!=NULL)
     858      free(pszDialect);
    845859
    846860/* -------------------------------------------------------------------- */
     
    901915
    902916#ifdef ZOO_SERVICE
    903     outputs->content=createMap("value",(char*)pszwebDestData);
     917    setMapInMaps(outputs,"OutputedDataSourceName","value",(char*)pszwebDestData);
     918    //outputs->content=createMap("value",(char*)pszwebDestData);
    904919#endif
    905920
     
    930945    fprintf(stderr,"%s %d\n",__FILE__,__LINE__);
    931946
    932     OGRCleanupAll();
     947    //OGRCleanupAll();
    933948    fprintf(stderr,"%s %d\n",__FILE__,__LINE__);
    934949
     
    939954   
    940955#ifdef ZOO_SERVICE
     956    //sleep(10);
    941957    return SERVICE_SUCCEEDED;
    942958#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