A Holistic Approach of Map Composition Utilizing XML

Maria Spanaki, Lysandros Tsoulos

Cartography Laboratory, Faculty of Rural and Surveying Engineering

National Technical University of Athens

H. Polytechniou 9, 157 80 Zographou Campus, Athens, Greece

tel: +30 -210-7722730 fax: +30-210-7722734

email: spanaki@mail.ntua.gr, lysandro@central.ntua.gr


The objective of this paper is to elaborate on the way spatial data stored in an object-oriented environment is translated into GML, in order to be used for the composition of maps on the Web. The composition process, from the database produced XML data up to the delivery of SVG graphics, involves the exclusive use of the latest XML standards.

The XML standard that constitutes the basis in the process is the Geography Markup Language (GML), which is a new, powerful means of encoding, transporting, storing and processing spatial data. GML is compliant with the XML codification and the OGC specification for this kind of data. The raw XML data for each fundamental type of spatial geometry (points, lines and polygons) is extracted through spatial queries that operate on the database, which resides in the Oracle Spatial environment.

The XML data can be converted to the GML form in accordance with an XML Schema, which has been developed in order to satisfy the application's requirements. The conversion of an XML document to its corresponding GML form requires the use of a stylesheet, which is an XSLT document. Stylesheets appropriate for all three types of spatial geometry have been developed. The Extensible Stylesheet Language Transformation (XSLT) is an XML template supporting the conversion of XML documents from raw XML data to structured GML files.

The display of the GML data is accomplished through the SVG (Scalable Vector Graphics) graphic format. SVG is written in XML and it is designed to be integrated with other Web standards. This inherent characteristic offers the 'openness' that enables it to work with a number of other emerging XML-based grammars like XLink, XML Namespaces, XPath, DOM, CSS and XSL along with the ability to overcome the limitations of traditional bitmap graphics. As an XML format, SVG is platform independent and non-proprietary.

When the GML data is available, the XSLT is employed again in the process since the correspondence between the GML geometry types and the SVG structures is easily implemented as they refer to the same geometric constructs. XSLT is used to perform the transformations that lead to the visualization of GML data through SVG graphics. A key strength of an XSL stylesheet is that it is re-usable. When the data being visualized changes, the application of the same stylesheet creates a new, up-to-date map.

Furthermore, the existence of possible alternative solutions concerning the drawing of the generated SVG images, is addressed. SVG supports three methods for the implementation of styling: external CSS (Cascading Style Sheets) referenced from the current document, internal CSS style sheets embedded within the current document and inline styling that uses XSLT declarations within a style attribute on every particular SVG element. Considering that the use of CSS stylesheet is flexible enough to easily change the map presentation, the concept of linking the XSL stylesheet of CSS files externally has been adopted as the optimal solution, on the grounds of ensuring the independence of the data transformation process - through XSLT - from the drawing process, achieved through CSS.