[mapserver-commits] r9405 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Oct 7 21:46:31 EDT 2009
Author: dmorissette
Date: 2009-10-07 21:46:30 -0400 (Wed, 07 Oct 2009)
New Revision: 9405
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapgml.c
Log:
Enable output of geometry in GML GetFeatureInfo if wms_geometries and wms_geom_type are specified (#2989)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2009-10-08 00:13:59 UTC (rev 9404)
+++ trunk/mapserver/HISTORY.TXT 2009-10-08 01:46:30 UTC (rev 9405)
@@ -15,6 +15,9 @@
Version 5.6.0-beta3 (2009-10-07):
---------------------------------
+- Enable output of geometry in GML GetFeatureInfo if wms_geometries and
+ wms_geom_type are specified (#2989)
+
- fix URN typo in mapwfs.c for urn:EPSG:geographicCRS:...
- don't apply scalefactor to label outlines (#3157)
Modified: trunk/mapserver/mapgml.c
===================================================================
--- trunk/mapserver/mapgml.c 2009-10-08 00:13:59 UTC (rev 9404)
+++ trunk/mapserver/mapgml.c 2009-10-08 01:46:30 UTC (rev 9405)
@@ -1205,6 +1205,7 @@
}
#endif
+/* Dump GML query results for WMS GetFeatureInfo */
int msGMLWriteQuery(mapObj *map, char *filename, const char *namespaces)
{
#if defined(USE_WMS_SVR)
@@ -1262,10 +1263,10 @@
msFree(value);
/* populate item and group metadata structures (TODO: test for NULLs here, shouldn't happen) */
- itemList = msGMLGetItems(lp, "G");
- constantList = msGMLGetConstants(lp, "G");
- groupList = msGMLGetGroups(lp, "G");
- geometryList = msGMLGetGeometries(lp, "G");
+ itemList = msGMLGetItems(lp, namespaces);
+ constantList = msGMLGetConstants(lp, namespaces);
+ groupList = msGMLGetGroups(lp, namespaces);
+ geometryList = msGMLGetGeometries(lp, namespaces);
for(j=0; j<lp->resultcache->numresults; j++) {
status = msLayerResultsGetShape(lp, &shape, lp->resultcache->results[j].tileindex, lp->resultcache->results[j].shapeindex);
@@ -1285,19 +1286,19 @@
msFree(value);
/* write the feature geometry and bounding box */
- if(!(geometryList && geometryList->numgeometries == 1 && strcasecmp(geometryList->geometries[0].name, "none") == 0)) {
+ if(geometryList && geometryList->numgeometries > 0 && strcasecmp(geometryList->geometries[0].name, "none") != 0) {
#ifdef USE_PROJ
if(msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), namespaces, MS_TRUE)) { /* use the map projection first */
gmlWriteBounds(stream, OWS_GML2, &(shape.bounds), msOWSGetEPSGProj(&(map->projection), NULL, namespaces, MS_TRUE), "\t\t\t");
- gmlWriteGeometry(stream, NULL, OWS_GML2, &(shape), msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), namespaces, MS_TRUE), NULL, "\t\t\t");
+ gmlWriteGeometry(stream, geometryList, OWS_GML2, &(shape), msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), namespaces, MS_TRUE), NULL, "\t\t\t");
} else { /* then use the layer projection and/or metadata */
gmlWriteBounds(stream, OWS_GML2, &(shape.bounds), msOWSGetEPSGProj(&(map->projection), &(map->web.metadata), namespaces, MS_TRUE), "\t\t\t");
- gmlWriteGeometry(stream, NULL, OWS_GML2, &(shape), msOWSGetEPSGProj(&(lp->projection), &(lp->metadata), namespaces, MS_TRUE), NULL, "\t\t\t");
+ gmlWriteGeometry(stream, geometryList, OWS_GML2, &(shape), msOWSGetEPSGProj(&(lp->projection), &(lp->metadata), namespaces, MS_TRUE), NULL, "\t\t\t");
}
#else
gmlWriteBounds(stream, OWS_GML2, &(shape.bounds), NULL, "\t\t\t"); /* no projection information */
- gmlWriteGeometry(stream, NULL, OWS_GML2, &(shape), NULL, NULL, "\t\t\t");
+ gmlWriteGeometry(stream, geometryList, OWS_GML2, &(shape), NULL, NULL, "\t\t\t");
#endif
}
More information about the mapserver-commits
mailing list