Changeset 402
- Timestamp:
- Mar 27, 2013, 7:09:39 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_ms.c
r379 r402 105 105 106 106 void setReferenceUrl(maps* m,maps* tmpI){ 107 //dumpMaps(tmpI);108 107 outputMapfile(m,tmpI); 109 108 map *msUrl=getMapFromMaps(m,"main","mapserverAddress"); … … 148 147 map* extent=getMap(tmpI->content,options[proto][4]); 149 148 map* crs=getMap(tmpI->content,"crs"); 149 int hasCRS=1; 150 if(crs==NULL){ 151 crs=getMapFromMaps(m,"main","crs"); 152 if(crs==NULL){ 153 crs=createMap("crs","epsg:4326"); 154 hasCRS=0; 155 } 156 } 150 157 char layers[128]; 151 158 sprintf(layers,options[proto][3],tmpI->name); … … 186 193 crs->value 187 194 ); 195 } 196 if(hasCRS==0){ 197 freeMap(&crs); 198 free(crs); 188 199 } 189 200 addToMap(tmpI->content,"Reference",webService_url); … … 300 311 301 312 if(output!=NULL){ 302 303 313 map* test=getMap(output->content,"real_extent"); 304 314 if(test!=NULL){ 305 315 pointObj min, max; 306 316 projectionObj tempSrs; 307 308 317 min.x = m->extent.minx; 309 318 min.y = m->extent.miny; … … 311 320 max.y = m->extent.maxy; 312 321 char tmpSrsStr[1024]; 313 314 315 322 msInitProjection(&tempSrs); 316 323 msLoadProjectionStringEPSG(&tempSrs,"EPSG:4326"); … … 327 334 sprintf(tmpSrsStr,"%.3f,%.3f,%.3f,%.3f",min.x,min.y,max.x,max.y); 328 335 addToMap(output->content,"wcs_extent",tmpExtent); 329 //dumpMap(output->content);330 331 336 }else{ 332 337 sprintf(tmpExtent,"%f,%f,%f,%f",minX, minY, maxX, maxY); 333 338 map* isGeo=getMap(output->content,"crs_isGeographic"); 334 fprintf(stderr,"isGeo = %s\n",isGeo->value); 335 if(isGeo!=NULL && strcasecmp("true",isGeo->value)==0) 336 sprintf(tmpExtent,"%f,%f,%f,%f", minY,minX, maxY, maxX); 339 if(isGeo!=NULL){ 340 fprintf(stderr,"isGeo = %s\n",isGeo->value); 341 if(isGeo!=NULL && strcasecmp("true",isGeo->value)==0) 342 sprintf(tmpExtent,"%f,%f,%f,%f", minY,minX, maxY, maxX); 343 } 337 344 addToMap(output->content,"wms_extent",tmpExtent); 338 345 sprintf(tmpExtent,"%.3f,%.3f,%.3f,%.3f",minX,minY,maxX,maxY); 339 346 addToMap(output->content,"wcs_extent",tmpExtent); 340 341 } 342 347 } 343 348 } 344 349
Note: See TracChangeset
for help on using the changeset viewer.