A Holistic Approach of Map Composition Utilizing XML

Keywords: GML, XSLT, CSS, SVG

Spanaki Maria, M.Sc.
Cartography Laboratory, Faculty of Rural and Surveying Engineering
National Technical University of Athens
H. Polytechniou 9, 157 80 Zographou Campus
Athens, Greece Phone: +30-210-7722730 Fax: +30-210-7722734
spanaki@mail.ntua.gr

Biography

Maria Spanaki graduated from the Department of Rural and Surveying Engineering (National Technical University of Athens) in 2000. Currently she is a M.Sc. student in Geoinformatics at National Technical University of Athens.

Lysandros Tsoulos, Prof.
Cartography Laboratory, Faculty of Rural and Surveying Engineering
National Technical University of Athens
H. Polytechniou 9, 157 80 Zographou Campus
Athens, Greece Phone: +30-210-7722730 Fax: +30-210-7722734
lysandro@central.ntua.gr
http://www.survey.ntua.gr

Biography

Prof. Lysandros Tsoulos graduated from the Department of Rural and Surveying Engineering (University of Thessalonica) in 1972. He received a MSc. in Digital Mapping and his Dr. Eng. from NTUA in 1989. His dissertation entitled “The Electronic Chart and its Use in Navigation” contributed to the standardization of the content and functionality of electronic charts on board the ships. He worked for the Hellenic Navy Hydrographic Service for 16 years as director of the directorate of Cartography and the Computing Center.

Currently he is an Associate Professor at the Department of Rural and Surveying Engineering, Vice- Chairman of the Department and Director of the NTUA Geomatics Center. He has 60 publications in national/international journals and conference proceedings on Digital Mapping and Geographical Information Systems. He has also participated in a number of projects like: Impact II (Environmental and Social Impact of Air Quality), STRIDE, MEDSPA (Management of Ecosystems), WERATLAS (Atlas of wave energy resource in Europe), GEOMED (Geographical Mediation System), Eurostat/GISCO (Cartography and Map Design) and STATLAS (Statistical Atlas of the European Union). He is member in a number of National and International Scientific Committees.


Abstract


The explosion of Internet technologies causes an increasing demand for maps on the web. A number of web mapping and cartographic sites include on-line applications that generate maps using server technologies. However, most of the presented maps are of fairly low cartographic quality and very limited interaction. The arising of SVG technology breaks this lack of standardized client-side vector display. For the first time, SVG allows for high quality cartographic elements with interaction and animation, implemented using standardized programming languages and grammars. As the Web has grown in popularity and complexity, users and content providers have demanded more Web sites and visual sophistication. The low-resolution GIFs that populate Web pages today have limited capabilities. SVG is based on Extensible Markup Language (XML), a new standard for creating Web pages that provides the tools needed to go further. This paper describes the way spatial data is stored in an object-oriented environment and subsequently translated, in order to be used for the composition of maps/charts on the Web and open environments. The World Wide Web is fast becoming a standard platform for Geographic Information Systems. Commercial developers are already producing on-line versions of their GIS software. The development of open source software to support this kind of applications remains a challenge that can be tackled with the utilization of XML, which underlies just about all of the current standards for “open” environments.


Table of Contents


1. INTRODUCTION
2. WEB MAPPING
     2.1 Database design and implementation
3. EXTRACTING XML DATA
4. BUILDING GML SCHEMAS
5. GML GENERATION AND XSLT
     5.1 XSLT processing
6. SVG GRAPHICS GENERATION
     6.1 SVG and CSS
7. CONCLUSIONS
Bibliography

1. INTRODUCTION

For many years, the Standard Generalized Markup Language (SGML), which enables precise document specification, constituted a languished international standard, little used outside few big organizations. Partly this was due to the complexity and the high cost of processing tools. As the web grew, the need for better organizational and searching methods came to the fore. It became apparent that a simpler version of the full SGML standard would be advantageous. Thus XML came about and replaced SGML [1] . The Geography Markup Language (GML) [2] constitutes a new, powerful means of encoding, transporting, storing and processing spatial data that is compliant with the XML codification and the OGC specification for this data type. The XML data for each fundamental type of spatial geometry (points, lines and polygons) is extracted through spatial queries that operate on the data, which is initially stored in a spatially enabled database.

