Changeset 40
- Timestamp:
- Oct 23, 2010, 5:09:45 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-services/ogr/ogr2ogr/service.c
r39 r40 113 113 114 114 #ifdef ZOO_SERVICE 115 115 map *tmpMap=NULL; 116 116 char dataPath[1024]; 117 117 tmpMap=getMapFromMaps(conf,"main","dataPath"); … … 125 125 } 126 126 127 127 tmpMap=NULL; 128 128 tmpMap=getMapFromMaps(inputs,"F","value"); 129 129 if(tmpMap!=NULL){ … … 131 131 } 132 132 133 133 tmpMap=NULL; 134 134 tmpMap=getMapFromMaps(inputs,"DSCO","value"); 135 135 if(tmpMap!=NULL){ … … 137 137 } 138 138 139 139 tmpMap=NULL; 140 140 tmpMap=getMapFromMaps(inputs,"LCO","value"); 141 141 if(tmpMap!=NULL){ … … 143 143 } 144 144 145 tmpMap=NULL; 146 tmpMap=getMapFromMaps(inputs,"LCO","value"); 147 if(tmpMap!=NULL){ 148 papszLCO = CSLAddString(papszLCO, tmpMap->value ); 149 } 150 151 tmpMap=NULL; 145 tmpMap=NULL; 152 146 tmpMap=getMapFromMaps(inputs,"preserve_fid","value"); 153 147 if(tmpMap!=NULL){ … … 155 149 } 156 150 157 151 tmpMap=NULL; 158 152 tmpMap=getMapFromMaps(inputs,"skipfailure","value"); 159 153 if(tmpMap!=NULL){ … … 161 155 bSkipFailures = TRUE; 162 156 nGroupTransactions = 1; /* #2409 */ 163 164 165 157 } 158 159 tmpMap=NULL; 166 160 tmpMap=getMapFromMaps(inputs,"append","value"); 167 161 if(tmpMap!=NULL){ 168 162 bAppend = TRUE; 169 170 171 163 } 164 165 tmpMap=NULL; 172 166 tmpMap=getMapFromMaps(inputs,"overwrite","value"); 173 167 if(tmpMap!=NULL){ 174 168 bOverwrite = TRUE; 175 176 177 169 } 170 171 tmpMap=NULL; 178 172 tmpMap=getMapFromMaps(inputs,"update","value"); 179 173 if(tmpMap!=NULL){ 180 174 bUpdate = TRUE; 181 182 183 175 } 176 177 tmpMap=NULL; 184 178 tmpMap=getMapFromMaps(inputs,"fid","value"); 185 179 if(tmpMap!=NULL){ 186 180 nFIDToFetch = atoi(tmpMap->value); 187 188 189 181 } 182 183 tmpMap=NULL; 190 184 tmpMap=getMapFromMaps(inputs,"sql","value"); 191 185 if(tmpMap!=NULL){ 192 186 pszSQLStatement = tmpMap->value; 193 194 195 187 } 188 189 tmpMap=NULL; 196 190 tmpMap=getMapFromMaps(inputs,"nln","value"); 197 191 if(tmpMap!=NULL){ 198 192 pszNewLayerName = tmpMap->value; 199 200 201 193 } 194 195 tmpMap=NULL; 202 196 tmpMap=getMapFromMaps(inputs,"nlt","value"); 203 197 if(tmpMap!=NULL){ … … 243 237 exit( 1 ); 244 238 } 245 246 247 239 } 240 241 tmpMap=NULL; 248 242 tmpMap=getMapFromMaps(inputs,"tg","value"); 249 243 if(tmpMap!=NULL){ 250 244 nGroupTransactions = atoi(tmpMap->value); 251 252 253 245 } 246 247 tmpMap=NULL; 254 248 tmpMap=getMapFromMaps(inputs,"s_srs","value"); 255 249 if(tmpMap!=NULL){ 256 250 pszSourceSRSDef = tmpMap->value; 257 } 258 259 tmpMap=NULL; 260 tmpMap=getMapFromMaps(inputs,"s_srs","value"); 261 if(tmpMap!=NULL){ 262 pszSourceSRSDef = tmpMap->value; 263 } 264 265 tmpMap=NULL; 251 } 252 253 tmpMap=NULL; 266 254 tmpMap=getMapFromMaps(inputs,"a_srs","value"); 267 255 if(tmpMap!=NULL){ 268 256 pszOutputSRSDef = tmpMap->value; 269 270 271 257 } 258 259 tmpMap=NULL; 272 260 tmpMap=getMapFromMaps(inputs,"t_srs","value"); 273 261 if(tmpMap!=NULL){ 274 262 pszOutputSRSDef = tmpMap->value; 275 263 bTransform = TRUE; 276 277 278 264 } 265 266 tmpMap=NULL; 279 267 tmpMap=getMapFromMaps(inputs,"SPAT","value"); 280 268 if(tmpMap!=NULL){ … … 304 292 } 305 293 306 307 308 309 310 311 312 313 314 315 316 317 294 OGRLinearRing oRing; 295 296 oRing.addPoint( dfULX, dfULY ); 297 oRing.addPoint( dfULX, dfLRY ); 298 oRing.addPoint( dfLRX, dfLRY ); 299 oRing.addPoint( dfLRX, dfULY ); 300 oRing.addPoint( dfULX, dfULY ); 301 poSpatialFilter = new OGRPolygon(); 302 ((OGRPolygon *) poSpatialFilter)->addRing( &oRing ); 303 } 304 305 tmpMap=NULL; 318 306 tmpMap=getMapFromMaps(inputs,"where","value"); 319 307 if(tmpMap!=NULL){ 320 308 pszWHERE = tmpMap->value; 321 } 322 323 tmpMap=NULL; 324 tmpMap=getMapFromMaps(inputs,"where","value"); 325 if(tmpMap!=NULL){ 326 pszWHERE = tmpMap->value; 327 } 328 329 tmpMap=NULL; 309 } 310 311 tmpMap=NULL; 330 312 tmpMap=getMapFromMaps(inputs,"select","value"); 331 313 if(tmpMap!=NULL){ … … 333 315 papszSelFields = CSLTokenizeStringComplex(pszSelect, " ,", 334 316 FALSE, FALSE ); 335 336 337 317 } 318 319 tmpMap=NULL; 338 320 tmpMap=getMapFromMaps(inputs,"segmentize","value"); 339 321 if(tmpMap!=NULL){ 340 322 dfMaxSegmentLength = atof(tmpMap->value); 341 342 343 323 } 324 325 tmpMap=NULL; 344 326 tmpMap=getMapFromMaps(inputs,"segmentize","value"); 345 327 if(tmpMap!=NULL){ 346 328 dfMaxSegmentLength = atof(tmpMap->value); 347 329 } 348 330 349 331 tmpMap=NULL; … … 358 340 if(tmpMap!=NULL){ 359 341 pszDestDataSource=(char*)malloc(sizeof(char)*(strlen(tempPath)+strlen(tmpMap->value)+4)); 360 /*char *ext=new char[4];361 ext="tif";362 if(strcmp(mtoupper((char*)pszFormat),"AAIGRID")==0)363 ext="csv";364 else365 if(strcmp(mtoupper((char*)pszFormat),"PNG")==0)366 ext="png";367 else368 if(strcmp(mtoupper((char*)pszFormat),"GIF")==0)369 ext="gif";370 else371 if(strcmp(mtoupper((char*)pszFormat),"JPEG")==0)372 ext="jpg";*/373 342 sprintf((char*)pszDestDataSource,"%s/%s",tempPath,tmpMap->value/*,ext*/); 374 343 } … … 944 913 int bAppend, int eGType, int bOverwrite, 945 914 double dfMaxSegmentLength) 946 915 947 916 { 948 917 OGRLayer *poDstLayer;
Note: See TracChangeset
for help on using the changeset viewer.