Click here to load reader
Click here to load reader
Jan 30, 2017
Chapter 12TerraLib: An Open Source GIS Libraryfor Large-Scale Environmentaland Socio-Economic Applications
Gilberto Camara, Lubia Vinhas, Karine Reis Ferreira, Gilberto Ribeiro de Queiroz,Ricardo Cartaxo Modesto de Souza, Antonio Miguel Vieira Monteiro, MarceloTlio de Carvalho, Marco Antonio Casanova and Ubirajara Moura de Freitas
Abstract This chapter describes TerraLib, an open source GIS software library. Thedesign goal for TerraLib is to support large-scale applications using socio-economicand environmental data. TerraLib supports coding of geographical applications us-ing spatial databases, and stores data in different database management systemsincluding MySQL and PostgreSQL. Its vector data model is upwards compliantwith Open Geospatial Consortium (OGC) standards. It handles spatio-temporal data
Gilberto CamaraNational Institute for Space Research (INPE), Av dos Astronautas 1758, 12227-010, Sao Jose dosCampos, Brazil, e-mail: [email protected]
Lubia VinhasNational Institute for Space Research (INPE), Av dos Astronautas 1758, 12227-010, Sao Jose dosCampos, Brazil, e-mail: [email protected]
Karine Reis FerreiraNational Institute for Space Research (INPE), Av dos Astronautas 1758, 12227-010, Sao Jose dosCampos, Brazil, e-mail: [email protected]
Gilberto Ribeiro de QueirozNational Institute for Space Research (INPE), Av dos Astronautas 1758, 12227-010, Sao Jose dosCampos, Brazil, e-mail: [email protected]
Ricardo Cartaxo Modesto de SouzaNational Institute for Space Research (INPE), Av dos Astronautas 1758, 12227-010, Sao Jose dosCampos, Brazil, e-mail: [email protected]
Antonio Miguel Vieira MonteiroNational Institute for Space Research (INPE), Av dos Astronautas 1758, 12227-010, Sao Jose dosCampos, Brazil, e-mail: [email protected]
Marcelo Tlio de CarvalhoCatholic University of Rio de Janeiro (PUC-RIO), Rua Marques de Sao Vicente, 22522. 453-900Rio de Janeiro/RJ, Brazil, e-mail: [email protected]
Marco Antonio CasanovaCatholic University of Rio de Janeiro (PUC-RIO), Rua Marques de Sao Vicente, 22522. 453-900Rio de Janeiro/RJ, Brazil, e-mail: [email protected]
Ubirajara Moura de FreitasSpace Research and Applications Foundation (FUNCATE), Av. Dr. Joao Guilhermino, 429 18thfloor 12210-131 Sao Jose dos Campos, SP, Brazil, e-mail: [email protected]
G.B. Hall, M.G. Leahy (eds.), Open Source Approaches in Spatial Data Handling. 247Advances in Geographic Information Science 2, c Springer-Verlag Berlin Heidelberg 2008
248 G. Camara et al.
with Open Geospatial Consortium (OGC) standards. It handles spatio-temporal datatypes (events, moving objects, cell spaces, modifiable objects) and allows spatial,temporal, and attribute queries on the database. TerraLib supports dynamic model-ing in generalized cell spaces, has a direct runtime link with the R programminglanguage for statistical analysis, and handles large image data sets. The library isdeveloped in C++, and has programming interfaces in Java and Visual Basic. Us-ing TerraLib, the Brazilian National Institute for Space Research (INPE) developedthe TerraView open source GIS, which provides functions for data conversion, dis-play, exploratory spatial data analysis, and spatial and non-spatial queries. Anothernoteworthy application is TerraAmazon, Brazils national database for monitoringdeforestation in the Amazon rainforest, which manages more than 2 million com-plex polygons and 60 gigabytes of remote sensing images.
Recent advances in spatial databases have changed both the nature and processof geographic information system (GIS) software development. Spatially-enableddatabase management systems (DBMS) such as PostgreSQL empower a transitionfrom monolithic GIS with hundreds of functions to a generation of spatial informa-tion applications tailored to suit specific user needs. These capacities have been amajor boon for the free and open source geospatial (FOSS4G) community, manymembers of which are using the new generation of databases to build unique andinnovative applications.
One of the expected impacts of open source software (OSS) is its benefits fordeveloping nations. As Weber (2004) points out, combining OSS with the techni-cal workforce available in developing countries can enable technology transfer. Hestates, Of course information technology and open source in particular is not a sil-ver bullet for longstanding development issues; nothing is. But the transformativepotential of computing does create new opportunities to make progress on develop-ment problems that have been intransigent (Weber 2004 p. 254).
Following from this point, GIS is a key technology for developing nations indomains such as environmental protection, urban management, agricultural produc-tion, deforestation mapping, public health assessment, crime-fighting, and socio-economic measurements. However, the demands of these applications go wellbeyond the current specifications of the Open Geospatial Consortium (OGC). Large-scale environmental and socio-economic applications compel FOSS4G to includesignificant spatial analysis capacities to meet the needs of end-users (Goodchild2003). Hence, FOSS4G should incorporate research advances in areas such asspatio-temporal data models (Erwig and Schneider 2002; Hornsby and Egenhofer2000), geographical ontologies (Fonseca et al. 2002), spatial statistics and spatialeconometrics (Anselin 1999), cellular automata (Couclelis 1997), and environmen-tal modeling (Burrough 1998). These topics have largely been outside the reach ofthe GIS user community due to a general lack of widely available tools that support
12 GIS Library for Large-Scale Environmental and Socio-Economic Applications 249
them. Incorporation of some of these new techniques into GIS applications is nec-essary for the user community to extract the full potential of spatial databases.
With this motivation, TerraLib was developed as an open source GIS softwarelibrary that extends object-relational DBMS technology to support spatio-temporalmodels, spatial analysis, spatial data mining, and image databases. The design goalfor TerraLib is to support large-scale applications using cadastral, socio-economicand environmental data. This goal was a mandate of the main organization that sup-ports TerraLib, the Brazilian National Institute for Space Research (INPE). INPE isBrazils primary institution for space science and technology. Its mission includesbuilding satellites, developing environmental applications, and producing weatherand climate forecasts. Since 1984, INPE has had a research and development di-vision for GIS to support its actions in earth observation and to promote GIS andremote sensing technology in Brazil. The two other main project partners are theComputer Graphics Group (TecGraf) of the Catholic University of Rio de Janeiro(PUC-RIO) and FUNCATE, a non-profit foundation that develops GIS applicationsusing OSS. All organizations involved in the TerraLib project share the same gen-eral design goals. Thus, TerraLib is a project with long-term support and a stableand secure working environment for its developers. This chapter describes the Ter-raLib library, explains the main design decisions, and points out how the libraryincorporates research results from GIScience in its development.
12.2 Challenges for Innovation in FOSS4G
The OGC specifications noted above provide a sound basis for developing FOSS4Gprojects. However, many applications need tools which go beyond these specifica-tions. Thus, one of the lines of growth in FOSS4G is to provide new tools for appli-cation developers. However, there are pitfalls. Building innovation in open sourceGIS is a threefold challenge. Given the design goals for the project discussed inthis chapter, the first step required selecting, from the large body of GIScienceliterature, those advances that are relevant to the projects objectives. These ad-vances then need to be implemented in industrial-strength code. The final hurdle isdocumenting these features and sharing them with the broader FOSS4G develop-ment community.
A basic design objective for TerraLib was to support innovative applications tohelp people and protect the environment. Thus, current GIS research was first eval-uated, and ideas and proposals were selected that were relevant to the design goals.This led to concentration in the following three areas:
(a) Spatial Statistics: since Anselins pioneering work on spatial analysis (Anselin1989), promising advances have appeared in the field of spatial statistics andspatial data mining (Anselin 1995; Fotheringham et al. 2002; Openshaw andAlvanides 2001; Martin 2003). The main focus of these contributions is toimprove the ability to extract information for socio-economic data. This is rele-vant to public policy applications of GIS.
250 G. Camara et al.
(b) Spatio-temporal Models: there are two broad categories of spatio-temporalobjects. The first concerns moving objects. Moving objects relate to, for ex-ample, information about spatial and temporal positions of planes, stormsor automobiles. The widespread relevance of location-based applications hasmotivated developments in the field of moving object databases (Guting andSchneider 2005). There is a large research area in algorithms and query meth-ods for moving objects (Sistla et al. 1997). The second type concerns evolv-ing objects that do not move, but whose geometry, topology and propertieschange. They arise when changes that occur in, for example, cadastral GISor in land cover patterns are considered (Medak 2001). Evolving objects areimportant for environmental models, which depict the temporal evolution of apattern in a landscape. Examples of environmental models include land changemodels, epidemiological studies, population flows, and