Database-driven Generation
of SVG and other Graphical Representations
Dr. Martin Huber, CEO GeoTask
AG, Güterstrasse 253, CH-4053 Basel, Switzerland, mhuber@geotask.ch
This paper presents an architecture to manage large
amounts of (geo-)graphical data, to edit it in an interoperable way with desktop
and Internet based client systems and produce high-quality and interactive
renderings in different formats on request. Based on a first prototype in early
1999 producing VML output, the architecture has since evolved and has been used
in several real-live applications.
Data Management
To make graphical and especially geographical data
available for interoperating applications, system independent data management
bears considerable advantages. Using standard object-relational database
technology, a database extension has been developed to store and geo-reference
graphical data types like point, polylines, polygons, Bézier curves, circular
arcs, raster images etc. All these types can be manipulated and analysed using
the Structure Query Language (SQL) on the common database management system
interfaces like ODBC or JDBC. Spatial indexing functions speed up the selective
extraction of spatial objects.
A crucial point for interoperability is the
management of metadata on the DBMS. All information about rendering styles and
data driven style modifications, map image composition etc. is stored in a
system independent way in the database and is similarly interpreted by all
client systems.
Rendering and Interaction
On this common base, different architectural layouts
are possible to render graphical images in different formats and to interact
with the graphical data. For Internet applications, an application server
interprets user requests, selects the respective geographical data from the
database and adds the rendering information. Depending on the format, either the
server (e.g. GIF, JPEG, PNG) or the client (SVG, PDF, VML) renders the final
image for the user. For interactive web applications, e.g. for map navigation or
to link graphical objects with extended object information, client-side
rendering has the advantage that object information is directly and
interactively available at the client. Using server-side rendering, a
considerable scripting and programming effort is necessary to make pictures as
interactive as with client-side rendering.
Desktop clients for graphical editing like Adobe
Illustrator or MapInfo use the same rendering style information as the
application server. Depending on the graphical capabilities of the client, maps
might look different on different systems. Common to all editing clients is the
need to support consistent transactions in a multi-user environment. A locking
mechanism was therefore implemented that operates across the different client
systems. All data access functionality has been grouped in a library so client
interface development is simplified to managing a user session, retrieving data
from the database and render them in the graphics engine of the client, listen
to user events and treat them for data retrieval, locking and carrying out
transactions on the database.
For the editing client to
run in a browser over the Internet, an additional protocol has been implemented.
For security reasons, the application server based on information stored in the
database handles user management. Transactions are packed in an XML protocol
(e.g. OpenGIS web feature server specifications). Though already very appealing,
graphical data editing over the Internet is not limited to the capabilities of
the browser (e.g. JavaScript, Java, ActiveX). Using TCP/IP and a web transaction
protocol, also the desktop clients can cooperate over the Internet and carry out
transactions on a multi-user database.
Applications
Automated visualisation of large databases simplifies
many business and decision making processes. Several XML based visualisation
systems have been deployed based on the architecture presented here. Graphical
data editing over the Internet opens new perspectives for cooperation in
distributed teams. An application for the coordination of public utility
construction has been deployed for the City of Bern in 2000. The two awards the
application has received since show the added value in graphics based
cooperation on the Internet.