A Geographical Information System Based on the Scalable Vector Graphics Standard.

Keywords: GIAS, SVG, GIS, Spatial Analysis, Web, Environmental Applications

Igor Pinheiro de Sales Cabral

Dr. Luiz Marcos Garcia Gonçalves

Mateus Fernandes da Cunha

Dr. Valéria Gonçalves Soares

Marcela Gonçalves dos Santos


This paper presents two versions of a Geographical Information Analysis System (GIAS): GIAS 1.0 and GIAS Web, developed for analysis of geographical information applied to specific regions in the State of Rio Grande do Norte, Brazil. GIAS 1.0 is a stand-alone system developed using conventional graphical rendering techniques for local application. We describe its internal structure, including the database, mechanisms for information extraction, the data treatment, and other implementation and maintenance aspects. GIAS Web expands on GIAS 1.0 by developing functions for its use on the Web through the use of the Scalable Vector Graphics (SVG) standard, suitable for Web based GIS development. We present and discuss several aspects, comparing both approaches. Applications of GIAS 1.0 and GIAS Web to industrialized and environmental areas are presented.

Table of Contents

     2.1 Description of GIAS 1.0
          2.1.1 Using Layers
          2.1.2 Output
     2.2 Description of GIAS Web
          2.2.1 Methodology and Proposed System
          2.2.2 System Operation
     2.3 Connection between GIAS 1.0 and GIAS Web
     2.4 Comparative analysis - GIAS 1.0 x GIAS Web
3. Conclusion and perspectives


In this work we present two versions of GIAS, a system for analysis of geographical information that were developed and applied to a specific case study. GIAS aims to determine the correlation among different information, collected from different sources, concerning a unique park of microindustries located at a specific geographic region. The first version, GIAS 1.0, was developed using conventional techniques, and the second one, GIAS Web, uses the SVG standard. The main characteristics of both systems, such as storage resources, management, manipulation and analysis of geographic information are presented. Given a sample of economical data about micro-industries within a city, GIAS can calculate its correlation with aspects of urban space reorganization. GIAS Web uses SVG for mapping and conversion of georeferenced geographical entities, and also supports development of small systems based on MySQL Database. We prior used SVG in the development of applications for Web, in the management of geographical areas in Spain (CABRAL, 2003a) and Germany (CABRAL, 2003b). In those works, SVG demonstrate to be a powerful tool, besides a challenging interface for graphics programming in Web. So we have started a new, more complete research work, including development and implementation of a complete test case, using similar concepts, that is presented in this paper. By creating GIAS Web, we basically propose an enhancement in GIAS 1.0 which makes it suitable to several other geographical analyses, eases its use, allows fast answers and lowers its implementation and maintenance costs, besides widening its use. As a result, currently, GIAS Web is being applied to management of a pilot environmental protection area in Brazilian Northeastern sea region. This experiment demonstrates its applicability to monitoring other environmental projects currently carried out at Federal University of Rio Grande do Norte.


The goal of this case study was to develop a geographical information system to analyze the urban spatial reorganization of the Caicó-RN city. The users of GIAS are mainly researchers of the Geography Department of Federal University of Rio Grande do Norte. At the beginning of the study GIAS’s users wanted a system capable of importing a city map, that allow them to analyze, through graphic tools, the geography of a micro-industrial park of cap, hat, and outfit industries. Low cost was the main issue considered for the development of GIAS.

2.1 Description of GIAS 1.0

GIAS 1.0 was developed using the software platform Borland Delphi 6.0 with the purpose of being a stand-alone system able to support the requirements and requisitions for analysis in the case study. Design solutions related to the handling of layers and output are explained below.

2.1.1 Using Layers

Most GIS systems allow separation geographical features in logical categories called map layers. Each layer usually contains information from a single geographical feature or a small group of related features. Data is separated in layers, thus they can be manipulated and spatially analyzed alone or combined with other layers. The ability of separating information in layers and the combination with other layers of information are some reasons for which GIS offers great analytic power (CONFORD, 2003). Layers can be used to create composed maps showing a variety of data, each one incrementing information about the region in study. Logically, when we separate data in layers, we make easier to handle and use the database and its products. The Figure 1 shows examples of layers.


