Rabu, 30 September 2009

Open Source and free GIS: A way out?

Paolo Cavallini
Paolo Cavallini
cavallini@faunalia.it
Faunalia
Piazza Garibaldi 5 - Pontedera (PI)
Italy
Web: www.faunalia.com


OPEN SOURCE AND FREE SOFTWARE
What is free software? What about Open Source? Without going too deep into the legal and philosophical issues (a review can be found at: http://www.gnu.org/philosophy/free-sw.html), we can say that a computer program is free when everybody can use, modify, and redistribute it. This implies that the source code of the program must be available, and that usually no licence fees are requested. We thus usually refer to these programs as FOSS (Free and Open Source Software). One must be careful to distinguish free programs in the restrictive sense of gratuity; there are many proprietary (closed source) programs that are distributed for free, sometimes as demos or runtimes of larger packages (e.g., in our field, ArcExplorer). The distinction is important, because having access to the source code is essential to guarantee that free software will remain free forever.

In recent years, interest on FOSS has grown considerably, both because of budget choices, and because of the ample scope for customization and reuse; also issues of democracy of information and elimination of the digital divide have a place here. Well-known successes include the dominant position of Apache (http://www.apache.org) among web servers, MySQL (http://www.mysql.com) among web databases, etc.

Several elements make FOSS particularly attractive in the developing countries:
  • relatively scarce financial resources, both in the private and in the public sector, push towards the adoption of low-cost solutions
  • the availability of skilled programmers (notably in the case of India, but also in many other countries) able to exploit effectively the scope for customization and further development of existing or new tools
  • resources invested in FOSS development remain in the country, and may help building up a national software industry, whereas money invested in proprietary software (i.e. licences) goes largely abroad.
Several factors hinder a wider and faster adoption of FOSS in many contexts: freedom implies the availability of a wide variety of products, not all of which are mature and fully functional. It may therefore be difficult, at first sight, to identify the best solutions for a specific application; furthermore, the lack of a solid commercial structure (and the advertisement that come with it) does not help “spreading the word”.

This paper aims at giving an overview of GFOSS, and provide you with an evaluation of its strong and weak points, with particular emphasis on its possible use in a professional context. While striving for a maximum objectivity, the paper necessarily reflects my particular point of view, i.e. that of an end user, without an IT background, mainly concerned with geographical analyses. Further information is quite easy to get, especially from the Internet; a good starting point is http://freegis.org.

THE TOOLS

Interoperativity and data conversion
In the GIS sector, pressure for having fully interoperative software has always been strong; as a result, the use of different data sources (with or without the need for conversions) does not pose major obstacles also for free software. The basic tool for this is the library GDL/OGR (hereafter GDAL; http://www.gdal.org), that allows all major free programs to use a wide variety of data, both raster and vectors (Tab.1).

Among the few problems that remain, the most serious is with AutoCAD files (dwg); in this case the conversion requires a library (OpenDWG) available at no cost (for non-commercial use), but non-free (in spite of its name). Although technically easy, this makes it illegal its redistribution when linked to FOSS programs; every user (or group of users) is therefore requested to the necessary programs with the support to OpenDWG).

Reprojection of rasters and vectors among different coordinate systems and datum are managed by the PROJ library (http://www.remotesensing.org/proj). The precision is the same as for major commercial software, and may be increased (thanks to the availability of source code) with slight adaptations of the existing code.

Geodatabase
The killer GFOSS application in this sector is undoubtedly PostGIS (http://postgis.refractions.net), linked to the GEOS library (http://geos.refractions.net). It is a spatial extension of PostgreSQL, the most powerful FOSS relational database. PostGIS allows the storage and management of geographical vector data directly from within the database (thus using standard SQL and its Open Geospatial Consortium [http://www.opengeospatial.org; hereafter OGC] extensions: distance, area, buffer, overlay etc. Every record is associated to a specific projection, thus in the same database data in different projections can coexist, and they'll be correctly overlayed. The data model is non-topological, and fully compliant to Simple Feature specifications of OGC (SFS 1.1, SFS TF 1.1). Importing and exporting ESRI shapefile data is straightforward. Raster geodatabase are not available for now, but there are plans for a future implementation.

Desktop mapping
The vat majority of so-called GIS work is indeed desktop mapping. In this respect, GFOSS had a significant gap compared to commercial applications, because most GFOSS users were IT persons, more inclined toward problem solving than to graphical appearance. In the last few years, thanks also to a larger user base, the situation has vastly improved, especially thanks to the rapid evolution of QuantumGIS, or qgis (http://qgis.org), a point-and-click application not dissimilar from commercial equivalents (see Fig. 1).


Figure 1 QGIS can display and edit various raster and vector geodata, including GRASS layers

Among the strong points are:
  • the direct access to a variety of raster and vector data format, including shapefiles and PostGIS geodatabases (with support for editing)
  • the integration with GRASS (see below), for which is becoming an effective and easy Graphical User Interface
  • the reprojection function, capable of reprojecting on the fly raster and vector data from a variety of projections to a common one, chosen by the user.
Although very usable, it is still a young product, and the coming months will probably see an increase in its stability and functions.

Other desktop GIS are available, including Thuban (http://thuban.intevation.org) and OpenEV (http://openev.sourceforge.net); the first one has strong limitations in the handling of rasters, while the second, powerful in the image analysis, is not as easy for the unexperienced user.

Geographic analysis
The “all purpose” free is GRASS GIS (short for Geographic Resources Analysis Support System: http://grass.itc.it). Historically known as a raster GIS, difficult to use, mainly command-line oriented, since 2002 it has known a heavy development; the 2D and 3D vector section, as well as the database integration, have been completely rewritten, and it is now available as a new (6.0) stable version. It is very complete, with all functions required for a professional use, from management and analysis of geospatial data to image analysis, from chart and maps production to spatial modelling and 2D, 2,5D, and full 3D visualization; a complete list of the >350 modules (many of which with several options, giving a total of more than 600 commands) can be found at: http://grass.itc.it/grass60/manuals/html60_user/index.html; in addition to the command shell, fundamental for automatizing the work flow, it has a simple and effective graphical interface (Fig. 2), although QGIS is becoming the best tool for this. It is very easy to combine existing commands, creating your own scripts, in addition to the possibility of programming more complex tasks in C, C++, Perl etc. Alphanumeric data can be managed with a variety of tools, among which the simple DBF, and the powerful relational database PostgreSQL. Statistical analyses can be run smoothly from within a GRASS session, both with GRASS internal modules, and with R statistical package (http://www.r-project.org).


Figure 2 GRASS and its native graphical interface. Hundreds of modules and commands are accessible trough pull-down menus

When compared to commercial equivalents, GRASS is generally very stable, also in very large and complex applications; its usage may be sometimes a bit tricky for the inexperienced user (thus the importance of the QGIS interface).

Web mapping
The Web is, and it has always been, the domain of free software; no surprise then that the one of the most powerful web mapping application is a free one; Mapserver (also called UMN Mapserver: http://ms.gis.umn.edu) has been developed originally by the University of Minnesota. It is OGC compliant (WMS 1.1.0, WMS 1.0.0, WMC 1.0, WFS 1.0.0, SLD 1.0, GML 2.0, Filter 1.0.0, WMS 1.1.1). The developers have been careful not to overfeature the main engine, that is very stable even in critical applications; a number of applications have been built on to of it, extending its functions by the use of various programming languages: php, perl, python, javascript, etc. Examples include pmapper (http://pmapper.sourceforge.net), Chameleon (http://chameleon.maptools.org) and Cartoweb (http://www.cartoweb.org). With these tools, customized web mapping applications can be built in a very cost-effective way.

GPS
Global Positioning System receivers are very useful and widespread; many free programs are available for interacting with GPS hardware, from single-purpose command-line downloading programs (e.g. gpstrans: http://gpstrans.sourceforge.net) to the more sphisticated ones, with graphical interface and conversion tools (e.g. gpsbabel: http://gpsbabel.sourceforge.net); some have real-time navigation application (e.g. gpsdrive: http://www.gpsdrive.cc) or differential correction (dgpsip: http://www.wsrcc.com/wolfgang/gps/dgps-ip.html). The easy integration among different tools, characteristic of open source programs, allows larger programs like GRASS and QGIS to – and upload points and tracks straight from/to the devices. In the case of GRASS, data are reprojected automatically in the working projection and converted to the GRASS vector format.

Java: another world?
The power of Java programming language has allowed the development of GFOSS applications. The growing computing power of modern PCs makes speed of Java programs sufficient, even for heavy applications. Java, however, is not free as a language, and its proprietary alone (Sun Microsystems, Inc.) has the right to change its specifications; this makes it less attractive for FOSS people (see e.g. http://www.gnu.org/philosophy/java-trap.html). In spite of this, a few Java GFOSS programs are particularly interesting; Deegree (http://deegree.sourceforge.net) is a good MapServer, fully compliant with OGC specifications (WTS 0.5, WMS 1.1.1, WMS 1.1.0, WMS 1.0.0, WMC 1.0, WFS 1.0.0, WCS 1, St Cat 0.06, GML2.1 2.1.2, Gaz 0.8). For desktop mapping ans some analysis, Java Unified Mapping Platform (JUMP: http://www.vividsolutions.com/jump) has attractive features (Fig. 3). For GRASS users, a Java graphical interface is also available (JGRASS:http://www.hydrologis.com/html/jgrass/jgrass_en.html).


Figure 3 GRASS can display and analyse 2,5 and 3D data

IN PRACTICE: HOW TO TRY IT?
The vast majority of the programs outlined here gave been developed on *NIX operating systems (Unix, Linux etc.), and today GNU/Linux is generally the ideal platform for their use; many of them have been ported on other operating systems (including Microsoft Windows and MacOSX), but some of them still suffer from some limitation. Luckily, the installation of Linux is today reasonably easy , and can be done quickly with some help. Various operating systems (Linux, Mac OSX, Windows etc.) can coexist on the same PC without any side effect. The usage of simulators and virtual machines, on the other hand, is rather heavy, and does not offer significant advantages. It is also possible to have a preview of a real Linux system just using a “live” CD-ROM that, without installing anything on the hard disk (therefore not modifying any of the installed applications) starts a complete Linux machine (of course, much slower than a real one, because of the CD accession time). Some examples of GFOSS live CDs are listed at: http://grass.itc.it/download/cdrom.php. When working with GFOSS, one has to keep in mind that the community of users and developers is a fundamental resource: by the use of mailing lists, forums, web sites, chats etc., is very easy to get support. Users are encouraged to find and report bugs, that are often fixed in a very short time. Throughout the web a wide variety of manuals and how-tos are also available.

CONCLUSIONS
Is freeGIS ready to replace commercial software in real applications? The answer is articulated. To compare side by side large and complex applications is an heavy task, and few people have attempted this on a limited scale. Nevertheless, from our experience it is clear that several products are mature and ready for professional use, whereas others, while usable, need further development to be really competitive (setting aside the cost of acquisition):
  • UMN Mapserver is fully functional; it does not have significant limitations, and in several respects it is superior to its commercial counterparts
  • PostgreSQL+PosGIS as a relational geodatabase is a very reliable and powerful solution, and has already replaced commercial top-end solutions
  • for geographic analyses, GRASS is fully functional, stable and very powerful. In many situations (where money is an issue: underfunded universities and public administrations, small or heavily competing companies, etc.) it is the best alternative to the (unfortunately very common) illegal use of (cracked or stolen) proprietary software. Its inherent qualities, however, allow its use also in large and more complex settings
  • desktop mapping (and in particular QGIS) is usable, but still young; some more months of development will be necessary to make it more stable and powerful.
In addition to these programs, many others are available that can suit special needs and applications; see a list on http://freegis.org.

Tab. 1. Data formats supported by GDAL (raster) and OGR (vectors)


Figure 4 Java Unified Mapping Platform (JUMP): a free GIS programmed in Java

Tidak ada komentar:

Posting Komentar