Internet Mapping with XML
By Randy George, August 16, 2001
Internet GIS is an increasingly important component of GIS implementation. The ability to extend the audience of GIS to a larger circle of users holds out the possibility of a much larger return on investment.
In addition customer satisfaction can be enhanced by providing automated information services based on visually
referenced databases. A popular GIS website recently conducted a poll aimed at GIS implementers asking if they planned to
add web mapping to their GIS configuration. Although easily dismissed for its less than random sampling, the poll did
point out that more than half of respondents were planning to extend their GIS investment onto the Internet in the next
six months. Recent technical developments by the World Wide Web Consortium (W3C) provide a foundation for
non-proprietary, open source Internet Mapping. As these XML technologies become better known, extending GIS
configurations with Internet Mapping will become much easier and economical.
The World Wide Web Consortium (W3C) is responsible for developing specifications used to make the Internet an open system. Basic standards, such as the now familiar HTML, are developed and maintained by the W3C. More recently the W3C has been active in extending the Internet through a new generation of standards based on XML. One of the newest XML standards called SVG, Scalable Vector Graphics, provides a technical foundation for Internet based GIS. (www.w3.org) Vector maps with very flexible database linkage and a full range of customization can now be published over the Internet without requiring proprietary software.
SVG is an XML standard for vector graphics
SVG is an XML grammar for describing two-dimensional graphics. It includes elements for vector shape features, raster images, animation, and text; all specified in a W3C authorized public Data Type Definition or DTD. This XML grammar or tag language can be processed with standard XML tools such as validating parsers, editors, and browsers. Just recently released as a proposed W3C recommendation, SVG is already supported by several browsers but still requires a plugin for current versions of MS IE and Netscape. Adobe offers a free SVG plugin which can be downloaded from their site. (Adobe SVG Viewer 2.0) Adobe has also bundled their viewer with Acrobat Reader and Real Audio targeting a distribution of about 12 million viewers over the next few months. Eventually SVG will be incorporated directly into the major browsers. SVG represents a fundamental extension of the Internet allowing vector design files full access to the web.
Figure 1 Denver City Lots
This screen shot shows a typical SVG map displayed in MS IE 5.5 with Adobe SVG Viewer 2.0 plugin.
This is a small portion of a typical SVG file such as the one shown above:
<g id="PDPOINT" class="POINT">
<circle cx="0.0" cy="0.0" r="0.5"/>
<line x1="0.8" x2="-0.8" y1="0.8" y2="-0.8"/>
b><line x1="0.8" x2="-0.8" y1="-0.8" y2="0.8"/>
<path class="LOTS" d="M3163021.72,-1676148.60 L3163024.46,-1675867.60 "/>
<path class="LOTS" d="M3162660.19,-1673940.82 L3162763.84,-1673942.22 "/>
<path class="LOTS" d="M3163035.75,-1676468.18 L3162597.61,-1676465.93 L3162600.82,
-1676205.81 L3163080.27,-1676207.82 L3163079.51,-1676316.28 A98.77,98.77 0 0,0 3163062.25,
-1676375.51 A177.80,177.80 0 0,1 3163035.75,-1676468.18 "/>
<g class="POINT3" transform="translate(7.98,-0.68)">
<use class="POINT3" xlink:href="#PDPOINT" transform="scale(0.05,0.05)"/>
<text x="3164613.38" y="-1673794.05" style="font-size:36.0;stroke-width:0.0072;
CITY OF DENVER
Listing 1 - sample segment of SVG showing typical feature tags
In this small listing it is easy to pick out some basic tags identifying circles, lines, text, and multi-vertice paths. The indentation emphasizes the structural tags typical of XML grammars. Although disputable, this is human readable, and to those familiar with HTML, not entirely foreign. One of the advantages of XML grammars is their openness. Computers and people can easily identify features and process them for customization. SVG is accessible in its raw format to a human with only a simple text editor. In addition, as a conforming XML grammar, there are a host of tools for plugging together complex modular systems. Accessible as text, SVG is also made efficient for transfer over the web by incorporating compression into the specifications. SVG text files are easily compressed and a typical SVG file will be passed across the internet in its gzipped form with the .svgz extension.
Graphics described as vectors have a distinct advantage over current image technology. The GIF, PNG, JPEG, TIFF forms of illustration are collections of points with no connecting intelligence. Even with advances in compression, raster requires relatively large files. These types of image formats must transmit all the space around a line as well as the line itself. Vector graphic formats, on the other hand, are simply collections of mathematical endpoints in Cartesian space. Since only the end points, along with some miscellaneous attributes, need to cross the Internet, downloads can be considerably shortened. While Internet bandwidth is at a premium this is still important, but even more important for bandwidth is the scalability inherent to vector lines. Once on the client browser, vectors are scalable without return trips to the server. Zooming in to look at detail does not degrade in the same way that raster images degrade. Raster images visibly pixellate almost immediately, but the equation of a line is the same from point to point whether viewed from outer space or microscopically. Because graphic cards have phenomenally efficient hardwired line math and matrix transform engines, vectors can be transformed and displayed very efficiently. SVG enabled browsers allow the user to control his view with zoom and pan in the same manner we've become so accustomed to in PC GIS software.
But, SVG also incorporates standard image formats, GIF, PNG, and JPG. SVG vector features can be overlaid on raster images making hybrid raster/vector displays possible. In addition the SVG specification outlines a number of filter effects that can be applied to images. Hybrid raster/vector
SVG is more than vector display
Fully customizable on the client, SVG is also extensible with server side technologies. Multitier applications can make use of typical server technologies such as Java servlets, JSP, or ASP. SVG links can trigger server events to query databases or perform complex server functions that produce new SVG documents. Coupling SVG on the client with server side http tunneling standards like XML-RPC, RMI, and SOAP allows dispersed communities of SVG events. For example a client can browse through a hierarchy of maps choosing the features and geographic extents required. These selection parameters can then be sent to the server where a Java Servlet acquires the necessary input streams from one or several distant servers finally producing a new SVG display on the fly.
Extending SVG with Java technology provides a scalable open solution to a number of Internet mapping applications. SVG is a portable data specification while Java is a portable application development tool. Internet mapping projects developed with these tools can be ported to a wide range of hardware and operating systems. This prevents a project from being locked down to a single vendor solution with associated scaling and licensing costs. The open source Apache group has added a new project specific to SVG called Batik, which provides opensource Java tools for viewing, transcoding, and manipulating SVG sources. (Apache Batik Project) Add MySQL to an Apache Jakarta/tomcat server on Linux and serving SVG maps is reduced to the cost of Internet access.
SVG is also compatible with the full range of XML specifications that are just now becoming available to the Internet. XPath, XPointer, XQuery, XForm, XHTML, XSLT are only some of the XML technologies which provide basic infrastructure for a rapidly expanding semantic web. As part of this XML infrastructure, SVG stands firmly centered in the flow of current Internet technologies. SMIL, Synchronized Multimedia Integration Language, is one of these XML standards that allows SVG to coexist with media rich audio visuals as well as animation. For instance rollover mouse events on SVG diagrams can be used to trigger streaming audio. (Voice rollover) Media rich Internet Mapping applications are not only possible with SVG but relatively easy to implement.
As the GIS community sees an expanding need for Internet extensions, SVG will play an important role in providing powerful yet economical solutions. In order to demonstrate the capabilities of this new XML grammar, GeoTechnologies, Inc has developed a number of sample Internet GIS applications. (SVG Mapping)
"The Semantic Web is an extension of the current web in which information is given well-defined meaning, better enabling computers and people to work in cooperation." -- Tim Berners-Lee, James Hendler, Ora Lassila - Scientific American
The Semantic Web
- SVG is not proprietary - SVG is an open W3C specification!
- XML based - SVG is compatible with additional XML standards - SMIL,XLINK,XPATH...!
- Text Based - SVG is human readable format and allows standard text find functions
- XML development tools - Many development tools are available for processing XML - Xalan, Xerces, SAX, JDom ...
- Extensible with server technologies - Java servlets,JSP,ASP,PHP,PEARL ...
- Flexible implementation - Windows, Linux, IBM, HP, UNIX OSs
- Allows multitier architecture - Browser client to ISP server to off site Databases
- CSS Stylesheet compatible - project managers get to determine presentation attributes
- integrates with non-GIS software - XML development crosses all disciplines and spreads the costs of development over a wide audience
- SVG smart maps - intelligently connects graphic elements to non-graphic elements in a rich semantic web of cooperative communities
SVG Screen Shots
Map tied to database queries along with floating toolbar for inserting new symbols which update entries in the database.
Rollover affects tied to HTML and SVG with server generated data
Map based database queries
Hybrid vector raster display with additional display options
World Web Consortium SVG
Apache Batik Project
GeoTechnologies SVG demonstrations
Article (c) 2001, Randy George. Distribution or retransmission is strictly prohibited
739 Evening Star Dr
Castle Rock, CO 80104