Converting raster images to XML and SVG.

The potential of XML - encoded images and SVG image files in Geomatics.

Byron Antoniou, Lysandros Tsoulos

Cartography Laboratory, Faculty of Rural and Surveying Engineering

National Technical University of Athens

H. Polytechniou 9, 157 80 Zographou Campus, Athens, Greece

tel: +30 -210-7722730 fax: +30-210-7722734



The advent of XML - based technologies has surpassed even the expectations of the most imaginative users. New, revolutionary ideas are emerging for the storage, sharing and display of data. In addition, new formats have been created for almost all kinds of data, applications and knowledge domains. A considerable - and still growing - number of specifications have already been issued from international organizations (W3C and OGC) in order to provide every possible assistance to the user community, to meet their needs and promote their efforts.

Watching this frenzy trend of transforming everything into XML-based structures, one thing seems really odd: raster images. Languages like HTML and SVG do not seem to bother about having such an unlike structural feature in their environment. Instead, both of them provide means (i.e., img or image elements) in order to incorporate raster images in text based files, usually with an inline reference. From a more objective point of view, somebody would have thought of raster formats as an obstacle. The existing specifications instead of dealing with this problem, bypassed it. Users followed this idea and continue to treat raster formats more or less like a requisite tool for their work. The blunt truth is that there is nothing common between XML-based structures and raster images. Raster image encoding is neither text based nor human readable. It cannot be parsed, checked for validity or well forming. Moreover, the raster image content has almost no flexibility (apart from resizing) in an XML-based environment, since pixel values are well locked inside the raster formats.

This paper deals with the conversion of raster images into XML and SVG files. Each one of these two perspectives has a different objective. Converting an image from raster format into an XML file enables the user to get the information residing in the image in a text format, in accordance with international standards. The user can then select, read and manipulate every single part of the XML file or the file as a whole, in a number of ways in accordance with the application at hand. This is the starting point for classification, statistical processing, filtering or the implementation of other algorithms with the use of XML technology. Issues like the storage and sharing of image information may acquire a new meaning. Converting an image from raster to SVG is even more exciting. An SVG image file enjoys all the above-mentioned advantages and in addition the user can see the effect of every change imposed on it. This leads to the last issue that this paper deals with, Geomatics. Nowadays, Geomatics is a sector that depends on images to such an extend that one could tell that images are the most valuable source for collecting geographic data. Feature extraction from a raster image is a very common task for geographical organizations around the world. Through the combination of image information and SVG code instead of vector data, digitization could produce scalable vector data (i.e., <point>, <line>, <polyline>, <polygon> etc. elements) or GML (Geography Markup Language) encoded data.

Up to now it is ready a program written in Visual Basic which can perform the conversion from raster images to XML and SVG files. The ongoing efforts concentrate on:

a) photogrammetric applications b) image processing c) digitizing and export to GML.