Design and implementation of a web-based GIS for the Iranian Roads Information
![]() Saeid Mohsen Kalantari Soltanieh M.Sc. Student, Dept. of Geodesy and Geomatics Eng. K.N. Toosi University of Technology Vali_asr St, Tehran, Iran, P.C. 19697 Tel: +98 21 8789357, Fax: +98 21 877 9476 Email: sm_kalantary@yahoo.com ![]() Ali A. Alesheikh Assistant Professor, Dept. of Geodesy and Geomatics Eng. K.N. Toosi University of Technology Vali_asr St, Tehran, Iran, P.C. 19697 Tel: +98 21 877 0006, Fax: +98 21 877 9476 Email: ali_alesheikh@hotmail.com ![]() Hossein Mohammadi M.Sc. Student, Dept. of Geodesy and Geomatics Eng. K.N. Toosi University of Technology Vali_asr St, Tehran, Iran, P.C. 19697 Tel: +98 21 8786218, Fax: +98 21 877 9476 Email: hoseinmohamady@yahoo.com
Abstract Web-based GIS is an exiting area of application development. Since the earliest days of Internet serving static map has been started. It’s only recently that interactive map has available on the web. This paper contains the steps of developing application programs over the Internet. In this paper we'll see how to set up a web site. This paper indicates new programming developing for creating, customizing, serving and administering Internet mapping application. Developer controls for turning GIS applications into Internet application using DLL's. Hypertext Markup Language (HTML) and JavaScript used for handling and managing client requests and designing user interface for client side. Client uses Hypertext Transfer Protocol to communicate queries and responses across the Internet. Introduction The Internet is a global, public collection of individual networks run jointly by private organizations, universities, and government agencies. (Intranets are private networks that use Internet technology.) The Internet can be viewed as a physical network, which interacts with computers, software, and data on different levels, or tiers. For the purpose of this project tree tiers of Internet interaction are defined as client, middleware, and server. It’ll be discussed where IMS components fit within this framework. Dynamic link libraries Libraries store commonly used procedures. As project executes, it can call procedures from libraries. This technique is especially useful for procedures used by multiple projects; only one copy of the libraries is kept in memory and its procedure can be called by more than one project. Widows use dynamic link library (DLL) to store collection of procedures. The DLL file is the linked to your project when it runs. DLL files have extension of DLL. Windows application routinely uses DLLs. A project can call a function from the libraries and pass arguments if needed. The function is maintained separately from the programs that call it. Therefore changes are made to the internal workings of a function in a dynamic link libraries without having to recode the entire project. Most of the windows DLLs code in the C language and require some use of C syntax. Don't worry if you don't Know C. You only have to pass arguments to the library procedures. Kntudll is the in-process, dynamic link library (. DLL) component that extends your Web server software so that it can manage requests and responses from the map server and administer map services. It manages connections with map services running on one or more map servers. GIS in the web Maybe you have seen numerous web-based mapping, in addition to the map display it is needed to support zoom, pan, identify and measuring as basic function of GIS. For application development it’s needed to use additional and maybe complex functions. Many web sites support various GIS functions and each of them probably has different design strategy. Web GIS application involve a user, client, who contacts a server for some information. Commonly two strategies have been used for web GIS applications. The first extreme is for the server to pass data and mapping application to the client. That is the server supplies the data and the programs, but all GIS functions are carried out on the client side (client side strategy). The second strategy is to have the client indicate the type of map of functions that wishes to run and for the server to pass back the map the client request. Several factors influence the strategy of web GIS. Ease of the use, amount of data, function, attributes, disk space, RAM, site receiving traffic are factors that web GIS strategy is relevant to them. Next section debate about needs of TTO Web GIS for offering a suitable strategy. Need analysis and Methodology The object of the TTO project is to disseminate Iranian road Information through the Internet so that constituent can easily access the data. The requirement analysis step has been performed through interviewing potential users. This steps produced two critical pieces of information:
Selecting suitable software is an important step in a successful implementation. Software was evaluated on functionality and performance, and independent of the hardware and operating system. Web GIS requires specific hardware configuration. Since the volume of transferred data is huge, the speed of Internet connection is vitally important. Most of the data are sent from map server to clients, as such the Send speed has been identified to be more than 128kbs. Based on a pilot project and the experienced gained through similar projects, a Dual Processor computer with 512 MB Ram has been selected for this project. The initial Requirement Analysis contained some applications of a complex nature. However, the majority of initial applications was straightforward, and can be implemented using the basic functionality that is part of the Web GIS software (e.g., display). The more complex applications were not supported by the basic functions of Web GIS but have been programmed. Ease of use, user-friendliness, and reducing the volume of data transfer were the critical issues considered in the development. http://www.iranroads.com shows the user interface that has been programmed using HTML, Visual Basic and Java Script. Before it can be implemented the strategy it must be first understand how web pages work. Data entering via web page Web pages are based on special language known as Hypertext Transfer Language or HTML.HTML is a language that web browsers such as Internet explorer can understand. It’s fairly easy language to understand although advance web pages can be quite complex. In this section, input devices for client such as checkbox, selection list, radio bottom, text box, image bottom, submit bottom and hidden inputs are explored.
![]() Figure 1: Web-GIS User Interface Receiving Client side request In order to build a custom map server application, it is important to understand the client/server transaction process. The following steps outline what happens when a client on the Internet makes a URL request to a server that hosts Kntudll.dll. A client sends a URL over the Internet to IMS Web server. The IP (Internet Protocol) address or the domain name is used to locate the server. http://www.iranroads.com/scripts/Kntudll.dll?name=IranEng&cmd=Map&left=-180&right=180&top=90&bottom=-90&mahdoodeh=ON&city=OFF The Web server receives the URL and passes it on to Kntudll.dll. “Scripts” is an alias on the Web server that points to the location of Kntudll.dll. http://www.iranroads.com/scripts/Kntudll.dll? Kntudll.dll determines which map service to communicate with to answer the request. Each argument and value pair is referred to as a query parameter. The first query parameter in the URL is used to determine which application the client wants to communicate with. The application name immediately follows the“?”. http://www.iranroads.com/scripts/Kntudll.dll?name=IranEng Kntudll.dll then parses the remainder of the URL and passes the arguments and values to the map server application. The parsing occurs between each “&”. http://www.iranroads.com/scripts/Kntudll.dll?name=IranEng&cmd=Map&left=-180&right=180&top=90&bottom=-90&gasstation=ON&city=OFF In the above example, the client is requesting a map (cmd =Map) with the extent defined by the left, right, top and bottom parameters and also the layers (City, gas station) that prefer to be visible. ![]() Figure 2: Client request for shortest path Handle Incoming Requests In this step, a procedure is created to handle incoming requests from Kntudll.dll. Assume, the application is set up to handle URLs for a full extent map such as this one: http://www.iranroads.com/scripts/kntudll.dll?name=IranEng&cmd=Map In this step, code added to handle an incoming URL with map extent parameters. Consider the following URL. http://www.iranroads.com/scripts/kntudll.dll?name=IranEng&cmd=Map&left=-180&right=0&top=90&bottom=0 Once the procedure receives these parameters, two Strings collection objects are created. To retrieve values from the collections, the special function is used. Each value is then used to define the parameter of a rectangle that will be used to set the extent of the map control. Once the extent of the map control has been set, the correct image can be sent back to the client. Once the parameters are extracted and a rectangle is created, the value of the “cmd” argument needs to be determined. If the value is “Map”, map creator function calls HTML creator to return a new map to the client. If “cmd=Map”, but the extent parameters are not provided, a full extent map is returned. If the Left, Right, Top and Bottom values are provided, a new map at that specified extent is created. If “cmd” equals other value, other procedure is called. Responding the client request The code is in place to handle the request, extract the map extent, and create the rectangle that defines the extent of the map control. Now the HTML creator procedure needs to be created to send the appropriate HTML document to the client. In order to do this, a rectangle argument needs to be added to the HTML creator procedure. The rectangle value is then passed to map creating method to set the map extent and export the appropriate image. HTML creator then sends back an HTML document with an image reference to the requesting client. Embedded in the HTML document is a FORM tag. This tag is used in the next section to handle input from the image form element. WriteString() is used to send HTML strings line by line to the browser. The map creating method generates the appropriate image and returns an image reference tag for the HTML document. Each time map creating method is called, a counter form level variable is incremented and used to create a unique image name, unique image names prevent existing images from being overwritten and ensure that each client receives a new map from the server for every transaction. Once the image is generated, a location must be defined where the images can be stored. This location must be accessible for clients via the Internet, which usually means it is outside the firewall. The location where the images are written as c:\inetpub\wwwroot\temp\. The images are initially created in BMP format and then converted to JPEG. This code is set up to delete the BMP with the kill method in VB. The JPEG images after a period will be deleted.
To enable some functionality like zoom, pan, identify, measuring on the server side, a client must send three pieces of information to the server.
Otherwise some functionality like query builder, shortest path, media, changing the view and clear selection need:
It’s important to indicate that if the functionality increased managing the receiving request become difficult. Some parameters are not needed in procedures so it must be deleted from incoming URL. On the time that new request is sending to the server additional parameter eliminate using JavaScript syntaxes. Another out standing point is that it must not be allowed on client request make a mistake in another client request. For overcoming this problem programming architecture is suitable and variables set in correct position. Conclusion and Recommendation This pare presented a method of serving map on the web that used script for passing values from the client to sever side and the client will see only the result of the request. The program that was created can run as an interactive program. Most of GIS common functions and special TTO functions are implemented. The important note is the effect of one client request on the other client result. The managing of this problem is important and difficult specially in database processing oriented functions. Agent oriented managing has emerged as primary research in computer science and can be used to increase effectiveness of users in complex application domain like distributed GIServices and web-GIS. For feature work we proposed GIService consist of a federation of intelligent agents that cooperatively work together in supporting the problem solving activity of the user. They help the user in modeling, processing, analyzing, and solving the specific need at hand. References
| ||||
|
|