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

Function msGMLWriteWFSQuery

mapgml.c:1347–1561  ·  view source on GitHub ↗

** msGMLWriteWFSQuery() ** ** Similar to msGMLWriteQuery() but tuned for use with WFS 1.0.0 */

Source from the content-addressed store, hash-verified

1345** Similar to msGMLWriteQuery() but tuned for use with WFS 1.0.0
1346*/
1347int msGMLWriteWFSQuery(mapObj *map, FILE *stream, int startindex, int maxfeatures,
1348 char *default_namespace_prefix, int outputformat)
1349{
1350#ifdef USE_WFS_SVR
1351 int status;
1352 int i,j,k;
1353 layerObj *lp=NULL;
1354 shapeObj shape;
1355 rectObj resultBounds = {-1.0,-1.0,-1.0,-1.0};
1356 int features = 0;
1357 int currentfeature =0;
1358
1359 gmlGroupListObj *groupList=NULL;
1360 gmlItemListObj *itemList=NULL;
1361 gmlConstantListObj *constantList=NULL;
1362 gmlGeometryListObj *geometryList=NULL;
1363 gmlItemObj *item=NULL;
1364 gmlConstantObj *constant=NULL;
1365
1366 char *namespace_prefix=NULL;
1367 const char *axis = NULL;
1368 int bSwapAxis = 0;
1369 double tmp;
1370 const char *srsMap = NULL;
1371
1372 msInitShape(&shape);
1373
1374 /*add a check to see if the map projection is set to be north-east*/
1375 for( i = 0; i < map->projection.numargs; i++ )
1376 {
1377 if( strstr(map->projection.args[i],"epsgaxis=") != NULL )
1378 {
1379 axis = strstr(map->projection.args[i],"=") + 1;
1380 break;
1381 }
1382 }
1383
1384 if (axis && strcasecmp(axis,"ne") == 0 )
1385 bSwapAxis = 1;
1386
1387
1388 /* Need to start with BBOX of the whole resultset */
1389 if (msGetQueryResultBounds(map, &resultBounds) > 0)
1390 {
1391 if (bSwapAxis)
1392 {
1393 tmp = resultBounds.minx;
1394 resultBounds.minx = resultBounds.miny;
1395 resultBounds.miny = tmp;
1396
1397 tmp = resultBounds.maxx;
1398 resultBounds.maxx = resultBounds.maxy;
1399 resultBounds.maxy = tmp;
1400
1401 }
1402 srsMap = msOWSGetEPSGProj(&(map->projection), NULL, "FGO", MS_TRUE);
1403 if (!srsMap)
1404 msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), "FGO", MS_TRUE);

Callers 1

msWFSGetFeatureFunction · 0.85

Calls 15

msInitShapeFunction · 0.85
strcasecmpFunction · 0.85
msGetQueryResultBoundsFunction · 0.85
msOWSGetEPSGProjFunction · 0.85
gmlWriteBoundsFunction · 0.85
msOWSLookupMetadataFunction · 0.85
msIO_fprintfFunction · 0.85
msGMLGetItemsFunction · 0.85
msGMLGetConstantsFunction · 0.85
msGMLGetGroupsFunction · 0.85
msGMLGetGeometriesFunction · 0.85
msSetErrorFunction · 0.85

Tested by

no test coverage detected