In accordance with the XML Schemas, especially designed to satisfy the application’s implementation, the XML data is converted into the GML format. Stylesheets appropriate for all three types of spatial geometry are also developed. The conversion of an XML document to its corresponding GML form requires the use of such a stylesheet, which is an XSLT document. The Extensible Stylesheet Language Transformation (XSLT) is an XML template supporting the conversion of XML documents from one form to another. The display of the GML data is accomplished through the SVG’s (Scalable Vector Graphics) graphic format. SVG is an open-standard vector graphics language that allows for the design of Web pages with high-resolution graphics that can contain sophisticated elements, such as gradients, animation and filter effects, using plain text commands. SVG promises to bring precision and quality to Web graphics and design, delivering the layout capabilities, choice of fonts, interactivity, and colours that make a site shine.

Mapping represents a perfect implementation of SVG, where a map is by nature a vector layered representation of the earth. The SVG specification allows the same layering concepts that are so crucial to any Geographic Information System. Since maps correspond to graphics that relate to our environment, there is a high need for maps to be informative and interactive. SVG allows providing this interaction with very high quality output capability, directly on the Web. Because of the complexity of geographic data (projections, coordinate systems, complex objects, etc.), SVG should not be viewed as the replacement for common GIS formats, it should rather be considered as a new way to present quality geographic information to any user on the Web, potentially using scalable vector maps on the client [3] .

2. WEB MAPPING

Just as the society is shaken by the winds of change, so too, cartography is changing. We are in the middle of the revolution the way maps are made. The problem is that they do not fulfill the requirements of a huge body of users – the Internet surfers – who have a completely different set of requirements from the traditional users. They need maps /charts that are complete and dynamic, essentially immediacy is a must. The response to these requirements is Web Mapping. Essentially, the concept of Web Mapping is made of three basic components: Geography, Information and the Web [3] . There is a close association among these components resulting to the model shown in Figure 1 .

Geography – Maps: Being a visual and intelligent representation of the environment and geography, maps allow for the exploration of the world we live in, sharing of knowledge and making informed decisions. Visualizing data using mapping is a valuable solution when there is a need to explain events, predict outcomes and plan strategies.

Information - Database: Databases are the key foundation of the information age when it comes to store, manage and access data. Today’s need for timely decisions also calls for innovative ways to access accurate, up-to-date information with tools to help present and manage data in useful ways.

Geography + Information = GIS: Geographic Information Systems (GIS) are making the essential link between geography and information. This technology allows for the visualization, exploration and analysis of layers of spatial and attributes information by location, revealing hidden patterns, relationships and trends. The benefit of GIS is its ability to capture, store, manage and query spatial data and present its findings in the form of maps or reports.

Web: The explosion of Internet technologies has opened a whole new world of limitless possibilities for GIS/mapping applications. The Web introduces new methods to integrate mapping into accessible, informative and really interactive sites. Geo-spatial data can be integrated in virtually any web context to provide strategic views and rich, meaningful graphics. Because of its simplicity and architecture, the Internet is a complete revolution for accessing maps and information all together.

fig_1.jpg

Figure 1: Schematic of the web-mapping components and their association [3]

2.1 Database design and implementation

The first step in database design is the creation of the conceptual data model. This model is an abstraction of the real world, which incorporates only those properties thought to be relevant to the application at hand. The data model would normally define specific groups of entities, their attributes and the relationships between these entities. It is independent of the DBMS environment used and its associated data structures [5] . In the framework of the research carried out, an application specific spatial model has been developed taking into account the spatial data characteristics and the scope of the spatial data database, which is to store spatial data in an object-oriented environment in order to facilitate subsequent encoding in GML format for the composition of maps/charts. The data model should be compatible with the OGC abstract model of geography [6] used in GML. The conceptual and logical approach to the design of the database is described in [4] .

Utilizing the schema described in [4] , the project’s database is implemented in Oracle 9i. In the current version of Oracle Spatial - the object-relational model - has been extended to include an SDO_GEOMETRY type, which is used to store the geometry of the objects. The geometry of the features is stored using what the OGC calls simple features and composite collections of these primitive types. The same standards are also used in GML and in the database conceptual model. This compatibility is enviable, since the geo-database is developed to work as a repository where from the GML data is generated. Another advantage is Oracle’s ability to communicate with well-known GIS systems such as ESRI’s Arc/Info. This factor facilitates the population of the database and the spatial data editing.

