SVG As an Editing Environment for Geographical Data

Nedjo Rogers, GroundWorks Learning Centre, nedjo@coastnet.com

Just back from a bike trip where she found a great back-roads shortcut, an avid cyclist opens her web browser to a map of her region showing previously registered routes. Lots of good ones, but hers isn't there. So she clicks her route onto the map, types in a bit of explanatory text, and hits the "submit" button. The next time users throughout the region log on, they'll see her shortcut among the many recommended routes. She may not know or care, but vector graphics have provided the means not only for displaying but also for editing the geographic data she's interested in.

SVG is now well established (despite delays in browser-support) as a standard format for the client-side display of rich vector graphical content. As presentations at the first SVG Open conference demonstrated, SVG content is not limited to static files but can be generated on the fly based on server- or client-side parsing of vector data from a wide range of sources. The rich capabilities of SVG are particularly applicable in the field of online mapping, where a vector-enabled medium may help illumine the complex interrelation of diverse spatial features.

Yet data display is only one side of the coin. Incorporating standard Document Object Model (DOM) methods for creating and modifying eXtensible Markup Language (XML) content, SVG is not limited to display but provides a potentially powerful medium for creating and editing vector data. Taking geographic data as the focus area and the software project GeoClient as a case study, this paper will explore approaches to using SVG as a data-editing environment, focusing on challenges and potential solutions.

The Open GIS Consortium (OGC) is the primary standards-setting body in the field of geographic information systems (GIS). The OGC's Web Feature Service (WFS) specification provides a standard set of methods and protocols for the transmission of vector-format geographic data. Under the specification, a "basic” WFS can describe its capabilities and answer requests for data, which are sent to a client in Geography Markup Language (GML), an XML encoding that is the defined in another OGC specification. But a "transactional” WFS can in addition accept client requests for creating new features, or for updating or deleting existing ones. In other words, the WFS specification provides a basis not only for serving up data streams over the Internet but also for adding to, editing, and maintaining the underlying geographic data sets.

Part of the open source GeoServer project, GeoClient is an SVG-based application written as a WFS client. Using SVG as a means of interacting with a WFS requires the intermediate step of parsing the GML content to and from SVG format. This parsing can be done on the server (e.g., through XSL) but is also possible on the client, through standard DOM methods. As reported at last year's GML Dev Days, GeoClient implements this latter approach. Client-side parsing has the potential advantage of eliminating the need for custom software installations on the server in addition to a WFS. Data editing capabilities are an addition to the GeoClient project currently under development.

The basic workflow of enabling data editing is something like this: load GML data from the server > parse GML into SVG > enable interactive modification of the SVG elements (or creation of new elements) > parse data back from SVG into GML > post feature geometry – along with any attribute data – back to web feature server.

In the process of developing the software we've come across a number of interesting problems, among these:

Combining a solutions-oriented review with practical demonstrations, this paper and presentation will highlight progress in making vector data a reciprocal exchange between client and server, user and provider.