Figure 1: Fig. 1 - System with layers.

GIAS 1.0 has the ability of searching in different information plans, so that each plan has its own caption to specify cap, hat, and outfit industries in the area of study. Sample data collected from some Brazilian government agencies, mainly the Brazilian Agency of Sponsoring Service for Micro and Medium Enterprises (SEBRAE), the Institute for Economical and Environmental Development of Rio Grande do Norte (IDEMA), the Federation of Industries of Rio Grande do Norte (FIERN), were handled by GIAS 1.0 to compare the industries’ growth rates, urban distribution, and reliability of data collected. By using GIAS 1.0 a visual analysis of thematic maps could be carried out in several ways. For instance, one can try simultaneous visualization of SEBRAE (small and micro enterprises) and FIERN (federated industries) data; only FIERN data; or only the city urban space; etc. Simplicity of the user interface was a tight requirement, and the creation, edition and exclusion of each layer can be accomplished dynamically through a menu (using button options) presented in a form. And, each layer’s visualization can be done through the checkbox located in the corresponding layer (see Figure 2). Each information plan possesses a caption (see Figure 3) representing the service type and industry.


Figure 2: Fig. 2 - Layers management.


Figure 3: Fig. 3 - Layers caption.

2.1.2 Output

A GIS software has as its main purpose the display and analysis, in several and qualitative ways, of data which was feed into its database. The effectiveness of a GIS is related to the way such information is extracted. In GIAS 1.0, we implemented four mechanisms for extraction of information: graphics-based, sampling statistics-based, dynamical SQL-based (Structure Query Language), and thematic map-based. These four components make GIAS 1.0 versatile system, and thus presenting several possibilities of spatial analysis. Charts are linked to information queries inserted in the database giving answers in a way that users have a better perspective of the spatial analysis. In this case study, we developed eight possibilities for the types of graphics according to the application data used:

• employment in a region;

• formal, informal and mixed employment in a region;

• value of production in a region;

• modernization indicators;

• origin of the product buyers and raw material;

Information can also be extracted from a relational database through SQL procedures, in which the user defines appropriate relationships for the query. Then, a control program uses relational algebra methods to build new tables. The main advantage of the above stated approach, according to BURROUGH (1999), is that the queries can be formulated using rules based on boolean logic and mathematical operations. They allow different types of data to be searched, combined and compared. Among disadvantages, the operations involve sequential searches in the files in order to find the right data that satisfy the specified relationships, spending substantial time when data volume is large. GIAS 1.0 has a practical mode for information extraction using SQL. A data entry form called "consult" disposes several labeled buttons with their functions displayed, making more agile, dynamic, and easy to construct requests such as query instructions, addition, alteration and removal of data. The “consult” form is comprehensive and overcomes the cognitive burden of famous GIS tools that treat the input of SQL instruction in manual ways. An exception is the software Arcview that has a similar system, however with smaller number of functions and also without the possibility of data treatment through alteration, removal and addition. Figure 4 illustrates an example of the feature described above where the user wants to know how many cap industries are installed in the neighborhood cities. This example is based on sample data collected by field work (CodView = 1).


Figure 4: Fig. 4 - SQL instruction.

Use of statistical sampling in GIAS 1.0 makes possible extraction of several information types as quantity of industries, used labor, industries installed in specific time periods, family employment and industry classification (Figure 5). It also makes possible to calculate the total value of production from certain area previously selected in the map. Such functionality becomes quite useful when the user needs information from a specific city, neighborhood, block, etc. Properties of a selected area can be easily returned.


Figure 5: Fig. 5 – Statistic.

The use of thematic maps as an output mechanism is common in most GIS and denotes the elements that are in study with their respective positions, visually represented in the virtual world. For example, starting from information contained in the database, the system can generate images corresponding to the industries in a map that initially contains only city blocks. The images are associated to a specific location in the map. We can have thematic maps with different representations just changing among the visible and hidden layers that are available (see Figure 6).


Figure 6: Fig. 6 – Thematic map.

2.2 Description of GIAS Web

