Index: trunk/zoo-services/ogr/ogr2ogr/service.c
===================================================================
--- trunk/zoo-services/ogr/ogr2ogr/service.c	(revision 39)
+++ trunk/zoo-services/ogr/ogr2ogr/service.c	(revision 40)
@@ -113,5 +113,5 @@
 
 #ifdef ZOO_SERVICE
-	map *tmpMap=NULL;
+    map *tmpMap=NULL;
     char dataPath[1024];
     tmpMap=getMapFromMaps(conf,"main","dataPath");
@@ -125,5 +125,5 @@
     }
 
-	tmpMap=NULL;
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"F","value");
     if(tmpMap!=NULL){
@@ -131,5 +131,5 @@
     }
 
-	tmpMap=NULL;
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"DSCO","value");
     if(tmpMap!=NULL){
@@ -137,5 +137,5 @@
     }
 
-	tmpMap=NULL;
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"LCO","value");
     if(tmpMap!=NULL){
@@ -143,11 +143,5 @@
     }
 
-	tmpMap=NULL;
-    tmpMap=getMapFromMaps(inputs,"LCO","value");
-    if(tmpMap!=NULL){
-	  papszLCO = CSLAddString(papszLCO, tmpMap->value );
-    }
-
-	tmpMap=NULL;
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"preserve_fid","value");
     if(tmpMap!=NULL){
@@ -155,5 +149,5 @@
     }
 
-	tmpMap=NULL;
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"skipfailure","value");
     if(tmpMap!=NULL){
@@ -161,43 +155,43 @@
 	  bSkipFailures = TRUE;
 	  nGroupTransactions = 1; /* #2409 */
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"append","value");
     if(tmpMap!=NULL){
 	  bAppend = TRUE;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"overwrite","value");
     if(tmpMap!=NULL){
 	  bOverwrite = TRUE;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"update","value");
     if(tmpMap!=NULL){
 	  bUpdate = TRUE;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"fid","value");
     if(tmpMap!=NULL){
 	  nFIDToFetch = atoi(tmpMap->value);
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"sql","value");
     if(tmpMap!=NULL){
 	  pszSQLStatement = tmpMap->value;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"nln","value");
     if(tmpMap!=NULL){
 	  pszNewLayerName = tmpMap->value;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"nlt","value");
     if(tmpMap!=NULL){
@@ -243,38 +237,32 @@
 		  exit( 1 );
 	  }
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"tg","value");
     if(tmpMap!=NULL){
 	  nGroupTransactions = atoi(tmpMap->value);
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"s_srs","value");
     if(tmpMap!=NULL){
 	  pszSourceSRSDef = tmpMap->value;
-	}
-
-	tmpMap=NULL;
-    tmpMap=getMapFromMaps(inputs,"s_srs","value");
-    if(tmpMap!=NULL){
-	  pszSourceSRSDef = tmpMap->value;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"a_srs","value");
     if(tmpMap!=NULL){
 	  pszOutputSRSDef = tmpMap->value;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"t_srs","value");
     if(tmpMap!=NULL){
 	  pszOutputSRSDef = tmpMap->value;
 	  bTransform = TRUE;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"SPAT","value");
     if(tmpMap!=NULL){
@@ -304,28 +292,22 @@
       }
 
-	  OGRLinearRing  oRing;
-
-	  oRing.addPoint( dfULX, dfULY );
-	  oRing.addPoint( dfULX, dfLRY );
-	  oRing.addPoint( dfLRX, dfLRY );
-	  oRing.addPoint( dfLRX, dfULY );
-	  oRing.addPoint( dfULX, dfULY );
-	  poSpatialFilter = new OGRPolygon();
-	  ((OGRPolygon *) poSpatialFilter)->addRing( &oRing );
-	}
-
-	tmpMap=NULL;
+      OGRLinearRing  oRing;
+      
+      oRing.addPoint( dfULX, dfULY );
+      oRing.addPoint( dfULX, dfLRY );
+      oRing.addPoint( dfLRX, dfLRY );
+      oRing.addPoint( dfLRX, dfULY );
+      oRing.addPoint( dfULX, dfULY );
+      poSpatialFilter = new OGRPolygon();
+      ((OGRPolygon *) poSpatialFilter)->addRing( &oRing );
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"where","value");
     if(tmpMap!=NULL){
 	  pszWHERE = tmpMap->value;
-	}
-
-	tmpMap=NULL;
-    tmpMap=getMapFromMaps(inputs,"where","value");
-    if(tmpMap!=NULL){
-	  pszWHERE = tmpMap->value;
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"select","value");
     if(tmpMap!=NULL){
@@ -333,17 +315,17 @@
 	  papszSelFields = CSLTokenizeStringComplex(pszSelect, " ,", 
 		  FALSE, FALSE );
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"segmentize","value");
     if(tmpMap!=NULL){
 	  dfMaxSegmentLength = atof(tmpMap->value);
-	}
-
-	tmpMap=NULL;
+    }
+
+    tmpMap=NULL;
     tmpMap=getMapFromMaps(inputs,"segmentize","value");
     if(tmpMap!=NULL){
 	  dfMaxSegmentLength = atof(tmpMap->value);
-	}
+    }
 
     tmpMap=NULL;
@@ -358,17 +340,4 @@
     if(tmpMap!=NULL){
       pszDestDataSource=(char*)malloc(sizeof(char)*(strlen(tempPath)+strlen(tmpMap->value)+4));
-      /*char *ext=new char[4];
-      ext="tif";
-      if(strcmp(mtoupper((char*)pszFormat),"AAIGRID")==0)
-        ext="csv";
-      else 
-        if(strcmp(mtoupper((char*)pszFormat),"PNG")==0)
-          ext="png";
-        else
-          if(strcmp(mtoupper((char*)pszFormat),"GIF")==0)
-            ext="gif";
-          else
-            if(strcmp(mtoupper((char*)pszFormat),"JPEG")==0)
-              ext="jpg";*/
       sprintf((char*)pszDestDataSource,"%s/%s",tempPath,tmpMap->value/*,ext*/);
     }
@@ -944,5 +913,5 @@
                            int bAppend, int eGType, int bOverwrite,
                            double dfMaxSegmentLength)
-
+		
 {
     OGRLayer    *poDstLayer;
