Keywords: SVG, GML, GIS, Web Mapping
Ida Cheung graduated from the Department of Land Surveying and Geo-informatics of the Hong Kong Polytechnic University in 2000. She has been worked in GIS field for 3 years. Currently she is a MPhil. student in the Department of Land Surveying and Geo-informatics.
Geoffrey Shea graduated from the Department of Civil Engineering in the National Cheng Kung University, Taiwan. He joined the Hong Kong Polytechnic in 1988, and is now a Senior Lecturer in the Department of Land Surveying and Geo-Informatics. Internet computing especially on Web Mapping and spatial database handling are the main research interests of Geoffrey. He is currently pursing a part-time Ph.D. study on adaptive mobile GIS.
The main objective of this research is to develop efficient algorithms of editing geographic data online and in mobile devices. We are using a new GIS standard, GML incoperated with SVG. As GML is not for data display, SVG is an ideal vector graphic for displaying geographic data. GML sets at the backend to store and transport data and on the other side SVG sets on front end to render and display geographic data. They not only can visualize geographic data on the web, but also give the possibility to edit geographic data online. The research explores whether using GML and SVG is a good method to intergrate web-based mapping information in terms of data modelling, spatial data presentation represertation mechanism and spatial data editing capability. Especially in Internet and wireless environment, whether using SVG gives a significant improvement of bandwidth, speed, access and reliability.
In order to test the capability of displaying and editing geographic data, a prototype is built. It aims to investigate the capability of GML and SVG and develop a corresponding data modeling and system in order to overcome or improve the existing limitation on online graphic presentation and data editing functions. It focuses on online map editing function which is still not well developed function over existing web mapping system and examines specific problems and approaches in using SVG as a user interface for editing geographic data online.
2. GIS Data Visualization in SVG
3. GIS data in GML
4. Methodology for implementation
4.1 Development of data model and design algorithms
4.2 GML data Generation
4.3 Application Schema Generation
4.4 XSL stylesheet Generation
4.5 Design algorithms for editing function
4.6 Development and evaluation of a prototype
The widespread availability of World Wide Web gives the opportunities for delivering maps over the Internet as well as small mobile devices. The sharing of spatial data through Internet is important to promote interoperability of spatial data. Interoperability implies that there is some common concept on which information exchange and integration is based. [Vckovski 1999]
There were over 30 different Web mapping software packages or solutions provided by different GIS vendors. Most popular Web Mapping packages are ESRI ArcIMS, Autodesk MapGuide, GeoMedia WebMap server, and MapInfo MapXtreme [Peng 2003] .They all have their own proprietary data formats and different customized programming languages. Some of them render images such as GIF and JPEG but these raster data cannot be selected, changed styling or zoomed in for more detail. In term of vector data, different data formats restrict the integration of data for applications and analyses. Moreover, different data formats support different spatial models. For instance, a particular GIS format support complex spatial model whereas another merely support simple feature model. It is difficult to share data between disparate Internet systems over a wide area network.
In application level, the proprietary Web mapping applications are limited to their own corporate networks and developing languages. The vendor-based on-line spatial services and clients means that systems are neither interoperating with systems on the data level, nor the application level.
In functional level, most Web mapping software packages can perform simple GIS functions such as zooming, querying, selecting, buffering and styling. They seldom perform more advanced GIS functions such as spatial analysis and spatial editing. In existing market, two Web mapping software packages, ArcIMS and Autodesk MapGuide, offer GIS functions which are closed to editing capability on spatial data. The ArcIMS Java Viewer using feature services has two functions called MapNotes and EditNotes. The MapNotes function enables users to add text or graphics to the map. These edits are then sent to the MapNotes folder on the ArcIMS Server. The EditNotes function enables users to edit features on the displayed map. Similar to MapNotes, once users finish editing, the changes will be submitted to the EditNotes folder on the ArcIMS Server for the server administrator to review. EditNotes must be converted to shapefiles or XML. MapNotes and EditNotes are therefore just graphics on map but not edited features on the server [Alex 2002] .
For Autodesk MapGuide, functions are extended to include edit capability by the SDF COM Toolkit to enable users to create, edit, or delete actual SDF files. From the client end, the use of a MapGuide server requires downloading and installing a proprietary plug-in. Data are in proprietary format not readily accessible to or useable by other applications.
In short, over the Internet, it is essential to have a method of storing and representing data in an open, extendable and flexible way, but also in a way that is vendor-independent. Therefore Geography Markup Language (GML) was designed to help solve above problems and promote interoperability of spatial data. GML is an XML grammar written in XML Schema for the modelling, transport, and storage of geographic information including both spatial and non-spatial properties of geographic features [OGC 2003] . It is developed by Open GIS Consortium. On the other side, the Scalable Vector Graphics (SVG) is an emerging two-dimensional vector graphics standard, which is developed by W3C organization. GML is used as the standard of data exchange and then can be transformed into SVG for graphic visualization so that downloads can be considerably shortened and 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 [Randy 2002] . The performance hence can be improved. It is essential for Web mapping which requires fast delivery time and high performance. It seems that GML and SVG are ideal for transporting and storing geographic information over Internet using advanced XML technology and provide potential capability to integrate different geographic information together.
The aim of this paper is to investigate and develop methods for generalizing map online and editing vector-formatted geospatial data to Internet and mobile user using emerging standards – GML and SVG. The main purposes are:
SVG is an ideal candidate for displaying GIS information in a Web browser. All typical GIS features can be readily displayed and manipulated, and data are transferred in a compact vector format rather than raster format. SVG knows shape types for 2D graphics including rectangles, circles, ellipses, lines, polylines, polygons, symbols and path elements. These graphical objects can be grouped, styled and transformed using stylesheets such as XSLT and CSS. SVG is already supported by several browsers, but it still requires a plug-in for current versions of Microsoft Internet Explorer and Netscape. Adobe offers a free SVG plug-in called Adobe SVG viewer 3.0.
SVG drawings can be dynamic and interactive. The Document Object Model (DOM) for SVG, which includes the full XML DOM, allows for straightforward and efficient vector graphics animation via scripting. This makes SVG useful for dynamic websites with graphical content, especially for web mapping which has rich content on graphical representation. Data can be selected, queried and processed according to the clients’ settings on the server side. On the other hand, clients can create, delete and update the elements graphically as well as manipulate their attributes.
GML is an XML based encoding standard for geographic information developed by the OpenGIS Consortium (OGC). GML 1.0 was released as a Recommendation Paper in February, 2001 and GML 2.0 was approved in April 2000 as an OpenGIS Implementation Specification. GML 2.0 provides for XML Schema, complex features and feature relations, extending GML’s scope beyond the basic 2-dimensional vector-based descriptions in Simple Features. Currently, the latest version of GML is GML 3.0 which has been approved in January 2003. New additions in GML 3.0 support complex geometries, spatial and temporal reference systems, topology, units of measure, metadata, gridded data, and default styles for feature and coverage visualization [OGC 2003] . GML is intended to enable the transport and storage of geographical information in XML, to provide greater interoperability between GIS applications, and to enable linked geographical datasets. Figure 1 shows that relationship between GML and SVG.
In order to test the editing capability of GML and SVG, we propose a framework. The major target of the framework is to design algorithms, mechanism and workflow of distributing geographic information online with more advanced editing functions. It focuses on examine specific problems and approaches in using SVG as a user interface for editing geographic data online.
GML has ability to provide a framework for modelling application relationships. This allows application to be designed independently yet still able to interoperate when using the same base object model [Toon 2001] . Application framework can depend upon one or more GML schemas by importing them shown in Figure 2 . For example, schema 1 in the application framework imports the GML feature schema. Since this research focuses on mobile application, mobile GIS data model is used. Based on existing GIS data model, further enhancements are performed for the model, for example, modelling the spatial relationship and spatial entities according to the topographic features in Hong Kong digital map data. Besides, the presented rules of mapping can be generalized easily to translate oriented objects models, in UML or another formalism, for files in XML Schema [Miguel 2002] . The relationships between features and attributes in an application are modelled by UML.
For graphic presentation, Scalable Vector Graphics (SVG) is applied. SVG is an XML grammar for describing 2D graphics. GML is used as a spatial data interchange format, and SVG provides a format for viewing spatial data. As Figure 2 shows that style engine is used to transform GML data into SVG graphics. The figure summarizes the work flow of data structure and transformation.
To test the model, Hong Kong digital base map was collected from Land Information Centre (LIC) of Survey and Mapping Office, Lands Department for the framework. Scale 1:1000 digital topographic map (B1000) are used. Since the native format of the digital base map is in ArcInfo coverage format, data conversion from coverage format to GML data is required. The procedure of generating GML data is shown in Figure 3 .
The e00 files are the export format of ArcInfo coverage. They are first decompressed to ArcInfo coverage and then converted to shapefiles format. The reason of converting shapefiles is that many free tools are available to convert shapefiles to GML such as deegree command line shape to GML converter 1.5 (http://deegree.sourceforge.net/) By using free converter, shapefiles format data can be converted to GML data.
Since Hong Kong base map has own specification of data content, an application schema specified for Hong Kong base map data is needed to validate the GML documents. Referring to the data dictionary of Hong Kong digital base map, an application schema declares actual feature types and property types. It defines data types of textual data. For example, it defines whether id should be in numeric and name should be string. It is further developed to include schemas for different features such as building, road and contour etc.
In order to visualize GML data, stylesheets are required. As mentioned in previous section, stylesheets are used to convert and format GML into SVG and different style and symbols can be applied. For example, a set of recommended styles and symbols for the portrayal of OS MasterMap data are specified. Since the Hong Kong digital map has own style and symbols in representing geographic features, a XSL stylesheet is need to be specially designed.
After all, a prototype is developed for testing the proposed data model and algorithms and applied for real application. The implementation applies Java script and SVG DOM to make XML application and Web service. Since applications on Window CE platform become popular and increasingly gain market share [Legard 2002] , Window CE platform is chosen for evaluation. There are several components in the system including Web and data server, networking devices and mobile devices such as tablet and pocket PC.
In order to produce the application which can be applied in Hong Kong, Hong Kong base map data and networking data are used and stored in database. The following Figure 5 is the overview of the proposed system.
The prototype is used to demonstrate and test the effectiveness of the proposed data model and algorithms using existing GIS data. The data are stored in database and served through Internet or wireless terminals. As both SVG and GML are XML-based, and conversion from one to the other is simple, GML could be used to handle GIS data and SVG to view and deliver it to mobile users, making one the perfect complement to the other.
Several functions including map rendering, spatial query, and map editing are performed. GML and SVG are served as vector format across the Internet. Data are transferred as vector on the client browser. The browsers allow users to control their view with zoom and pan the same way they do so in GIS software. For example, when the user wants to zoom or pan to a different area of the map, that request is then sent back to the GML data store, where the Web feature server extracts new GML features and send them the style engine for styling. The styled SVG sends to the Web for display again. SVG links can also trigger server events to query database.
The possibility of editing data through Internet is tested. For example, people can digitize the route of their truck by mobile devices. With this function, people can edit and get real time information anytime, anywhere.
The paper describes an ongoing project and addresses the new idea of deploying GIS data by SVG through Internet with open and standard application and design algorithms for online data editing capability. The framework is based on open and non-proprietary standard, which provide ideas of distributing GIS data and application in Hong Kong by using open and standard way.
We have proposed a framework for integrating distributed Web-based GISs by using GML and SVG technologies. The study of generating GML, GML schema, XSL stylesheets and SVG, the methodology of the framework has been examined and developed.
This study was supported by the funds from The Hong Kong Polytechnic University.
XHTML rendition created by gcapaper Web Publisher v2.0, © 2001-3 Schema Software Inc.