Loading data into the spatial database is a straightforward process with the use of ARCSDE, which is an Arc/Info client that works as a gateway between Arc/Info and Oracle. For the creation of the spatial database, each layer stored as an Arc/Info coverage, is converted to a Feature Type. The Feature Type preserves the geometry and all properties appearing in the feature attribute table of the coverage. A mapping exists between the geometry type of features in the geo-database and the coverages. In addition a new field called ObjectID is created, for all geometry types, which guarantees a unique ID for each object as required by the data model. All Info tables that store additional properties of the features are transformed into Oracle tables. Coverage and Info table items are mapped based on a combination of their type and their width.

3. EXTRACTING XML DATA

The Oracle Enterprise Console and the Oracle Enterprise Manager is the environment where the data are chosen and then extracted in XML through spatial queries. Three layers of information are selected from each group of geographic objects namely points, lines and polygons. It should be mentioned that the XML format is text based and each of the extracted files is quite big in size. That is another reason that justifies the separate manipulation of data types throughout the process explained below. Figure 2 shows the raw XML data for polygons geometry as they are extracted from Oracle Spatial. In the <NURGNM> element there is information about the name of the polygon and in the <SDO_ORDINATES> element there is the geometric information encoded through the <SDO_ORDINATES_ITEM> elements alternately for each X and Y. It is much the same way that information about arcs is being registered. For points geometry, the information concerning X and Y coordinates is encoded in the <SDO_POINT> element, using separate <X> and <Y> tag elements.

<?xml version="1.0"?>
<layer id="boundaries_polys">
	<ROW num="1">
		<OBJECTID>1890</OBJECTID>
		<NURGNM>CHANIA</NURGNM>
		<SHAPE>
			<SDO_GTYPE>2003</SDO_GTYPE>
			<SDO_ELEM_INFO>
				<SDO_ELEM_INFO_ITEM>1</SDO_ELEM_INFO_ITEM>
				<SDO_ELEM_INFO_ITEM>1003</SDO_ELEM_INFO_ITEM>
				<SDO_ELEM_INFO_ITEM>1</SDO_ELEM_INFO_ITEM>
			</SDO_ELEM_INFO>
			<SDO_ORDINATES>
				<SDO_ORDINATES_ITEM>1399105.46263094</SDO_ORDINATES_ITEM>
				<SDO_ORDINATES_ITEM>-1837174.86386229</SDO_ORDINATES_ITEM>
				<SDO_ORDINATES_ITEM>1396362.72051392</SDO_ORDINATES_ITEM>
				<SDO_ORDINATES_ITEM>-1830005.81362293</SDO_ORDINATES_ITEM>
				:
				<SDO_ORDINATES_ITEM>1399105.46263094</SDO_ORDINATES_ITEM>
				<SDO_ORDINATES_ITEM>-1837174.86386229</SDO_ORDINATES_ITEM>
			</SDO_ORDINATES>
		</SHAPE>
	</ROW>
	<ROW num="2">
		<OBJECTID>1893</OBJECTID>
		<NURGNM>RETHYMNI</NURGNM>
		:
	</ROW>
	<ROW num="3">
		<OBJECTID>1892</OBJECTID>
		<NURGNM>IRAKLEIO</NURGNM>
		:
	</ROW>
	<ROW num="4">
		<OBJECTID>1888</OBJECTID>
		<NURGNM>LASITHI</NURGNM>
		:
	</ROW>
</layer>

Figure 2: Sample XML file for polygons geometry as extracted from Oracle 9i

4. BUILDING GML SCHEMAS

The Geography Markup Language (GML) is an XML data encoding scheme for the transport and storage of geographic information, including both the spatial and non-spatial properties of geographic features. GML has been designed to uphold the principle of separating content from presentation. It provides mechanisms for the encoding of geographic feature data regardless of the way the data may be presented to a human reader. GML is compliant with the XML Schema Recommendation and it has also been developed to be consistent with the XML Namespaces Recommendation. Namespaces are used to distinguish the definitions of features and properties defined in application-specific domains from one another, and from the core constructs defined in GML modules.

GML 2.0 defines three base schemas for encoding spatial information. Feature schema defines the general feature-property model, geometry schema includes the detailed geometry components, and xlinks schema provides the XLink attributes used to implement linking functionality. The GML Geometry schema includes type definitions for abstract geometry elements, concrete (multi) point, line and polygon geometry elements as well as complex type definitions for the underlying geometry types. The Geometry schema targets the 'gml' namespace. A namespace is a conceptual entity identified by a URL that denotes a collection of element names and type definitions that comprise a cohesive vocabulary.