After development of GIAS 1.0 we noticed that it would be very suitable to support users not just on local computers, but also on computers connected through the Internet. GIAS Web was then conceived to give to the data higher accessibility. The main goals behind the development of GIAS Web are:

• supply a set of tools with which the user is able to work with data in long distance, independently whether GIAS 1.0 being running on a local machine;

• development of functions to accomplish analyses using thematic maps. For example: the person responsible for data collection may store information in the database immediately after acquisition of answers from a questionnaire, and, in real time, GIAS makes the data available to users in another places, using GIAS 1.0 or GIAS Web.

2.2.1 Methodology and Proposed System

The architectural scheme of the proposed system is shown on Figures 7 and 8. To better understand the problem, we defined a study case and we will describe it following an overview of the system. The database contains information on how the internal structures of the region are organized. In other words, it contains information about the real location of the entire region in study as well as the presentable geometric pictures of the region. Data may not be represented as a unique structure, making, for example, an object be broken in several parts with distinct identifiers. We better address this problem in a recent work (CABRAL et al., 2005). SVG allows the representation of three kind of graphic objects: vector shapes (defined by straight lines and curves), image and text. Basically, vector objects has information about curves and lines of an image, instead of information about the pixels that compose the same. All graphic objects (vector, image and text) can be grouped, transformed and composed in objects previously rendered (SAMPAIO, 2004). In the study case devised in this work, the three types of available graphic objects and the technique of grouping in layers are used, so it is possible to have, in a certain domain, elements that have similar characteristics. For example, a matrix shape representing an image of a given region can be done, by way of a layer, to make possible a better visual representation of it.


Figure 7: Fig. 7 - Components of the system

In Figure 7, module “Data Upload” is implemented to be responsible for exchanges and manipulation of data over the Web. This component was developed using JavaScript language and provides an API for access to MySQL database trough the Internet. Component “Map Server” is implemented in order to extract information from the database and to generate data in SVG using that information, where interaction functions in script language are linked.


Figure 8: Fig. 8 - Creation of the SVG file.

2.2.2 System Operation

Operation of GIS for dynamic map generation in the Web with SVG can be summarized, as seen in Figure 8, by the following steps:

I. Initially, a Web page, structured in PHP language (Hypertext Preprocessor), request to the database, trough commands in SQL standard, the attributes of polygons that are located in the visualization area and that are in agreement with the kind of layer to be exhibited.

II. Database returns the requisition with the map components.

III. The PHP page dynamically creates the SVG file according to data acquired from the database, as shows the piece of code in Figure 9. Some of the instructions that are shown do not correspond exactly to the original ones. They were changed or else edited only to better exemplify the context.


Figure 9: Fig. 9 - Part of code for file creation

IV. The generated SVG file is nothing more than the map of the chosen region with the possibility to treat events related to each created polygon. Such file is inserted on the PHP page trough use of an embed function (see Figure 10) and thus can be shown to the user.


Figure 10: Fig. 10 - embed function

2.3 Connection between GIAS 1.0 and GIAS Web

During implementation of GIAS Web, two important issues appear. First one is how can data be reusable and how data could be converted to the Web system keeping its real places between layers? Second, how can a connection among these two systems be accomplished for making possible that any alteration made by the GIAS Web can effect the GIAS 1.0 and also the opposite? To answer these questions and solve the related problems, we made small modifications in the systems, for using only one database. Therefore, in the implementation, only one database supplies relative information about the positioning and the industry data for GIAS 1.0 and GIAS Web, in a simultaneous manner (see Figure 11).


Figure 11: Fig. 11 - Database connection

2.4 Comparative analysis - GIAS 1.0 x GIAS Web

