Home Articles Generating online map for Skudai using the Minnesota Map Server

Generating online map for Skudai using the Minnesota Map Server

Boonheng Beh and Alias Abdul Rahman
Department of Geoinformatic, Universiti Teknologi Malaysia, 81310 UTM
Skudai, Johor, Malaysia.
[email protected]

1. Introduction
World Wide Web (WWW) technology helps to disseminate geographic information globally via web-based GIS. There are a number of web-based GIS in the market, either commercial-of-the-shelf (C.O.T.S) or free map servers. Examples of commercial products like ArcIMS (from ESRI), MapGuide (from Integraph), and MapXtream (from MapInfo). Free map servers such as Minnesota Map Server. To implement an Internet-based GIS, a map server is required as a middleware program in retrieving data from the database (Alias Abdul Rahman, 2002). Obviously, in order to use these commercial map servers, users have to purchase the map server software and maintenance fee as well. On the other hand, free map servers offer Internet mapping for small-budget users. Besides the Minnesota Map Server, other free map servers are GeoTools, JShape, iMapper, and MapIT. This project attempts to generate an online map for Skudai by using the Minnesota Map Server and investigate its mapping capability.

This paper describes the process of implementing the Skudai online map. In section 2, we present the study area and scope of this project. We briefly introduce the system architecture of the Minnesota Map Server and its content in section 3. Section 4 presents the online mapping implementation. Finally, we discuss some good and drawbacks of the map server in section 5.

2. The study area and scope
The scope of this study is to utilize the free map server (Minnesota Map Server) for online mapping of Skudai area and with the following hardware and software:

  • Pentium 3 Personal computer (PC),
  • Memory (RAM): 130,352 Mhz RAM,
  • Microsoft Windows 2000 server OS,
  • Web Server: Internet Information Service (IIS), and
  • Map Server: Mapserv version 3.6.3

The datasets of Skudai area comes from the Jabatan Perancangan Bandar dan Desa Negeri Johor (JPBD) that is the Department of Town Planning in Johor. Other attribute data comes from the Majlis Perbandaran Johor Bahru Tengah (MPJBT).

3. The Minnesota Map Server
The Minnesota Map Server was originally developed as free map server software containing various freeware systems such as Shapelib, FreeType, Proj.4, libTIFF and etc. It runs under Windows and UNIX operating systems and supports various formats both raster and vector datasets. In general, it relies on the CGI mode program, Map file and Template file. Parts of the following text are based on available online resources.

3.1 The CGI mode program
The CGI mode program of Minnesota Map Server is called Mapserv. The current version of Mapserv program is 3.6.3. It is a component to store all freeware systems. According to Richard W. (2003), the Map Server executable is called directly from CGI mode, and renders the entire HTML page based on parameters passed in the query string, and static configuration files stored on the web server.

3.2 The Map file
The Map file is presented as ASCII file. It configures basic information for Minnesota Map Server mechanism such as map’s unit, projection and the path of the data. Besides, it is used for object definition. Every mechanism is considered as object in Map file like map object, label object, layer object, projection object, legend object, class object and so forth. Each object comprises several parameters. Nevertheless, it is not necessary to include every object in Map file. Only the required object needs to be defined.

3.3 The Template file
For rendering image on user’s web browser, the Template file is required. Basically, the Template file is an HTML file with specially tagged replaceable parameters designated with square brackets (Richard, 2002). When the map server received queries from users, it reads the Template file and generates map objects to reply to the users. The parameters in the square brackets would be replaced by the exact path of the output file.

3.4 The client- server architecture

Figure 1. System Architecture of web based GIS.
Figure 1 shows the overview of client-server architecture. It consists of the client side and server side. In general, the whole architecture is divided into three domains, namely, first tier, second tier and third tier. The first tier comprises users and the web browsers that are located at the client side. The second tier is related to the web processing which contains the web server, user interface and map server. Finally, the third tier is the database tier containing spatial and attributes data. Apparently, the Minnesota Map Server is located in the second tier.

In order to access to the Skudai online map, users need web browser like Internet Explore, Netscape Communicator or Opera. With the correct Universal Resources Locator (URL), users can access to the web site of Skudai online map. Indeed, the web server will search the related web site according to the URL. However, before displaying the interface, the Minnesota map server will retrieve the spatial data from the database. A complete interface of the Skudai online map includes spatial data display.

4. Skudai Online Map Implementation
To generate the Skudai online map, a common approach is to construct two components, namely, (a) GIS database component, and (b) web component.

4.1 GIS database component
Internet based geographic data services involve spatial and non-spatial (attribute) data management (Honda et al, 2002). The construction of GIS database component includes data collection, data processing and database design. Indeed, a GIS database requires good design in order to manage data structure in the database. Figure 2 illustrates the entire process of GIS database management for this project.

Figure 2. GIS database development.
The spatial data that acquired from the Jabatan Perancangan Bandar dan Desa (JPBD) is in DXF format. Data editing need to be done in order to ensure the completeness of the data that is by using AutoCAD MAP 2000i. The data then converted into coverage for the typical data processing like clean, build topology and projection by using available tools in ArcToolBox of ArcGIS 8.1. Finally, the data (in shape file) is exported to ArcView 3.1 for attribute data.

4.2 Web component
The homepage of this project is a web interface that enables online access to the online map. It is a typical HTML page that contains the link to the Skudai online map as well as links to the Minnesota Map Server, University Technology Malaysia and MPJBT homepages. We developed the homepage by using the Microsoft FrontPage 2002. Figure 3 shows the structure of the homepage and Figure 4 shows the homepage of Skudai online map with the following URL address: https://beh/SKUDAI/MAINPAGE.htm.

