Opened 15 years ago

Closed 13 years ago

#3161 closed defect (fixed)

Document method to enable geometry output in GML WMS GetFeatureInfo

Reported by: dmorissette Owned by: jmckenna
Priority: normal Milestone: 5.6.6 release
Component: Documentation - MapServer Version: unspecified
Severity: normal Keywords:
Cc:

Description

With MapServer 5.4, WMS GetFeatureInfo in GML format returned only attributes but no geometry.

In ticket #2989, for 5.6, we added a way to enable the geometry output in GML2 WMS GetFeatureInfo using the wms_geometries and wms_geom_type metadata. (ows_* and gml_* metadata prefixes also work for this).

By default, WMS GetFeatureInfo in GML2 format does not include the geometry. To enable it, add those metadata to your layer(s). e.g. for a point layer

 LAYER
   TYPE POINT
   ...
   METADATA
     "ows_geometries" "mygeom"
     "ows_mygeom_type"  "point"
   END
   ...
 END

See the docs for gml_geometries and gml_[name]_type in http://mapserver.org/ogc/wfs_server.html. The same rules apply here except that there is no default geometry if *_geometries is not specified.

The WMS docs should be updated, possibly adding a small section on enabling geometry output for WMS GetFeatureInfo in GML2 format.

Attachments (1)

wms_get_feature_info_geometries.patch (1.4 KB ) - added by rouault 13 years ago.

Download all attachments as: .zip

Change History (6)

comment:1 by dmorissette, 15 years ago

Further clarification on the behavior of WMS GetFeatureInfo in GML2 format:

  • by default, no geometry output, only the bounding box of the feature (<gml:boundedBy>)
  • geometry output can be enabled using gml_geometries and gml_[name]_type metadata as explained earlier
  • the bounding box (and geometry) can be disabled using the "gml_geometries" "none" metadata

comment:2 by rouault, 13 years ago

I'd suggest the attached documentation patch. Is it OK ?

comment:3 by rouault, 13 years ago

Commited in trunk in r10705. Worth commiting in 5.6 branch ?

comment:4 by dmorissette, 13 years ago

Sorry for the late response. Yes and Yes (yes what you wrote looks right to me, and yes it should be committed to the 5.6 branch as well). Thanks.

comment:5 by rouault, 13 years ago

Milestone: 5.6 release5.6.6 release
Resolution: fixed
Status: newclosed

Commited in 5.6 branch in r10706

Note: See TracTickets for help on using tickets.