AWERProcedia Information Technology & Computer Science 1 (2012) 1212-1217 2 nd World Conference on Information Technology (WCIT-2011) Use of Google Layer, OGR2Layer and MapServer Export in QGIS Web mapping Dejan Rančid a *, Enes Sukid b a Dejan Rančid is with the Faculty of Electronic Engineering, Aleksandra Medvedeva 14, 18000 Nis, Serbia b Enes Sukid is PhD student at the Faculty of Electronic Engineering, Aleksandra Medvedeva 14, 18000 Nis, Serbia, Abstract Geographic information systems have had a long journey of development starting from the first systems for digital mapping to the modern application of GIS in solving various spatial problems. Current agreements and research in the field of Open GIS have led to overcoming major problems related to the proprietary nature of the system and data transfer. OGC (Open GIS Consortium) has had an important role in achieving this. Open GIS community has made standardizatio n and increased availability of GIS technology possible, especially through open source software, such as QGIS software package. Its use on the Internet, through GIS techniques for numerous interactive map interfaces, led to the development of separate GIS Internet service. Various open source plug-ins have contributed to the improvement of GIS and the way it is used. Google Layer, OGR2Layer and Map Server Export are some of the important tools reviewed in this paper which are very useful for web mapping. Keywords: GIS, QGIS, Google Layer, OGR2Layer, MapServer, WMS; Selection and peer review under responsibility of Prof. Dr. Hafize Keser. 2012 Academic World Education & Research Center. All rights reserved. 1. Introduction GIS technology has been continuously developing and achieved its maturity during the past few years. Its development has been affected in different ways, including the general progress of information technologies * ADDRESS FOR CORRESPONDENCE: Enes, Sukid, Faculty of Electronic Engineering, Aleksandra Medvedeva 14, 18000 Nis, Serbia E-mail address: esukic @yahoo.com/ Tel.: +381-60-625-0-725
along with some changes initiated in the GIS industry itself. The first versions of GIS were highly demanding and required high level of training, while the present GIS development goes towards desktop software for non - technical users. Thanks to the new GIS technologies, it is possible to use GIS data over the Internet so that the user is able to ask for different information in the geographic information database. OGC (Open GIS Consortium) played a major role in creating a standardized format among different GIS applications. It also helped create high quality competitive open source software, with QGIS leading the field with its numerous upgrades. OGC helped develop Map Server which contributed to the GIS technology become present on the Internet through various applications. This paper reviews QGIS plug-ins which are very useful in web mapping. Google layer uses maps from the Internet service Google Maps which further uses already made maps and adds vector layers that we have created in QGIS. OGR2 layer uses Open Street Map services to display the projected map with QGIS vector elements in a Web browser. It is very useful for web developers, because it uses simple tools to create its own html code that Open Street Map Servers and its database use to display a desired map. All of this will be reviewed in details in this paper. Map Server Export sends QGIS map to the desired server located on the Internet or in a local host environment. This way it secures a link which can be used on websites and which leads to a desired map. With help of Open layer tool it is possible to add many components, such as zoom and hand tool, adjustment of different map vector layers. Numerous add-ons that make work with maps a lot easier can be installed through QGIS Python Plug-ins. 2. Related Work QGIS is one of the most important free open source pieces of software which have become even competitors to commercial GIS solutions, such as products of ESRI and Auto Desk Company. It is possible to visualize, manage, edit, analyze data, and compose printable maps. Two unique features of QGIS include the linkage (expendable) to GRASS functionalities and the support of DWG file formats. QGIS supports basic ESRI shape files and coverage formats [1]. Also, provides access to data from external sources by using the WMS and WFS standards. An attractive feature for other programmers is the option to write QGIS plug-ins in Python to add custom functionality [2]. Presently, there are about 170 plug-ins within standardized QGIS and 3 rd party repositories which largely enrich the capabilities of QGIS software. Rapid development of the Internet was an additional stimulus to creating and using maps. The opportunities brought by the development of hardware and software have changed scientific and social needs for georeferencing. Web Map services not only provide a dynamical display of data but also enable interaction with the user [3], as evidenced by numerous maps related services, such as Google Earth, Virtual Earth, MapQuest, Google Maps, etc. Beside these public services, specific WMS can be created within GIS and used for problem solving at certain locations. Beside 2D display of maps, many solutions with 3D capabilities of modeling objects have been introduced with the purpose of better visualization of specific problems that need to be solved through spatial examination using GIS tool, so-called 3D GIS [4]. Recently, Free and Open Source Geospatial Software has made an enormous breakthrough, as evidenced by the fact that website freegis.com has more than 300 GIS solutions, plug-ins and projects. [5] The establishment of OSGeo Foundation by several GIS user communities in 2006 put FOS GIS to a higher level through sponsorship of various GIS projects, conferences and OSGeo journal.[6] The following table lists major advantages and disadvantages of FOS GIS in comparison with the commercial solutions: 1213
Table 1. Differences between proprietary GIS and FOS GIS software. Advantages Proprietary software Free and open source software Disadvantages 3. QGIS Plugins Software price and maintenance fees, Training costs, Maintenance tied to specific licensed companies, Customised development can be difficult due to available resources of vendors, Support only as long as software company exists. Warranty of developing company on product (holds for every company), Components should work together, Usually well documented software Training costs. No licence fees, Unrestricted use (e.g., no limits for the number of installations), No update enforcement Support of open standards, Customisation at API level and below. As we have mentioned before, there are about 170 plug-ins for QGIS which more or less make work easier. All plug-ins are created in Python and it is possible to additionally modify and adjust them according to one s needs. 3.1. Google Layer Google Layer uses Google maps to which we can add predefined QGIS layers. Google Layer can display maps in these modes: Road Map Mobile Map Terrain Map Satellite Hybrid Before uploading a Google map, we need to define CRS (Coordinate Reference System) in Google Mercator EPSG:900913. For the purposes of this paper we did hydro system of Serbia as shown in Figure 1.(a) (left). After adjusting a desired map mode, Google Layer, which projected a map over already existing layers of the hydro map, is activated. It is worth mentioning that it is possible to make highly detailed maps us ing zoom in 1214
Fig 1. (a) Hidro system Srbije, (b) Hidro System Srbije u koji je ubacena Google Mapa combination with Google Layer tool, so that with the help of appropriate Google Map mode [7] we can display different locations with detailed georeferencing. We can use these maps for spatial problem solving or on the Internet. 3.2. OGR2Layer OGR2Layer relies on free OpenStreetMap display of maps. [8] It is possible to adjust which elements of OpenStreetMap API the final map will have through the combination of layers that we have already created in QGIS georeferencing. The most important control of OpenStreetMap is panzoombar (Figure 2.): Fig 2. OpenStreetMap control For the purposes of this paper, we have created a simple vector layer that will mark the location of Electronic Engineering Faculty in Nis. With the help of OGR2Layer plug-in, the layer is implemented through OpenStreetMap service and exported into an HTML file which can be directly used in a web browser (Figure 3). It is interesting that these locations can be displayed in a far more zoomed out map so that we can easily get t o the desired location by classic zoom mode or double-click. 1215
Figure 3. QGIS Electronic Engineering layer added directly to the OpenStreetMap service 3.3. MapServerExport MapServer creates map images from spatial information stored in digital format. It can handle both vector and raster date. MapServer can render over 20 different vector data formats [9]. MapServer is CGI software that works in the background of a Web server. When a request is sent to MapServer, it uses information forwarded through URL and information from configuration map database and generates a raster map. We can send requests for additional cartographic information, such as map key, scaling and other values forwarded as CGI variables. MapServerExport is a useful QGIS plug-in which enables us to export QGIS projects into a map file. Furthermore, this file can be forwarded to WebMapServer which furrther displays it on a desired web page. We can add additional options to such maps, like zooming, map key, etc.. In order to adjust exported map in MapServer Export plug-in, we need to adjust the size of map, raster format the map will be displayed in as well as the precise MapServer location, which can be found in installed web browser. Afterwards, it is possible to use this link to display the map: http://localhost/cgi-bin/mapserv.exe?map=ns.map&layers=all&mode=map Fig 4. (a) MapServer Export panel, (b) Link displayed in a web browser 1216
4. Conclusion We ve given a short review of the current state of GIS market, with clear indications that Free and Open source GIS have become important players in all fields of GIS. We emphasized the incredible capabilities to upgrade and adjust these software solutions. Web mapping has indeed become extremely popular Web service through public map services and possibility to create individual services with the help of GIS tools. As it is has been shown in this paper, QGIS software solution is an interesting tool for all kinds of GIS mapping. The already described plug-ins are just a part of what can be achieved using QGIS for web mapping. It is worth mentioning that Web mapping in terms of a specific spatial problem of our community gives opportunity to present and use such service via the Internet. Demand for GIS data is increasing on daily basis, and therefore users will have a simple access to data and adjust its implementation to their own needs. References [1] Ming-Hsiang Tsou, Jennifer Smith, Free and Open Source Software for GIS education, GeoTech Center, San Diego, 2011. [2] Naga Coulibaly, An Opensource GIS tool for Integrated Water Resources Management (IWRM) in a basin, Indian Institute of Technology, Bombay, 2011. [3] Milosavljevid, A., Stoimenov, L., Đorđevid-Kajan, S., An Architecture for Open and Scalable WebGIS, 8th AGILE Conference on GIScience, pp. 629-634. Estoril, Portugal, 2005. [4] A. Milosavljevic, A. Dimitrijevic, D. Rancic, GIS-Augmented Video Surveillance, International Journal of Geographical Information Science, Volume: 24, Issue: 9, Pages: 1415-1433, 2010. [5] Stefan Steiniger, Erwan Bocher, An overview on current free and open source desktop GIS developments, International Journal of Geographical Information Science Vol. 23, No. 10, pp. 1345 1370, October 2009. [6] George Brent Hall,Michael G. Leahy, Open Source Approaches in Spatial Data Handling, Springer, 2008. [7] M. Gibin, A. Singleton, R. Milton, P. Mateos, P. Longley, Collaborative Mapping of London Using Google Maps:The LondonProfiler, UCL centre for advanced spatial analysis, 2008. [8] Robin Snyder, An introduction to open source and freely available mapping technologies, 44 th ASCUE Conference, South Carolina,2011. 9[] Bill Kropla, Beginning MapServer: open source GIS development, Apress, 2005. 1217