Changeset 43


Ignore:
Timestamp:
Nov 16, 2010, 7:18:57 PM (13 years ago)
Author:
djay
Message:

Make the Grass support working for vector data taking care about the absence or presence of abstract parameter from the ZCFG file... Prepare the binary string support for Python language, in the aim to make Grass raster function working.

Location:
trunk/zoo-kernel
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-kernel/service_internal.c

    r41 r43  
    12631263  xmlAddChild(nc1,nc2);
    12641264  // Extract Abstract required to be second element in the ZCFG file !
    1265   tmp=tmp->next;
    1266   nc2=xmlNewNode(ns_ows, BAD_CAST tmp->name);
    1267   nc3=xmlNewText(BAD_CAST _ss(tmp->value));
    1268   xmlAddChild(nc2,nc3); 
    1269   xmlAddChild(nc1,nc2);
    1270   xmlAddChild(nc,nc1);
    1271   tmp=tmp->next;
     1265  // For GRASS it can be empty ...
     1266  if(tmp->next!=NULL){
     1267    tmp=tmp->next;
     1268    nc2=xmlNewNode(ns_ows, BAD_CAST tmp->name);
     1269    nc3=xmlNewText(BAD_CAST _ss(tmp->value));
     1270    xmlAddChild(nc2,nc3); 
     1271    xmlAddChild(nc1,nc2);
     1272    xmlAddChild(nc,nc1);
     1273    tmp=tmp->next;
     1274  }
    12721275
    12731276  /**
  • trunk/zoo-kernel/service_internal_python.c

    r9 r43  
    201201  map* tmp=t;
    202202  while(tmp!=NULL){
    203     if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromString(tmp->value))<0){
    204       fprintf(stderr,"Unable to parse params...");
    205       exit(1);
    206     }
     203    if(strcasecmp(tmp->name,"value")==0){
     204      map* ttmp=getMap(t,size);
     205      if(ttmp!=NULL)
     206        if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromStringAndSize(tmp->value,(Py_ssize_t) atoi(ttmp->value)))<0){
     207          fprintf(stderr,"Unable to parse params...");
     208          exit(1);
     209        }
     210      else
     211        if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromString(tmp->value))<0){
     212          fprintf(stderr,"Unable to parse params...");
     213          exit(1);
     214        }
     215    }
     216    else
     217      if(PyDict_SetItem(res,PyString_FromString(tmp->name),PyString_FromString(tmp->value))<0){
     218        fprintf(stderr,"Unable to parse params...");
     219        exit(1);
     220      }
    207221    tmp=tmp->next;
    208222  }
  • trunk/zoo-kernel/ulinet.c

    r9 r43  
    235235    default:
    236236      sprintf(filename,"/tmp/ZOO_Cache%d",(int)time(NULL));
    237       printf("file=%s",filename);
    238 #ifdef MSG_LAF_VERBOSE
    239       printf("file=%s",filename);
     237      filename[24]=0;
     238      fprintf(stderr,"file=%s",filename);
     239#ifdef MSG_LAF_VERBOSE
     240      fprintf(stderr,"file=%s",filename);
    240241#endif
    241242      hInternet.filename=filename;
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