Changeset 357 for trunk/zoo-project/zoo-kernel
- Timestamp:
- Jun 4, 2012, 12:21:19 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/zoo-project/zoo-kernel/service_internal_ms.c
r356 r357 125 125 char* webService_url=(char*)malloc((strlen(msUrl->value)+strlen(format->value)+strlen(tmpI->name)+strlen(width->value)+strlen(height->value)+strlen(extent->value)+256)*sizeof(char)); 126 126 127 if(proto>0) 127 if(proto>0){ 128 map* test=getMap(tmpI->content,"real_extent"); 129 if(test!=NULL) 130 extent=test; 128 131 sprintf(webService_url, 129 132 "%s?map=%s/%s_%s.map&request=%s&service=%s&version=%s&%s&format=%s&bbox=%s&crs=%s", … … 140 143 crs->value 141 144 ); 142 else 145 } 146 else{ 147 map* test=getMap(tmpI->content,"real_extent_reverse"); 148 if(test!=NULL) 149 extent=test; 143 150 sprintf(webService_url, 144 151 "%s?map=%s/%s_%s.map&request=%s&service=%s&version=%s&%s&width=%s&height=%s&format=%s&bbox=%s&crs=%s", … … 157 164 crs->value 158 165 ); 166 } 159 167 addToMap(tmpI->content,"Reference",webService_url); 160 168 … … 224 232 msInsertHashTable(&(m->web.metadata),"ows_srs", "EPSG:4326 EPSG:900913"); 225 233 msInsertHashTable(&(myLayer->metadata),"ows_srs","EPSG:4326 EPSG:900913"); 234 235 addToMap(output->content,"real_extent","true"); 236 226 237 } 227 238 } … … 270 281 271 282 if(output!=NULL){ 272 sprintf(tmpExtent,"%f,%f,%f,%f",minX, minY, maxX, maxY); 273 map* isGeo=getMap(output->content,"crs_isGeographic"); 274 fprintf(stderr,"isGeo = %s\n",isGeo->value); 275 if(isGeo!=NULL && strcasecmp("true",isGeo->value)==0) 276 sprintf(tmpExtent,"%f,%f,%f,%f", minY,minX, maxY, maxX); 277 addToMap(output->content,"wms_extent",tmpExtent); 278 sprintf(tmpExtent,"%.3f,%.3f,%.3f,%.3f",minX,minY,maxX,maxY); 279 addToMap(output->content,"wcs_extent",tmpExtent); 283 map* test=getMap(output->content,"real_extent"); 284 if(test!=NULL){ 285 pointObj min, max; 286 projectionObj tempSrs; 287 288 min.x = m->extent.minx; 289 min.y = m->extent.miny; 290 max.x = m->extent.maxx; 291 max.y = m->extent.maxy; 292 char tmpSrsStr[1024]; 293 294 msInitProjection(&tempSrs); 295 msLoadProjectionStringEPSG(&tempSrs,"EPSG:4326"); 296 297 msProjectPoint(&(m->projection),&tempSrs,&min); 298 msProjectPoint(&m->projection,&tempSrs,&max); 299 300 sprintf(tmpExtent,"%.3f,%.3f,%.3f,%.3f",min.y,min.x,max.y,max.x); 301 addToMap(output->content,"wms_extent",tmpExtent); 302 sprintf(tmpExtent,"%.3f,%.3f,%.3f,%.3f",min.x,min.y,max.x,max.y); 303 addToMap(output->content,"wcs_extent",tmpExtent); 304 305 }else{ 306 sprintf(tmpExtent,"%f,%f,%f,%f",minX, minY, maxX, maxY); 307 map* isGeo=getMap(output->content,"crs_isGeographic"); 308 fprintf(stderr,"isGeo = %s\n",isGeo->value); 309 if(isGeo!=NULL && strcasecmp("true",isGeo->value)==0) 310 sprintf(tmpExtent,"%f,%f,%f,%f", minY,minX, maxY, maxX); 311 addToMap(output->content,"wms_extent",tmpExtent); 312 sprintf(tmpExtent,"%.3f,%.3f,%.3f,%.3f",minX,minY,maxX,maxY); 313 addToMap(output->content,"wcs_extent",tmpExtent); 314 } 280 315 } 281 316
Note: See TracChangeset
for help on using the changeset viewer.