The three schema documents alone provide base types and structures, which may be used by an application schema. An application schema declares the actual feature and property types of interest for a particular domain using components from GML in standard ways. Broadly speaking, these involve the definition of application-specific types, which are derived from types in the standard GML schemas or direct inclusion of elements and types from the standard GML schemas. The base GML schemas effectively provide a meta-schema or a set of foundation classes, where from an application schema can be implemented. The import element in the Geometry schema brings in the definitions and declarations contained in the XLinks schema while the include element in the Feature schema brings in the GML geometry constructs and makes them available for use in the definition of feature types.

fig_3.jpg

Figure 3: Base schemas as packages

Three GML application schemas have been developed for each of the basic geometries, points, lines and polygons. This approach has been adopted in order to have full control over the basic geometric constructs and the way they are transformed and visualized. Figure 4 shows the procedure of generating GML files from raw XML data in accordance with the three GML schemas.

fig_4.jpg

Figure 4: Transforming raw XML data to GML

The creation of the GML schema files has been implemented with the use of Altova’s XML parser. XML Spy version 5.4 is an XML development environment for designing, editing, parsing and debugging enterprise-class applications involving not only XML or Schema applications, but also other xml technologies (XSL/XSLT, SOAP, WSDL). XML Spy provides the power and flexibility needed to work with all XML technologies in a sophisticated production environment. It is a comprehensive and easy-to-use tool that facilitates all aspects of XML application development. The XML data is converted to the GML form, in accordance with the project specific application schemas utilizing two xml based languages: XSLT (eXtensible Stylesheet Language Transformation) and XPath (XML Path Language).

5. GML GENERATION AND XSLT

XSLT provides a set of tools for transforming documents from their original structure to a new structure and is commonly described as a transformative style language. Instead of adding information to the original document structure, it creates a new document structure based on rules (stylesheets) applied to the content of the original. An XSLT stylesheet is a collection of template rules ( Figure 5 and Figure 12 ). Each template rule includes a pattern that identifies the source tree nodes to which the pattern applies and a template that is added to the resulting tree when the XSLT processor applies a specific template rule to a matched node [7] . For example, the same XML document can be transformed to GML ( Figure 6 ), SVG or HTML by applying to the source document three different stylesheets.

XSLT can be considered as a programming language for the process and transformation of XML documents. As such, it supports [8] :

XSLT is affiliated with XML Path Language(XPath), which is a specialized language for addressing parts of an XML document. XPath provides a simple and concise syntax for the identification of nodes in an XML document, based on the node’s type, name, content and context in relation to other nodes in the tree. XSL Transformations (XSLT) provides a grammar in which the results of XPath queries are associated with templates to describe the transformation - parsing of data in the XML source document as a new XML document. Like the core of the SQL languages used to manipulate relational databases, XPath is important because it provides a flexible way to identify the desirable information that someone might want to pull out from a larger collection.

<!-- ===== Transforms XML data (polygons) to GML polygons ===== -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" >
	<xsl:output method="xml" version="1.0" omit-xml-declaration="no" encoding="UTF-8" indent="yes"/>
	<xsl:template match="/">
	<MapAtlas Lab="Cartography" Date="2002-07-25" xsi:noNamespaceSchemaLocation=".\MapAtlas_4POLYGONS.xsd">
		<xsl:for-each select="layer/ROW">
			<MapPolygons>
				<xsl:attribute name="OBJECTID"><xsl:value-of select="OBJECTID"/></xsl:attribute>
				<xsl:attribute name="NURGNM"><xsl:value-of select="NURGNM"/></xsl:attribute>
				<PolygonsGeometry>
					<gml:outerBoundaryIs>
						<gml:LinearRing>
							<gml:coordinates>
							<xsl:for-each select="SHAPE/SDO_ORDINATES/SDO_ORDINATES_ITEM">
								<xsl:choose>
									<xsl:when test="position() mod 2 = 1">
											<xsl:value-of select="format-number(.,'#')"/>
										<xsl:text>,</xsl:text>
									</xsl:when>
									<xsl:when test="position() mod 2 = 0">
											<xsl:value-of select="format-number(.,'#')"/>
										<xsl:text> </xsl:text>
									</xsl:when>
								  </xsl:choose>
							</xsl:for-each>
							</gml:coordinates>
						</gml:LinearRing>
					</gml:outerBoundaryIs>
				</PolygonsGeometry>
			</MapPolygons>
		</xsl:for-each>
	</MapAtlas>
	</xsl:template>
