Ignore:
Timestamp:
Nov 16, 2018, 3:09:05 PM (5 years ago)
Author:
djay
Message:

Add support for output style definition depending on geometry type (msStylePoly, msStylePoint, msStrylLine). Upload shared data in remote_persitent_data_path rather than remote_data_path (used for not shared data). In case output data should be published and the data is empty (nb_pixels or nb_features is set to 0) then, the ZOO-Kernel returns an ExceptionReport? with an Exception for every output.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/prototype-v0/zoo-project/zoo-kernel/service_internal_ms.c

    r886 r888  
    185185    map* useMs=getMap(tmpI->content,"useMapserver");
    186186    if((minNb==NULL || atoi(minNb->value)>=1) && useMs!=NULL && strncasecmp(useMs->value,"true",4)==0){
     187      int lIndex=0;
     188      maps* lenv=getMaps(m,"lenv");
     189      if(getMapFromMaps(m,"lenv","mapErrorNb")==NULL)
     190        setMapInMaps(m,"lenv","mapErrorNb","0");
     191      else{
     192        map* tmpV=getMapFromMaps(m,"lenv","mapErrorNb");
     193        lIndex=atoi(tmpV->value)+1;
     194        addIntToMap(lenv->content,"mapErrorNb",lIndex);
     195      }
    187196      setMapInMaps(m,"lenv","mapError","true");
    188       setMapInMaps(m,"lenv","locator",tmpI->name);
     197      setMapArray(lenv->content,"locator",lIndex,tmpI->name);
    189198      if(nbElements==NULL)
    190         setMapInMaps(m,"lenv","message",_("The ZOO-Kernel was able to retrieve the data but could not read it as geographic data."));
     199        setMapArray(lenv->content,"message",lIndex,_("The ZOO-Kernel was able to retrieve the data but could not read it as geographic data."));
    191200      else
    192         setMapInMaps(m,"lenv","message",_("The ZOO-Kernel was able to retrieve the data but could not access any feature or pixel in te resulting file."));
     201        setMapArray(lenv->content,"message",lIndex,_("The ZOO-Kernel was able to retrieve the data but could not access any feature or pixel in te resulting file."));
    193202      if(getMapFromMaps(m,"lenv","state")==NULL)
    194203        errorException (m, _("Unable to find any geographic data"), "WrongInputData", tmpI->name);
     
    889898       */
    890899      tmpMap=getMap(output->content,"msStyle");
     900      if(tmpMap==NULL){
     901        switch(myLayer->type){
     902        case MS_LAYER_POLYGON:
     903          tmpMap=getMapFromMaps(conf,"main","msStylePoly");
     904          break;
     905        case MS_LAYER_LINE:
     906          tmpMap=getMapFromMaps(conf,"main","msStyleLine");
     907          break;
     908        default:
     909          tmpMap=getMapFromMaps(conf,"main","msStylePoint");
     910          break;
     911        }
     912      }
    891913      if(tmpMap!=NULL)
    892914        msUpdateStyleFromString(myLayer->CLASS[myLayer->numclasses]->styles[myLayer->CLASS[myLayer->numclasses]->numstyles],tmpMap->value,0);
     
    11351157    CPLErrorReset();
    11361158    GDALGetRasterStatistics( hBand, TRUE, TRUE, &pdfMin, &pdfMax, &pdfMean, &pdfStdDev);
    1137     //GDALComputeRasterStatistics( hBand, TRUE, &pdfMin, &pdfMax, &pdfMean, &pdfStdDev, NULL,NULL);
    11381159    char tmpN[21];
    11391160    sprintf(tmpN,"Band%d",iBand+1);
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