** msWFSGetFeature() */
| 1624 | ** msWFSGetFeature() |
| 1625 | */ |
| 1626 | int msWFSGetFeature(mapObj *map, wfsParamsObj *paramsObj, cgiRequestObj *req, owsRequestObj *ows_request) |
| 1627 | /* const char *wmtver, char **names, char **values, int numentries) */ |
| 1628 | { |
| 1629 | int i, j, status; |
| 1630 | int maxfeatures=-1,startindex=-1; |
| 1631 | rectObj bbox; |
| 1632 | |
| 1633 | char **layers = NULL; |
| 1634 | int numlayers = 0; |
| 1635 | |
| 1636 | char *pszFilter = NULL; |
| 1637 | int bFilterSet = 0; |
| 1638 | int bBBOXSet = 0; |
| 1639 | char *sBBoxSrs = NULL; |
| 1640 | int bFeatureIdSet = 0; |
| 1641 | |
| 1642 | const char *value; |
| 1643 | const char *tmpmaxfeatures = NULL; |
| 1644 | WFSGMLInfo gmlinfo; |
| 1645 | |
| 1646 | const char *output_mime_type = "text/xml; subtype=gml/3.1.1"; |
| 1647 | int outputformat = OWS_GML2; /* default output is GML 2.1 */ |
| 1648 | outputFormatObj *psFormat = NULL; |
| 1649 | |
| 1650 | char **aFIDLayers = NULL; |
| 1651 | char **aFIDValues = NULL; |
| 1652 | int iFIDLayers = 0; |
| 1653 | int iNumberOfFeatures = 0; |
| 1654 | int iResultTypeHits = 0; |
| 1655 | |
| 1656 | char **papszPropertyName = NULL; |
| 1657 | int nPropertyNames = 0; |
| 1658 | int nQueriedLayers=0; |
| 1659 | layerObj *lpQueried=NULL; |
| 1660 | |
| 1661 | /*use msLayerGetShape instead of msLayerResultsGetShape of complex filter #3305*/ |
| 1662 | int bComplexFilter = MS_FALSE; |
| 1663 | |
| 1664 | /* Initialize gml options */ |
| 1665 | memset( &gmlinfo, 0, sizeof(gmlinfo) ); |
| 1666 | gmlinfo.user_namespace_prefix = "ms"; |
| 1667 | gmlinfo.user_namespace_uri = "http://mapserver.gis.umn.edu/mapserver"; |
| 1668 | gmlinfo.collection_name = OWS_WFS_FEATURE_COLLECTION_NAME; |
| 1669 | gmlinfo.typename = ""; |
| 1670 | gmlinfo.output_schema_format = "XMLSCHEMA"; |
| 1671 | |
| 1672 | /* Default filter is map extents */ |
| 1673 | bbox = map->extent; |
| 1674 | |
| 1675 | /* Read CGI parameters */ |
| 1676 | /* */ |
| 1677 | /* __TODO__ Need to support XML encoded requests */ |
| 1678 | /* */ |
| 1679 | |
| 1680 | if (paramsObj->pszResultType != NULL) |
| 1681 | { |
| 1682 | if (strcasecmp(paramsObj->pszResultType, "hits") == 0) |
| 1683 | iResultTypeHits = 1; |
no test coverage detected