Improving WMS GetFeatureInfo - v0.2
After getting some good feedback from the members of the WMS Developer mailing list I have revised my suggested WMS GetFeatureInfo response format.
Background on this topic is described in Part 1 and Part 2 of my original suggested WMS GetFeatureInfo response format.
Keith Pomakis of CubeWerx also suggested using their BXFS format (XML Schema). Personally, I was looking for something a little simpler than BXFS, but if links to related resources were added to BXFS it would be able to perform the same function (and a lot more).
However, several of the people on the WMS Developer thought simplicity was the key so here is a revised, and slightly simplified, proposed WMS GetFeatureInfo response format (dubbed version 0.2).
<?xml version="1.0" encoding="UTF-8"?>
<!— This is an example of a WMS GetFeatureInfo response instance document in the format being described by the accompanying schema. – Rights: Public domain. – Version: 0.2 – Author: Andrew Hallam, Digital Earth Pty Ltd. See also the threads titled "Suggestion for Common GetFeatureInfo Response Format" at http://lists.eogeo.org/pipermail/wms-dev/2006-January/thread.html – Date: 2006-01-27 NB: See associated schema for documentation. Changes are noted below in comments. —> <FeatureInfoResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="wms-gfi-response-v0.2.xsd"> <Layer> <name>bores</name> <title>Water Bores</title> <!— In version 0.1 Features were identified by an attribute named "id". This is a bad idea because feature identifiers are not XML identifiers (which must be unique within an XML document), and there is the possibility of getting identical features within one GetFeatureInfo response document. The identifier attribute has been renamed "fid" (stolen from GML, with thanks). —> <Feature fid="1234"> <Properties> <Property> <title>ID</title> <value>1234</value> </Property> <Property> <title>Depth</title> <!— Units of measure have been given their own attribute. —> <value uom="m">30.0</value> </Property> </Properties> <!— Links only represent related web resources so the "rel" attribute has been dropped, and all link element must have an attribute named "title". —> <link type="text/html" href="http://somedomain/bore/report?id=1234" title="Salinity Report for Bore 1234"/> </Feature> <Feature fid="4321"> <Properties> <Property> <title>ID</title> <value>4321</value> </Property> <Property> <title>Depth</title> <value uom="m">55.5</value> </Property> </Properties> <link type="text/html" href="http://somedomain/bore/report?id=4321" title="Salinity Report for Bore 4321"/> </Feature> </Layer> <Layer> <name>salin_stat</name> <title>Watercourse Salinity Measuring Stations</title> <Feature fid="5678"> <Properties> <Property> <title>Station ID</title> <value>5678</value> </Property> <Property> <title>Station Name</title> <value>Beyond the Black Stump</value> </Property> <Property> <title>Salinity Reading</title> <value uom="ppm">6290</value> </Property> <Property> <title>Last Reading</title> <value>2006-01-21 14:00</value> </Property> </Properties> <link type="text/html" href="http://somedomain/salinity/report/5678" title="Salinity Report for Measuring Station 5678"/> </Feature> </Layer> </FeatureInfoResponse>
Downloads:
- Example instance document (v0.2, as shown above), and
- it’s XML Schema (v0.2).
Changes since version 0.1:
- Features were identified by an attribute named “id”. This is a bad idea because feature identifiers are not XML identifiers (which must be unique within an XML document), and there is the possibility of getting identical features within one GetFeatureInfo response document. The identifier attribute has been renamed “fid” (stolen from GML, with thanks).
- Units of measure have been given their own attribute.
- Links now only represent related web resources so the “rel” attribute has been dropped, and all link element must have an attribute named “title”. The current WMS specification already handles alternate representations via the Format element in the capabilities document.
As usual, comments are most welcome.
[tags]WMS, interoperability, web services[/tags]