We first provide a discussion about what is the best method for GIS development, if SVG or Delphi. In SVG standard, maps are represented in vector format while in Borland Delphi they are in raster format. Graphics in vector format have a better structure of files, becoming possible to perform pan, zooming and other operations with better quality. Figure 6 represents a screen shot of GIAS 1.0 while Figure 12 represents a same region in GIAS Web. Comparing the two images, it can be visually observed that there is a larger accuracy consequently better representation, in this case, of the map in vector format (GIAS Web). This makes possible not only to work with industries but also with map information, such as: lake, blocks, streets, avenues and so on. Also, we are currently using this system to show environmental data sampled from a small portion of the Protected Area of Coral Reef of Rio Grande do Norte (APARC-RN) and it has proven to be useful (see Figure 13). Another point that must be taken into account is about the relation to the pattern applied in the first version of the system that was maintained in the subsequent project phase: the icons for industry type representation continue with the same graphic appearance, the structure of the objects, etc., in SVG format. Based on the above discussion, we present advantages and disadvantages of the two developed GIS platforms which were implemented using different platforms and languages. Several analyses were performed during implementation and system execution phases.

• Advantages of GIAS 1.0:

I. Countless libraries coming from Delphi that can be used for map treatment and manipulation;

II. Better tools for graphics use;

III. Better information security.

• Disadvantages of GIAS 1.0:

I. User is limited to use the system that is contained in a local machine;

II. Unique programming language: PASCAL, limiting the accomplishment of necessary methods not supported by the language;

III. Higher cost, once it depends on the software Delphi for development.

• Advantages of GIAS Web:

I. Larger accessibility of the system; the whole world can access it through the internet;

II. Interaction among several programming and script languages in the same form;

III. Quality of the image is not affected if increased or reduced.

• Disadvantages of GIAS Web:

I. Few available libraries;

II. Data safety hazard, due to alterations by invasions or manipulation by users not authorized.


Figure 12: Fig. 12 - GIAS Web

3. Conclusion and perspectives

Use of SVG to develop geographical information allows easier access to data and with less cost. That is, the format SVG is based on XML, consequently free to be used by several users independent of platforms, software, and hardware. As it is a standard format, more and more applications will be able to give support to SVG, turning the choice more variable and cheaper. We can not generalize that SVG format is better in any case, however we conclude that it could be better applied in the specific case of study, involving relational data of industries in Mossoró, RN, Brazil and also in a small portion of Maracajaú Coral Reef Protected Area. In the last case, GIAS Web was used to map underwater structures that were classified in a previous work, FARIAS et al.(2004), in an area of about 300x400 meters (see Figure 13). We further intend to extend the developed GIAS Web system to the entire Coral Reef region, which includes three regions of 6 x 3 kilometers, then allowing environmental official organisms to use it for analysis in these regions.


Figure 13: Fig. 13 - Map from Maracajaú Coral Reef region published in the Web using SVG


BORILLO, R. SVG: gráficos e interactividad en la Web. Available in: <http://www.mailxmail.com/curso/informatica/svg>. Accessed: Oct. 2004. BURROUGH, P.A. Matching spatial databases and quantitative models in land resource assessment. Soil Use and Management, 5, 3-8.1999 CABRAL, I. P. S. Work report about SVG. Ayuntamiento de Torremolinos, Spain. Jul. 2003a. CABRAL, I. P. S. Work report about Web Applications. Institut für Ökologie und Umweltschutz, Germany. Oct. 2003b. CABRAL, I. P. S. et al.. SVG Standard for Environmental Applications. XXII international Cartographic Conference. Spain. 2005. CORNFORD, D. Geographic Information Systems. Aston University , Kingdom, 2003. COSTA, M. F. Cadeira de Sistemas Multimédia. Available in: <http://student.dei.uc.pt/~mcosta/smm.html>. Accessed: Jan. 2004. FARIAS, R.; GONÇALVES, L. Using Small Format Aerial Photos to Map Coral Reefs in Rio Grande do Norte, Brazil. ICRA 2004 – International Conference on Robotics and Automation. USA. May 2004. FRITZE, A. Mozilla SVG Project. Available in: <http://www.mozilla.org/projects/svg/>. Accessed: Oct. 2004. NEUMANN, A.; WINTER, A. M. Vector-based Web Cartography: Enabler SVG. Available in: <http://www.carto.net/papers/svg/index_e.shtml>. Accessed: Oct. 2004. SAMPAIO, F. N. A. Visualizador de Mapas para PDAs em SVG. Available in: <http://bragatel.pt/ns000660/nasf/estagio.html#SVG>. Accessed: Feb. 2004.

XHTML rendition made possible by SchemaSoft's Document Interpreter™ technology.