</xsl:stylesheet>

Figure 5: Stylesheet for transforming XML to GML data (polygons geometry)

5.1 XSLT processing

XSL transformations are implemented using XSLT processors. An XSLT processor is called with a command prompt (e.g. the DOS command prompt in a Windows operating system) and requires two basic pieces of information: the source document to be read into the source tree and the stylesheet to apply to the source tree document.

More specifically, XSLT processing involves the following steps [9] :

  1. Reading the XML source document and the associated XSLT stylesheets
  2. Parsing XML files, and then their associated XSLT files, into XML Document Object Model (DOM) objects that represent the XML elements as trees of nodes. Each node corresponds to an XML document element or attribute
  3. Applying XSLT transformation to the source trees
  4. Producing resulting trees in accordance with the specification of the XSLT style sheet
  5. Serializing the resulting trees as output files. These files output XML, GML, SVG, or other formats

The XSL parser used in the framework of this application is the Microsoft’s MSXSL parser, which is a very efficient product. The XSLT is employed again for the transformation of GML data into SVG graphic output.

<?xml version="1.0" encoding="UTF-8"?>
<MapAtlas Lab="Cartography" Date="2003-04-25" xsi:noNamespaceSchemaLocation=".\MapAtlas_4POLYGONS.xsd" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
	<MapPolygons OBJECTID="1890" NURGNM="CHANIA">
		<PolygonsGeometry>
			<gml:outerBoundaryIs>
				<gml:LinearRing>
					<gml:coordinates>1318196,-1807321 1318708,-1806742 1318227,-1806563 1318013,-1806915 
							1318196,-1807321…… 
					</gml:coordinates>
				</gml:LinearRing>
			</gml:outerBoundaryIs>
		</PolygonsGeometry>
	</MapPolygons>
	<MapPolygons OBJECTID="1893" NURGNM="RETHYMNI">
		:
	</MapPolygons>
	<MapPolygons OBJECTID="1892" NURGNM="IRAKLEIO">
		:
	</MapPolygons>
	<MapPolygons OBJECTID="1888" NURGNM="LASITHI">
		:
	</MapPolygons>
</MapAtlas>

Figure 6: Output GML sample file for polygons geometry

6. SVG GRAPHICS GENERATION

The last part of the map composition procedure is the generation of SVG graphic results from GML (Scalable Vector Graphics) files as shown in the figure below. Once again, XSLT is involved ( Figure 8 ) in order perform the transformations that lead to the visualization of GML data through SVG graphics.

fig_7.jpg

Figure 7: Transforming GML data to SVG graphics using CSS

SVG is a two-dimensional vector graphics format written in XML. As an XML format, SVG is platform independent and non-proprietary. SVG has been developed for two basic reasons [10] :

  1. The perception that with the arrival of parts of the XML family of technologies, the need and an exciting opportunity existed for an XML-based graphics format
  2. The long-standing recognition of the limitations of traditional bitmap graphics

In particular, one of the limiting factors of using images on the Web has been that they are limited to the display of 256 colors of the ‘web-safe’ palette. In contrast, SVG can use 16.7 million colours (24 bit). SVG reaches the computer as text-based source code, which is then rendered on the client side. An SVG rendering engine, also known as an SVG viewer, interprets the source code and interpolates the true colour needed in a gradient or other colour transition, thus providing high-quality, true-to-life (or true-to-code) colour. The most important advantages of SVG are [10] , [11] :

Perhaps the only disadvantage of SVG graphics is that they require the installation of a viewer in order to be displayed in a Web browser environment (e.g. Adobe SVG viewer). The need for a plug-in with SVG is temporary, as this recommendation is expected to be supported natively by user agents through the implementation of XML on the Internet.

The SVG elements’ basic attributes should be considered when transforming GML files to SVG. The correspondence between the GML geometry types and the SVG structures is easily implemented as they refer to the same geometric constructs [12] . It must be noted that a Point will be represented with a rectangle, a circle or a more complex pattern more figurative of the object. Table 1 contains the basic transformations and Figure 8 contains the XSL code that is applied to GML data (polygons) and outputs SVG polygons as image files. This stylesheet uses internal CSS for polygon styling.