Once the homepage is developed, then next step is to implement the online map. Initially the MapServer CGI program (mapserv.exe) needs to be installed and can be downloaded from the Minnesota map server homepage. The installation itself takes a two-step process. Firstly, the program needs to be placed under the web accessible directory. For IIS, Inetpub is a web accessible directory and the program is installed in Scripts, which is a sub- directory of Inetpub (e.g. d:InetpubScipts). Secondly, the ‘espg’ file is placed into the created PROJ folder. This file is needed for the map projection definition.

Figure 3. The structure of homepage.

Figure 4. The homepage of Skudai online map
Besides the Mapserv program, the Minnesota Map Server application requests GIS data and MapServer-specific files, namely, Map file and HTML template files. It is important to place them properly in the web accessible directory. Error will appear easily if the files are in the wrong path. Figure 5 illustrates the directory structure of the online map. In this case, the folder name of the Skudai online map is “teskSk” and it is stored in the Scripts subdirectory. Apart from that, a “tmp” folder is also created in the Script subdirectory that stores output files from the map server. The folder must allow web users to write on it.

Figure 5. The directory structure of the online map.
As the GIS data is stored in the “testSk” folder, it needs to be defined in the MapServer-specific file, namely, the Map file. In fact, this file defines every object for the online map, including data layer, scalebar, map, legend, projection and web object. The objective of object definition is to define how the map will look like and be presented. Here some cartographic aspects need to be considered by the developer. The definition of each object is different and some examples are illustrated in Figure 6.

Figure 6. Examples of object definition.
The defined objects such as map, legend and scalebar are presented on the online map interface. But, the Map file is not used for the designing of the interface, the Template files are used instead. The template files are used for the following tasks, namely, designing the interface, generating mapping tools and conducting query. HTML code is the common stuffs in the Template files (i.e. for designing the interface). Besides HTML code, the Minnesota map server also supports other programming languages such as JavaScript for generating mapping tools. To conduct query with the Template file, every layer is required to have a particular template file. This template file comprises attribute table and perhaps the query map display. The attribute table contains columns that carry the same as the columns in the DBF file. In addition, the path of the template file is also determined in the Map file. Consequently, the template file can be linked to the DBF file for the attributes data retrieval purposes.

Both Map file and Template file are developed and edited using Notepad. Web browser such as Internet Explorer or Netscape Communicator could be used to compile the files and view the results. The Skudai online map is presented in Figure 7.

Figure 7. Skudai online map.

5.0 Testing the Skudai online map
To investigate the accessibility and flexibility of the map server, two experiments have been carried out via intranet. Time is recorded for every test. Both experiments are repeated for different number of users. In the first experiment, the accessibility of the map server is tested that is by the number of users that can access the map concurrently. According to Table 1, three users visited the online map concurrently within 1 second. Within 3 seconds, 10 users visited the online map successfully. The map server can handle up to 15 users concurrently within 4 seconds.

In the second experiment (i.e. to test the flexibility), users run the map functions provided in the online map. Different users do different functions e.g. queries. The result shows similar trend as the first experiment (see Table 2).
Table 1. The result of experiment 1.

Table 2. The result of experiment 2.

6.0 Discussion
We discovered that the installation of the map server software is simple but it does not have graphic interface module as usually available in the commercial packages. So here, we used the Map file for the interfacing purposes and is not user-friendly.

The file placement is another crucial issue in this exercise and need to be done carefully. The files, data and the Mapserv program do not work independently and have to make sure they are connected properly. Figure 8 illustrates the entire file structure of map server application. Typical error caused by incorrect file structure and placement is that the map could not be displayed on the interface.

Figure 8. File placement of map server application.
Generally, the query string is shown in the address bar of the web browser once the online map is generated and presented as part of the URL which follows the question mark. A complete query string can be constructed for the following elements:

  • Map file determination
  • Name of the included data layers
  • Zoom size
  • Map web image path and URL

Table 3 shows an example of query string with its description.
Table 3. An example of query string with its description.

According to Table 1 and Table 2, it is worth mentioning that the map server is flexible and accessible for multi user requirements concurrently. Richard W. (2002) indicated that the map server distinguished itself on many fronts, particularly its speed and flexibility. The time of processing depends on the amount of users as shown in Figure 9. If more users access the online map concurrently, the map server requires longer processing time.

Figure 9. The graph shows amount of users versus time.

7.0 Conclusion
In this paper we reported our process of implementing the Skudai online map using the free map server (Minnesota Map Server). The implementation progress is observed and the capability of the map server is tested in two experiments. The entire process online map generation involves three basic elements of the map server, namely, the Mapserv program, the Map file and the Template file. These elements are inter-dependent. The Mapserv program acts as the coordinator in order to receive users’ queries and retrieve data from the database. Therefore, these elements have been linked to each other by determining the paths of files in the Map file and Template files.

No graphic user interface (GUI) is offered by the map server unlike the C.O.T.S map servers that provides GUI to users. Thus, initially, the process of implementing web application using this map server is inconvenient for the beginners. Basic knowledge of HTML and Javascript programming therefore is required in order to utilize the map server.

Nevertheless, the map server offers as an alternative for online mapping and could be used for cheap and rapid dissemination of spatial information.

The authors would like to thank the Jabatan Perancangan Bandar dan Desa (JPBD) and Majlis Perbandaran Johor Bahru Tengah (MPJBT), Johor for Skudai datasets. We also grateful to Mr. Stephen Lime of Minnesota Department of Natural Resources, USA and Richard.W of Greenwood Mapping Inc, USA for their constructive suggestions.