MCPcopy Index your code
hub / github.com/MapServer/MapServer / msOWSPrintEX_GeographicBoundingBox

Function msOWSPrintEX_GeographicBoundingBox

mapows.c:1379–1407  ·  view source on GitHub ↗

** msOWSPrintEX_GeographicBoundingBox() ** ** Print a EX_GeographicBoundingBox tag for WMS1.3.0 ** */

Source from the content-addressed store, hash-verified

1377**
1378*/
1379void msOWSPrintEX_GeographicBoundingBox(FILE *stream, const char *tabspace,
1380 rectObj *extent, projectionObj *srcproj)
1381
1382{
1383 const char *pszTag = "EX_GeographicBoundingBox"; /* The default for WMS */
1384 rectObj ext;
1385
1386 ext = *extent;
1387
1388 /* always project to lat long */
1389 if (srcproj->numargs > 0 && !pj_is_latlong(srcproj->proj)) {
1390 projectionObj wgs84;
1391 msInitProjection(&wgs84);
1392 msLoadProjectionString(&wgs84, "+proj=longlat +datum=WGS84");
1393 msProjectRect(srcproj, &wgs84, &ext);
1394 msFreeProjection(&wgs84);
1395 }
1396
1397
1398 msIO_fprintf(stream, "%s<%s>\n", tabspace, pszTag);
1399 msIO_fprintf(stream, "%s <westBoundLongitude>%g</westBoundLongitude>\n", tabspace, ext.minx);
1400 msIO_fprintf(stream, "%s <eastBoundLongitude>%g</eastBoundLongitude>\n", tabspace, ext.maxx);
1401 msIO_fprintf(stream, "%s <southBoundLatitude>%g</southBoundLatitude>\n", tabspace, ext.miny);
1402 msIO_fprintf(stream, "%s <northBoundLatitude>%g</northBoundLatitude>\n", tabspace, ext.maxy);
1403 msIO_fprintf(stream, "%s</%s>\n", tabspace, pszTag);
1404
1405 //msIO_fprintf(stream, "%s<%s minx=\"%g\" miny=\"%g\" maxx=\"%g\" maxy=\"%g\" />\n",
1406 // tabspace, pszTag, ext.minx, ext.miny, ext.maxx, ext.maxy);
1407}
1408
1409/*
1410** msOWSPrintLatLonBoundingBox()

Callers 2

msDumpLayerFunction · 0.85
msWMSGetCapabilitiesFunction · 0.85

Calls 5

msInitProjectionFunction · 0.85
msLoadProjectionStringFunction · 0.85
msProjectRectFunction · 0.85
msFreeProjectionFunction · 0.85
msIO_fprintfFunction · 0.85

Tested by

no test coverage detected