Geometry object correspondence between GML and SVG
GML SVG
<point> rectangle, circle, icon at the point location
<LineString> <polyline>
<Box> <rect>
<LinearRing> <svg:polygon>
<Polygon> <polygon>
<MultiPoint> <rectangle, circle, icon at the point>
<MultiLineString > A group <g> of <svg:polyline>
<MultiPolygon> A group <g> of <svg:polygon>

Table 1

<!-- ===== Transforms GML data (polygons) to SVG polygons ===== -->
<xsl:stylesheet version="1.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:gml="http://www.opengis.net/gml">
<xsl:output method="xml" media-type="image/svg+xml" indent="yes" doctype-public="-//W3C//DTD SVG 1.0//EN" doctype-system="http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"/>
	<xsl:template match="/">
		<svg width="100%" height="100%" viewBox="1290000 1750000 300000 120000">
			<defs>
				<style type="text/css">
				#counties{fill:rgb(230,230,191);stroke:rgb(255,255,255);stroke-width:300}
				</style>
			</defs>
			<title> Island of Crete (polygons geometry) </title>
			<g transform="scale(1,-1)">
				<xsl:attribute name="class">polygons</xsl:attribute>
				<xsl:attribute name="id">counties</xsl:attribute>
				<xsl:for-each select="MapAtlas/MapPolygons ">
					<polygon>
						<xsl:attribute name="class"><xsl:value-of select="@NURGNM"/></xsl:attribute>
						<xsl:attribute name="Code"><xsl:value-of select="@OBJECTID"/></xsl:attribute>
						<xsl:variable name="npoints"   select="PolygonsGeometry/gml:outerBoundaryIs/gml:LinearRing/gml:coordinates"/>
						<xsl:attribute name="points"><xsl:value-of select="PolygonsGeometry/gml:outerBoundaryIs/gml:LinearRing/gml:coordinates"/></xsl:attribute>
					</polygon>
				</xsl:for-each>
			</g>
		</svg>
	</xsl:template>
</xsl:stylesheet>

Figure 8: Stylesheet for transforming GML data to SVG graphics using internal css

6.1 SVG and CSS

For the creation of SVG graphic output through the transformation of XML files, the Cascading Style Sheets – CSS can be used. CSS is commonly described as an annotative style language, meaning that it adds formatting information to the document tree rather than changing the document itself [13] . CSS don’t use XML or XSL syntax, formatting with a different way the final graphic result. CSS is easier to use than XSLT and uses less memory because it cannot reorder a document or build a tree representation of the document. Since the content is separated from presentation, different stylesheets can produce alternative symbolization scenarios for the same data set according to the users’ preferences.

SVG supports the following methods for the implementation of CSS styling [14] :

<?xml version="1.0"?>
<xsl:processing-instruction name="xml-stylesheet">href="StyleSheet_CRETE_polys.css" type="text/css"</xsl:processing-instruction>
	<defs>
		<style type="text/css">
		#boundariespolys{fill:rgb(230,230,191);stroke:rgb(255,255,255);stroke-width:300}
		</style>
	</defs>
<?xml version="1.0"?>
<circle style="fill:red; stroke:black; stroke-width:100" r="2500" cx="{$circle_X}" cy="{$circle_Y}"/>

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 procedure from the drawing process (2nd line - Figure 12 ). The generated SVG documents have a structure similar to the one of the GML document.

<?xml version="1.0" encoding="UTF-16"?>
<?xml-stylesheet href="StyleSheet_CRETE_polys.css" type="text/css"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg width="100%" height="100%" viewBox="1290000 1750000 300000 120000">
	<title> Island of Crete (polygons geometry) </title>
	<g transform="scale(1,-1)" id="boundariespolys">
		<polygon class="CHANIA" points="1327863,-1799582 1327957,-1799520 1327731,-1799043 1327403,-1798753 1326983,-1798467 1326792,-1798758 1326250,-1798439 1326412,-1798832 1327148,-1799166 … "/>
		<polygon class="RETHYMNI" points="1398258,-1817477 1398448,-1818461 1399298,-1820141 1400238,-1821240 1400642,-1822566 1400689,-1822688 1400964,-1823927 1400848,-1824297 1399553,-1825172 … "/>
		<polygon class="IRAKLEIO" points="1479422,-1792300 1479454,-1792012 1479145,-1791370 1479293,-1790409 1479089,-1789682 1479180,-1789566 1479525,-1789655 1479702,-1789229 1479055,-1789361 … "/>
		<polygon class="LASITHI" points="1563657,-1783611 1563813,-1783600 1564676,-1783167 1565156,-1782731 1565963,-1782415 1566027,-1782090 1565730,-1782094 1566198,-1781441 1565778,-1781270 … "/>
	</g>
