Changeset 35 for trunk/zoo-services/ogr
- Timestamp:
- Oct 1, 2010, 2:52:10 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-services/ogr/base-vect-ops/service.c
r34 r35 91 91 free(tmp); 92 92 if(res==NULL){ 93 setMapInMaps(conf,"lenv","message", "Unable to call OGR_G_CreatFromGML");93 setMapInMaps(conf,"lenv","message",_("Unable to call OGR_G_CreatFromGML")); 94 94 return NULL; 95 95 } … … 111 111 map* tmp=getMapFromMaps(inputs,"InputPolygon","value"); 112 112 if(!tmp){ 113 setMapInMaps(conf,"lenv","message", "Unagle to parse the input geometry from InputPolygon");113 setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon")); 114 114 return SERVICE_FAILED; 115 115 } … … 123 123 } 124 124 else{ 125 setMapInMaps(conf,"lenv","message", "Unable to find any geometry for InputPolygon");125 setMapInMaps(conf,"lenv","message",_("Unable to find any geometry for InputPolygon")); 126 126 return SERVICE_FAILED; 127 127 } 128 128 if(geometry==NULL){ 129 setMapInMaps(conf,"lenv","message", "Unagle to parse the input geometry from InputPolygon");129 setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon")); 130 130 return SERVICE_FAILED; 131 131 } … … 178 178 #endif 179 179 map* tmp=getMapFromMaps(inputs,"InputPolygon","value"); 180 if(!tmp) 181 return SERVICE_FAILED; 180 if(!tmp){ 181 setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon")); 182 return SERVICE_FAILED; 183 } 182 184 fprintf(stderr,"Service internal print \n"); 183 185 dumpMaps(inputs); … … 196 198 else 197 199 geometry=createGeometryFromGML(conf,tmp->value); 198 if(geometry==NULL) 199 return SERVICE_FAILED; 200 if(geometry==NULL){ 201 setMapInMaps(conf,"lenv","message",_("Unable to parse the input geometry from InputPolygon")); 202 return SERVICE_FAILED; 203 } 200 204 res=(*myFunc)(geometry); 201 205 fprintf(stderr,"Service internal print \n"); … … 252 256 map* tmp=getMapFromMaps(inputs,"InputPolygon","value"); 253 257 if(tmp==NULL){ 254 setMapInMaps(conf,"lenv","message", "Unable to fetch input geometry");258 setMapInMaps(conf,"lenv","message",_("Unable to fetch input geometry")); 255 259 return SERVICE_FAILED; 256 260 }else 257 261 if(strlen(tmp->value)<=0){ 258 setMapInMaps(conf,"lenv","message", "Unable to fetch input geometry");262 setMapInMaps(conf,"lenv","message",_("Unable to fetch input geometry")); 259 263 return SERVICE_FAILED; 260 264 } … … 265 269 geometry=createGeometryFromGML(conf,tmp->value); 266 270 if(geometry==NULL){ 267 setMapInMaps(conf,"lenv","message", "Unable to parse input geometry");271 setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry")); 268 272 return SERVICE_FAILED; 269 273 } … … 287 291 char *tmpS=OGR_G_ExportToGML(res); 288 292 setMapInMaps(outputs,"Result","value",tmpS); 293 free(tmpS); 289 294 setMapInMaps(outputs,"Result","mimeType","text/xml"); 290 295 setMapInMaps(outputs,"Result","encoding","UTF-8"); … … 355 360 } 356 361 if(geometry1==NULL){ 357 setMapInMaps(conf,"lenv","message", "Unable to parse input geometry for InputEntity1.");362 setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity1.")); 358 363 fprintf(stderr,"SERVICE FAILED !\n"); 359 364 return SERVICE_FAILED; … … 385 390 fprintf(stderr,"\nService internal print1 InputEntity2 Final\n"); 386 391 if(geometry2==NULL){ 387 setMapInMaps(conf,"lenv","message", "Unable to parse input geometry for InputEntity2.");392 setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity2.")); 388 393 fprintf(stderr,"SERVICE FAILED !\n"); 389 394 return SERVICE_FAILED; … … 461 466 } 462 467 if(geometry1==NULL){ 463 setMapInMaps(conf,"lenv","message", "Unable to parse input geometry for InputEntity1.");468 setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry for InputEntity1.")); 464 469 fprintf(stderr,"SERVICE FAILED !\n"); 465 470 return SERVICE_FAILED; … … 512 517 map* tmp=getMapFromMaps(inputs,"InputPolygon","value"); 513 518 if(tmp==NULL){ 514 setMapInMaps(conf,"lenv","message", "Unable to parse input geometry from InputPolygon");519 setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry from InputPolygon")); 515 520 return SERVICE_FAILED; 516 521 } … … 518 523 geometry=createGeometryFromGML(conf,tmp->value); 519 524 if(geometry==NULL){ 520 setMapInMaps(conf,"lenv","message", "Unable to parse input geometry from InputPolygon");525 setMapInMaps(conf,"lenv","message",_("Unable to parse input geometry from InputPolygon")); 521 526 return SERVICE_FAILED; 522 527 }
Note: See TracChangeset
for help on using the changeset viewer.