02 Oct 2008 - KML, GML and REST
In the past several months there has been a great deal of discussion of the merits of REST-based architectures within the OGC and the wider IT community, with adherents on both sides claiming superiority for their respective viewpoint, and with only a small amount of understanding transiting from one community to the other.
I thought in this context it would be interesting to look at the history of GML, KML in relation to REST.
The origins of GML belong with the early days of the “new web”, meaning the suite of specifications including XML, XLink, XPointer, XSLT, RDF that sought to extend what one might think of as the conventional web, by abstracting the web’s basic notions like resources (from web pages, web sites), resource identifiers, and linking (href). In this generalization of the web of documents, generalized resources (often in XML) would replace web pages (XHTML), and XLinks would link or associate these resources much as href and anchor tags connected web pages. While things were never totally clear, the essential idea was that this web of linked resources would be independent of its presentation which would be based on HTML or some other FO (Format Objects) generated courtesy of XSLT. The value of XLink:href attributes would then be XPointer expressions that easily picked the resource of resource component of interest across the web. When this model was applied to web pages it appeared to offer significant improvements over HTML including finer grained references, multi-direction references, and the ability to link to resources in a page, not just to positions in the page.
GML was built on these basic ideas for geographic information. Geographic entities would be XML resources (with identity) which could be linked together across the web (via href:xlink) with GML providing the building blocks (e.g. geometry) and the model for constructing these resources. Large networks of these resources were envisioned so that one might navigate from a geographic dataset for a nation to that of local land parcel in a few mouse clicks.
With the emphasis on GML resources, its RDF heritage, and the use of XLinks one might think that GML and REST were made for each other. Trouble was, however, brewing on the other side of the fence, namely databases and especially spatial databases. This was not a world of unique identifiers and even less of linked resources, most especially if those resources spanned multiple databases. Databases, especially relational databases had a different take on the world, one focused on queries and operations, and one in which resources were results or things to be operated on, and not something intrinsic to the model.
The result of this database influence surfaced in the OGC Web Feature Service (WFS), essentially an XML encoding of SQL with spatial extensions. It used GML applications schemas (response to DescribeFeatureType) and GML as a data transport (response to GML GetFeature requests). The idea of resource identifiers and resource linking was a problem, and both aspects did not appear in version 1.0 of the WFS, and were only weakly supported if at all in WFS 1.1, which is still the most current version that has been released.
The WFS is clearly focused on operations and queries, and is in this sense, not very RESTful.
The WFS is not unlike many other web services, especially those identified with SOAP, where the viewpoint of operations dominates the discussion. HTTP GET and POST appear of course, but only as data transports, with the semantics of the request really encoded in the WFS (or other web service) operations.
What about KML? KML borrowed a great deal from GML, including the encoding of geometry primitives and the use of remote referencing (href), while leaving the more general GML feature model to one side. KML began as file centric (literally OS files) so that the structure of the XML (KML) was always visible and accessible to the user. KML links to other KML files (or other resources) just as in GML represented through hrefs, but without the requirement that these be xlink:href’s – i.e. no need to be XPointer expressions, although XPointer could do very interesting things with KML. Google and other imagine deep networks of KML files are all linked together.
With advances in database support for XML (e.g. XML abstract types, XML databases, XQuery, XML binding frameworks) the vision of linked XML resources that reside in databases and which are retrievable by queries and on which transactions can operate need not be in conflict. REST and the world of SOAP/SOA can co-exist.
No Comments | Leave a comment»
Comments
No comments yet.
Leave a comment
Blog Entries:
21 Nov 2008 - Infrastructure for Infrastructure07 Nov 2008 - GeoWeb and eGovernance
31 Oct 2008 - GeoWeb and Emergency Response
17 Oct 2008 - WMS, WFS, and Community Schemas
07 Oct 2008 - From the Age of Aerospace to… ?
02 Oct 2008 - KML, GML and REST
16 Sep 2008 - GeoPresence
08 Sep 2008 - GeoEquilibria-There is no surplus in Nature
29 Aug 2008 - Geographic Entity Registries
01 Aug 2008 - GeoWeb and the State of the World
23 Jul 2008 - Virtual Globes as Essential Services?
07 Jul 2008 - Cascading and Federated WFS and the Concept of Geolinking
30 Jun 2008 - What is an SDI?
16 Jun 2008 - WFS - Schema Mapping is Key
05 Jun 2008 - KML Support
08 May 2008 - Looking ahead to GeoWeb 2009
21 Apr 2008 - Spatial Infrastructures, IFC & Collaborative Engineering
14 Apr 2008 - KML released as an OGC Specification
02 Apr 2008 - BIM/CAD/GIS Integration
13 Mar 2008 - Structuralism and Data Exchange
05 Mar 2008 - Building the GeoWeb in your own backyard
03 Mar 2008 - Davos of Geo in Vancouver
28 Feb 2008 - What are coordinates?
19 Feb 2008 - Does the invisible hand always get it right?
31 Jan 2008 - “Design for Test” in the GeoWeb
23 Jan 2008 - GeoWeb Local - GML in Local Government
15 Jan 2008 - GML Core and Extensions
04 Jan 2008 - GeoWeb 3D
21 Dec 2007 - What are the key issues for geographic information technology?
26 Nov 2007 - GML in the Back Office
19 Nov 2007 - CAD- BIM-GIS-Games Integration
07 Nov 2007 - What’s in a name? Searching for the right words
23 Aug 2007 - KML Placemarks as Observations
29 Jun 2007 - Where GML was right .. and wrong
17 May 2007 - From GML 1.0 onwards - a brief history
17 May 2007 - GML and Database Interoperability
10 May 2007 - GeoWeb Manifesto
09 May 2007 - Meltdown and the Maze - Toward a Real Time Geography
08 May 2007 - GML, KML, Sensor Data, Imagery
20 Apr 2007 - Transporting GML in KML
21 Mar 2007 - The Architecture of the GeoWeb
14 Feb 2007 - From Interoperability to Infrastructure
14 Feb 2007 - GML without Geometry
18 Dec 2006 - ebRIM gets the nod at the OGC
06 Oct 2006 - In praise of complexity
05 Oct 2006 - Infrastructure - the next step past interoperability
12 Jun 2006 - GML and ebRIM
21 May 2006 - Features, Observations and Authorization
21 Apr 2006 - Transfer and Transaction Models
12 Apr 2006 - Feature Catalogues/Dictionaries, GML and RDF/S
10 Apr 2006 - Genus Loci
04 Apr 2006 - GeoWeb and Survival Part II - Towards Environmental Security
04 Apr 2006 - GeoWeb and Survival
17 Mar 2006 - Schemas, Interoperability and RDBMS
14 Mar 2006 - SDI Concepts
05 Mar 2006 - GML Complexity Re-visited
05 Mar 2006 - Observations are for more than sensor data
05 Mar 2006 - Application Schemas Drive Profiles
25 Feb 2006 - The problem with XML
15 Feb 2006 - The importance of profiles
08 Feb 2006 - One person’s metadata is another person’s …
07 Feb 2006 - From Soup to Nuts
02 Feb 2006 - GeoRSS - GML in news feeds
31 Jan 2006 - Performance and the GeoWeb
27 Jan 2006 - Remote API’S, Web Services and the GeoWeb
19 Jan 2006 - GeoWeb 2006 - GeoWeb Grows Up
09 Jan 2006 - Dealing with time in GML
23 Dec 2005 - Dynamic
14 Dec 2005 - GML in the cockpit
01 Dec 2005 - SDI - What is it really?
25 Nov 2005 - GML is the same for all applications
25 Nov 2005 - Schemas and Profiles - whats the difference?
22 Nov 2005 - Schemas - why the big deal?
15 Nov 2005 - GML for Geographic Imagery
13 Nov 2005 - GML, and KML - Why the fuss?
10 Nov 2005 - Is GML a format?
09 Nov 2005 - Embedding GML in “foreign” grammars
03 Nov 2005 - Authentication and Access Control
03 Nov 2005 - OnStar in the era of the GeoWeb
03 Nov 2005 - Do we need to encode location in news feeds?
03 Nov 2005 - gMedia - Towards Geographically Aware Media
03 Nov 2005 - Where are we going?
02 Nov 2005 - Sample XSLT Style Sheet
02 Nov 2005 - Sample KML Output
02 Nov 2005 - Sample GML Data File
02 Nov 2005 - Styling GML to KML - XSLT
02 Nov 2005 - Simple Geometry Schema
01 Nov 2005 - Simple GML Geometry
18 Oct 2005 - Simple GML Geometries
18 Oct 2005 - Styling GML to KML for Visualization
18 Oct 2005 - Some Simple GML Profiles
17 Oct 2005 - Embedding GML in non-GML grammars
17 Oct 2005 - Geotags - the answer to everything?
20 Sep 2005 - GeoWeb 2006
20 Sep 2005 - GML Observations and Features
14 Sep 2005 - What is KML?
07 Sep 2005 - Time in GML
07 Sep 2005 - GML Observations
07 Sep 2005 - GML and KML Syntax
07 Sep 2005 - GeoWeb - Part II - GML and KML
07 Sep 2005 - GI Markup - Part I - Feeding the web with Geographic Information
06 Sep 2005 - GML Complexity
06 Sep 2005 - GML “Sucks”
24 Aug 2005 - Web Feeds and Geographic Information
23 Aug 2005 - What is the Geo-Web?
23 Aug 2005 - IS WGS84 Enough
04 Aug 2005 - Coordinates in GML
03 Aug 2005 - GML Profiles
03 Aug 2005 - GML and Coordinate Systems
03 Aug 2005 - Information Sources
03 Aug 2005 - Features and Geometry Properties
03 Aug 2005 - GML Geometries
03 Aug 2005 - GML FAQ for RSS Geeks and others