</svg>

Figure 12: Sample of SVG document for Polygons geometry

Finally, all generated SVG images with points, lines and polygons are linked together in a new SVG file, which only contains references to these images ( Figure 13 ). Figure 14 shows the image of the map of the island of Kriti, resulted from the above described process. This rather simple map contains all geometric primitives and is a proof of the integrity and the efficiency of the process.

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20001102//EN"	"http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd">
<svg width="100%" height="100%">
	<desc>This graphic links to 3 external SVG images
</desc>
	<title>Island of Crete (Greece)</title>
	<!-- Import the polygons here -->
	<svg x="0" y="0" width="100%" height="100%">
		<image x="0" y="0" width="100%" height="100%" xlink:href="SVGfromGML_polys.svg"/>
	</svg>
	<!-- Import the arcs here-->
	<svg x="0" y="0" width="100%" height="100%">
		<image x="0" y="0" width="100%" height="100%" xlink:href="SVGfromGML_arcs.svg"/>
	</svg>
	<!-- Import the text and Points here-->
	<svg x="0" y="0" width="100%" height="100%">
		<image x="0" y="0" width="100%" height="100%" xlink:href="SVGfromGML_points.svg"/>
	</svg>
</svg>

Figure 13: SVG document for linking other SVG images

merged_GML2SVG_CRETE_S1.svg

Figure 14: Final SVG image with all geometric primitives

7. CONCLUSIONS

XML family of technologies constitutes a revolution in the way geographic information is encoded, transferred and rendered. XML is not a language in a normal sense. It is rather a meta-language designed to create a variety of what one would normally think of as languages, of which SVG is one example. Because these different languages are all built in the same syntax, powerful new possibilities exist for interchanging information between computer applications and composing maps/charts on the Web. SVG provides the power and flexibility to create Web based and paper based graphics, whose inherent characteristics supercede the limitations of traditional bitmap graphics. It was designed to be open to creation or implementation by programmers or by those who can think like programmers, using graphics drawing tools that are likely to be familiar. These capabilities open new ways in the design of maps and charts and the portrayal of geographic features. Internet technologies have changed the way people live, work and interact. XML technologies can leverage the power of mapping and improve the way we use and work with maps.

Bibliography

[1]
Online GIS and Spatial Metadata, D. Green and T. Bossomaier, Taylor and Francis, 2002.
[2]
OpenGIS® Geography Markup Language (GML) Implementation Specification, version 2.1.1, OpenGIS® Implementation Specification, OpenGIS Project Document Number 02-009, http://www.opengis.net/gml/02-009/GML2-11.html, 25 April 2002. (http://www.opengis.net/gml/02-009/GML2-11.html)
[3]
http://www.dbxgeomatics.com
[4]
An XML-Based Approach for the Composition of Maps and Charts, L. Tsoulos, M. Spanaki, A. Skopeliti, ICC 2003 Durban, S. Africa
[5]
Association for Geographic Information, R. Walker, ed. AGI Standards Committee GIS Dictionary, 1993
[6]
OpenGIS® Abstract Specification, (http://www.opengis.org/techno/specs.htm), 1999
[7]
XSLT Quickly, DuCharme, B., Manning Editions, 2002
[8]
XSL Transformations (XSLT), World Wide Web Consortium, Version 1.0, 1999
[9]
Microsoft XML Parser User’s Manual, Microsoft Corporation, Microsoft XML Core Services (MSXML) 4.0, 2000
[10]
Designing SVG web graphics, 10. Watt A., New Riders Publishing, 2002
[11]
SVG Map Maker for MapInfo Professional Software Documentation, DBx Geomatics, Scalable Vector Graphics (SVG) Publish vector maps on the Web, 2002
[12]
Geospatial data integration and visualisation using open standard, Taladoire G., 2001
[13]
Cascading Style Sheets level 2 CSS2 Specification, World Wide Web Consortium, 1998
[14]
Associating Style Sheets with XML documents, World Wide Web Consortium, Version 1.0., 1999

XHTML rendition created by gcapaper Web Publisher v2.0, © 2001-3 Schema Software Inc.