Professional Documents
Culture Documents
STATISTICAL SUSTAINABILITY
FRAMEWORK TOOL
Keywords
Abstract
This particular branch of the research developed a decision support tool that
will become the integrating component of the RSSF. This tool is developed on the
web-based platform to allow easy dissemination, quick maintenance and to minimise
compatibility issues. The tool is developed based on MapGuide Open Source and it
follows the three-tier architecture: Client tier, Web tier and the Server tier. The
developed tool is interactive and behaves similar to a familiar desktop-based
application. It has the capability to handle and display vector-based spatial data and
can give further visual outputs using charts and tables. The data used in this tool is
obtained from the QUT research team. Overall the tool implements four tasks to help
in the decision-making process. These are the Locality Classification, Trend Display,
Impact Assessment and Data Entry and Update. The developed tool utilises open
source and freely available software and accounts for easy extensibility and long-
term sustainability.
Table of Contents
Keywords .................................................................................................................................................i
Abstract ................................................................................................................................................. iii
Table of Contents .................................................................................................................................... v
List of Figures ...................................................................................................................................... vii
List of Tables .........................................................................................................................................ix
List of Abbreviations..............................................................................................................................xi
Statement of Original Authorship ....................................................................................................... xiii
Acknowledgments ................................................................................................................................. xv
CHAPTER 1: INTRODUCTION ....................................................................................................... 1
CHAPTER 2: LITERATURE REVIEW ........................................................................................... 7
2.1 Decision Support Systems (DSS) ................................................................................................ 7
2.1.1 Impact Assessment ........................................................................................................... 8
2.2 Sustainability and Decision Support Systems .............................................................................. 9
2.3 Geographic Information Systems (GIS)..................................................................................... 11
2.4 Spatial Decision Support Systems (SDSS) ................................................................................ 11
2.5 Web SDSS and Web interfaces .................................................................................................. 13
CHAPTER 3: TECHNOLOGY AND DATA .................................................................................. 19
3.1 MapGuide Open Source ............................................................................................................. 20
3.2 Data and Database...................................................................................................................... 22
3.2.1 Spatial Data..................................................................................................................... 24
3.2.2 Spatial Data for the User Interface ................................................................................. 25
3.3 Charts ......................................................................................................................................... 25
3.4 Mapguide maestro...................................................................................................................... 25
3.5 Summary......................................................................................................................... 26
CHAPTER 4: THE APPROACH ..................................................................................................... 27
4.1 MapGuide Setup ........................................................................................................................ 28
4.2 Implementation .......................................................................................................................... 30
4.3 Decision Support Extension ....................................................................................................... 31
4.4 Interface Design ......................................................................................................................... 32
4.4.1 Map Building .................................................................................................................. 33
4.4.2 Chart Display .................................................................................................................. 37
4.4.3 Task Display ................................................................................................................... 39
4.5 Database Design ........................................................................................................................ 40
4.6 Task Design ............................................................................................................................... 43
4.7 Summary .................................................................................................................................... 49
CHAPTER 5: RSSF TOOL ............................................................................................................... 51
5.1 Interface ..................................................................................................................................... 51
5.2 System Tasks and operation....................................................................................................... 54
5.2.1 Locality Classification .................................................................................................... 55
5.2.2 Trend Display ................................................................................................................. 58
Development of the Rural Statistical Sustainability Framework Tool v
vi
List of Figures
List of Tables
List of Abbreviations
The work contained in this thesis has not been previously submitted to meet
requirements for an award at this or any other higher education institution. To the
best of my knowledge and belief, the thesis contains no material previously
published or written by another person except where due reference is made.
Signature: _________________________
Date: _________________________
Acknowledgments
Chapter 1: Introduction 1
2
satisfaction and organisation reputation through the publicity gained from TBL
reporting.
The challenge in promoting TBL development is not only to think, discuss and
consider environmental and social impacts but also to device means to measure and
monitor them (McKenzie, 2004). Evonne miller et al, also argues that even though
there is an awareness of the importance of TBL, the instruments for analysis and
reporting are often nonexistent and inadequate. One example of such tool presented
in their paper, is the ability of an organisation to develop a database to measure,
monitor and evaluate their social contribution. Such a database tool, as they points
out could be used to reveal whether the majority of workers with an organisation
have children, which can influence the origination decision to provide childcare
facilities and/or education scholarships to retain staff and to improve organisational
reputation (Miller et al., 2006).
2 Chapter 1: Introduction
3
education sectors of society can lead to the reduction in birth rate and the population
growth (Baker, 2006).
Clearly, sustainability is a real and imminent issue: if the world continues its
current course of development into the future, it is estimated that it would require
two or more planets to fulfil its needs (Sundblad & Pullen, 2010). Without proper
sustainable development, the resources of the world are spread unevenly among
people; currently, it is estimated that 80 percent of the worlds resources are used by
only 20 percent of the people (Sundblad & Pullen, 2010). If the remaining 80 percent
of the people are also aspiring for a similar lifestyle as that of the wealthy, then this
change would place the world resource demands well over full capacity. This kind of
varied resource distribution can exist among countries, states, cities and urban and
rural regions and it does not lead to equity and social harmony, which is important in
achieving long-term sustainability. Also as the population and economy grows, it
puts pressure on limited land allocation and employment, with greenhouse gas
released from homes and factories adding to global warming and environmental
degradation (Inter-Ministerial Committee on Sustainable Development, 2009).
These are all the more reasons to quickly accommodate and promote a sustainable
development paradigm.
Chapter 1: Introduction 3
4
Critically, sustainable development and its implications are not just a global
concern but also affect Australia. In particularly, the rural communities in Australia
face various economic, environmental and social challenges. According to the
Australian Institute of Health and Welfare (AIHW, 2008), there is strong evidence to
suggest that rural Australians generally experience: poorer health, lower education
standards, fewer employment opportunities, and lower wages, than their city
counterparts. Eversole (2004) argues that the increasing shift toward corporate
farming and the providing of local retail by national and international retail chains is
creating a development gap in rural communities. The economic security of the rural
regions depends on the efficient, sustainable use of local resources and the
availability of new knowledge and new strategies for investment and adjustment
(Rogers & Walker, 2005).
4 Chapter 1: Introduction
5
Rural Statistical Sustainability Framework (RSSF) along with the associated tools
that will aid the rural planning and development decision-making processes. The
framework targets rural communities in South-West Queensland.
The tool will initially focus on two specific locations: the Western and
Southern Downs regions. Given the fact that the tool is focusing on the rural context,
it will need to be accessed from remote locations. As a result, traditional desktop-
based software would be difficult to use in this situation. Therefore, it is proposed
that the tool be developed on a web-based platform, as it will provide good
dissemination capability and will allow quick update and maintenance of the system
in multiple different remote locations. Also, the decision makers that use this tool
need to be able to easily specify and visualise data that reflects on the spatial context.
This means the system needs to utilise maps and layers to display information. It is
also a factor to consider that the decision makers and planners that use this tool are
not heavily technically inclined; thus, the tool needs to be user friendly and
Chapter 1: Introduction 5
6
interactive and easy to understand and use without requiring too much setting up and
configuration.
In order to answer the proposed problem, the research will focus on developing
a web-based spatial decision support system (SDSS). The main characteristic of a
SDSS is that it is normally implemented for limited problem domain, facilitates the
use of analytical and statistical modelling, utilises a graphical interface to provide
information to decision makers and can be easily modified and adapted to the
decision makers style (Densham & Goodchild, 1989). A SDSS needs to have a good
graphical interface, together with interactive capabilities, as it needs to deal with
raster and vector-based data. With the availability of web 2.0 technologies it is now
easier to give web applications similar interactive capabilities to that of desktop
applications. Overall this research aims to achieve three goals:
2. To develop the necessary database backend of the tool and facilitate data
retrieval, modification and addition.
The scope of the research includes the design and development of web
interfaces, and online decision-making tools that support Geographic Information
Systems (GIS) to facilitate sustainable development of rural regions.
6 Chapter 1: Introduction
Chapter 2: Literature Review
This section documents the literature for this research. The purpose of this
literature review is to investigate Decision Support Systems (DSS) for sustainable
rural development, that augment Geographic Information Systems (GIS) and
interactive web interfaces and to explore how these integrate to form a coherent
spatial decision support system. This new paradigm of the research is an emerging
trend in the DSS arena. Hence, it would become possible to identify the research gap
that exists and to justify the research in this domain. It would also help to identify
and retrieve knowledge available in the literature that will help in the implementation
process to support the research problem.
The conception of decision support systems dates back to 1969 (Yukui &
Sheng, 2009). The purpose of this first DSS developed in 1969, called REVEAL,
was to help mangers solve daily problems that arose in the organisation environment.
Decision Support Systems are defined as computer-based information systems
designed to support decision makers interactively in thinking and making decisions
about relatively unstructured problems (Dutta, 2000, p. 2).
There are several different modules and versions of DSS. These include group
decision support systems, intelligent decision support systems, distributed decision
support systems, data support centres, strategic decision support systems (Yukui &
Sheng, 2009). Group decision support systems combine together communication,
computer and decision support technologies. They are utilised in situations where
personal decision making is limited. An intelligent DSS is the integration of artificial
automate the impact assessment process and to integrate a sound method to evaluate
its outcomes.
There are two main approaches to decision making: the classical and
naturalistic approach (Hersh, 1999). According to Hersh, these two approaches are
not entirely suitable for sustainable decision making. The classical approach requires
objective, qualitative and precise data which is not always possible to obtain. The
naturalistic approach depends on the expertise of the experienced users which could
be outdated and not geared towards sustainability. In this research, however, it
would be appropriate to use classical approach to sustainable decision making as it
provides an organised framework for structuring all available data and analysing and
providing justification for tradeoffs (Hersh, 1999). In essence, it is objective as the
analysis is performed with measurable phenomena instead of speculation, and
statistical evidence can be produced to justify the courses of action taken. One
limitation of this method is that it is not always easy to obtain all the data necessary
for decision making.
private vehicles and the lack of public transportation such as buses and trains. This is
also why multi criteria decision making (MCDM) tends to not be appropriate for
sustainable decision making as it targets problems with an explicitly stated course of
actions (Hersh, 1999).
DSS also have applications in energy planning and management (Hersh, 1999).
Simulation and modelling in this area can be used to evaluate the effect of different
policies and changes such as regulation of emission through the investigation of
hypothetical scenarios. This can also be used to predict the long term availability of
different energy resources and the development of new technologies (Hersh, 1999).
shaping mode and more complicated software tools are useful in the comparing
mode of the planning process (Tornqvist et al., 2008).
The main focus of this research is on the spatial context of decision making. To
be able to manipulate and visualise spatial data is an important feature when making
decisions in the spatial context. Spatial data are pieces of information describing
quantitative and/or qualitative properties that refer to space (Belussi, 2007, p. 1). In
data modelling terms, spatial information has more than two dimensions thus,
decision making is informative and precise. Spatial data can be attributes of a set of
objects such as the path of a highway or a technical drawing of an engine (Belussi,
2007). In the case of a path, the object would be two lines and the attribute is the
length. Spatial data can also be a function of space location such as temperature, for
example how temperature varies according to space (Belussi, 2007).
GIS technology can be used to help with the manipulation and visualisation of
the spatial data. Cowen, Cundall, Helmunn and Richers (1996, p. 1064) defines a
function of a GIS as the ability to automatically synthesize existing layers of
geographic data and to update a database of spatial entities. As a result of the high
technical complexity of GIS technology, its availability has traditionally been limited
to government and public administrations. This is true even in the western
industrialised society (Caldeweyher, Jinglan & Pham, 2006) and the lack of
availability of GIS to the general public has caused some to label it as elitist and anti-
democratic technology and has motivated communities with spatial analysis needs
to turn to GIS vendors or universities for assistance. Unfortunately, in the long run,
this approach is not sustainable (Caldeweyher et al., 2006).
A SDSS is to some extent an integration of DSS and GIS technology. This idea
was first proposed in the paper from Densham and Goodchild (1989). Cowen
(Cowen et al., 1996, p. 1065) defines a SDSS as a decision support system
involving the integration of spatially referenced data in a problem-solving
environment. In 1980, Keen identified the characteristics of a SDSS as follows: it is
normally implemented for a limited problem domain; facilitated by the use of
analytical and statistical modelling; utilises a graphical interface to provide
information to decision makers and can be easily modified and adapted to the
decision makers style (Densham & Goodchild, 1989). The advantage of a SDSS
over a GIS is that it provides a framework for incorporating analytical modelling
capabilities and database facilities to improve decision making.
A user interface for a SDSS would consist of a GIS with maps, layers and other
topological data and it would be extended to provide and facilitate additional
decision-making tasks such as modelling and display of statistical data. A SDSS has
wide applications, the user interfaces of these tend to differ as a result of the features
they choose to implement. In 2007, Dye and Shaw (2007) developed a GIS-based
Spatial Decision Support System (SDSS) for tourism purposes. The aim of the
system they developed was to help users in locating facilities in the Great Smokey
National Park. In particular, it helps the user to find an optimised path through the
park based on the users preferences and constrains. The user interface of this system
collects constraints and preference, such as travel mode, travel distance, points of
interest and park facilities, from the user. This information is then passed on to the
processing unit of the application which calculates and finds the most suitable trails.
The system then plots the trails on a map and displays it to the user. It also displays
additional textual information describing the found trails. The system is designed to
be used from the computers located at the visitor information centre of the national
park.
support system to help decision makers find optimum locations to build additional
amenities for existing or new settlements. The interface of the developed systems has
the capability to add/delete amenities at any location and calculate optimum solutions
and perform spatial and statistical queries by clicking on graphical objects on the
screen.
In 2009, Li et al. (2009) developed a SDSS for land use and structure
optimisation. The main purpose of this was to figure out what land areas are most
suitable for what kind of development. The user interface of the proposed system
was developed using C# for Windows XP operating system. It uses the proprietary
ArcGIS for the display and analysis of geographic data. The user interface integrates
all the modules in the system and provides the users with access to various
calculation models. It uses various geographic maps, layers and charts to display
result to the user.
There are certain similarities that exist with all the interfaces of these systems,
the most obvious is that they all utilise some sort of map to display the data and the
results. This can be identified as a key feature of a SDSS. The main limitation of all
of these systems is that their interfaces are desktop based and hence have very low
dissemination capabilities. In the case of the system developed for tourism purposes,
this would limit the access of customers accessing from home or overseas.
Evidently the concept of DSS have been around for a quite while. After the
beginning of the internet in 1995 for mass commercialisation and the introduction of
the HTML 2.0 specifications with support for form and table tags, there was a
serious interest in developing DSS on web-based platforms (Power, 2007). In more
recent years, with the advent of web 2.0 and its capability to explicitly represent and
visualise information (Chavarriaga & Macias, 2009), the internet has become an
attractive platform to develop applications with rich user interfaces. Compared to
desktop application interfaces, the web platform also provides a similar look and
feel. There exists the capability to add menus, toolbars, pop up windows and context
menus into todays web applications. With the increase in internet bandwidth and
technologies such as AJAX (Asynchronous JavaScript and XML), the
responsiveness of the web applications are not second to their desktop counterparts.
Given the similarity between web-based and desktop platforms for application
development, a web-based SDSS has a number of advantages over a desktop-based
system (Wu, Zhang, Chen & Dou, 2008). Web-based SDSS provide faster update of
information. Information can be updated by multiple groups of people spread across
multiple locations. This is vital for real-time systems that depend on data as it
becomes available. As the web-based system uses a client-server model, it provides
wider access to many users at the same time. This significantly increases the
dissemination of the system. Also since multiple users have access to the same
system, the maintenance and update of the system can be achieved much more easily.
Web-based systems only require a browser to use. With todays widespread
availability of internet access, it can be argued that majority of the non-technical
users are familiar with using a web-browser and have used at least some kind of web-
based application such as Facebook, MySpace, YouTube or Webmail. However, one
key limitation of a web-based system is the heavy load on the server which can result
in low bandwidth and time outs. Spreading the system across multiple servers could
alleviate this with some compromise regarding the maintenance and update
capability. Taking all these factors into consideration, a web-based implementation
of a SDSS will allow more effective and productive use of the system in the hands of
the non-technical users.
Bell, Dean, and Blake (2000) developed a web-based special decision support
system for urban planning. They utilised a practical land use model to develop the
projection for urban planning (PUP). The users access the model using a web-based
graphical interface and specify the scenarios using a HTML form. Upon submitting
the form the information is passed to the PUP model where the necessary calculation
and forecasting is performed. The use of forms in the GUI to some extent limits the
interactive capability of the interface when compared with the user directly
visualising the possible inputs, i.e. on a map. The result of the model is sent to the
browser to be displayed to the user. The system utilised a 3D animation feature
called VRML for the purpose of visualising the results. The VRML animations can
be played using a browser embedded plug-in. In terms of the visualisation aspect the
system is capable of generating forecast for population growth, stock and
construction and stock and consumption. Even though this research focuses on the
urban context, some features of the interface are complementary to the rural context
as well. The use of 3D animation for visualisation of results would help to increase
the interactivity of the system. However, such high-end graphics capabilities come
with a big performance requirement and therefore will reduce the responsiveness of
the system. Also the fact that this will require a browser plug-in means that the end
user will need to fiddle around to get the system to a working state. All these add to
poor dissemination and reduce the user friendliness of the tool.
A similar tool was developed by Stimson in 2007 for benchmarking the socio-
economic performance in Queensland local government (Stimson & Shyy, 2007).
Stimson also argues that a major advantage of a web-based SDSS is that it is
platform independent and therefore it is more accessible and relevant to a wide range
of audiences. The prototype he developed provides a customised GIS, spatially
optimised model and a user interface and visualisation facilities. The system uses a
proprietary ESRI (Environmental Systems Research Institute) map objects internal
map server. The client interface is built using a java applet. The paper gives a good
overview of how the user can interact with the interface. It shows how the user can
compare and classify different map regions in terms of economic development and
employment. However, it could be argued that the user interface consists of too many
forms with a lot of drop-down choice boxes which are not very responsive and hence
may be tedious for a non-technically inclined user. This design limits the interactivity
of the system, and of course, this prototype system does not specifically focus on the
rural context and sustainable development.
and occupation. It also consists of a classification wizard which can help the user
to associate different styles, patterns and symbols with the layers. The system has the
capability to generate charts to display time series data. Limitations of the system are
that it does not consist of a fully automated layer addition and classification feature
and also the map generation parameters are hard coded which limits the way users
can visualise data and may not necessarily be in accordance with the users
requirements. Also, if the developer had implemented a time series slider function to
the system, which the user can move to travel through different time periods and
simultaneously receive updates of relevant data on the map, it would have improved
the interactivity and the usability of the system. To some extent, the lack of
interactive capability in this system can be attributed to under utilisation of proper
web 2.0 techniques such as AJAX technology. However improper and over
utilisation of AJAX could also reduce the responsiveness of the tasks due to complex
calculation and connection speed limitations.
More specific work on user interface development for web GIS was conducted
by Bhalla et al (2002). Bhallas system is developed to be simple and to
accommodate users with no GIS-based query skills. Bhalla utilised an option-based
interface to perform object and path navigation to capture user intent. These inputs
are later converted to SQL (Structured Query Language) statements and passed to the
database to retrieve the appropriate information. The system interface works by
asking the user to choose a GIS object, such as a river. Once this is selected it
provide the users with options to choose conditions for the object: to display a list of
relevant objects from the database, to combine it with another object, for example a
road object to see what roads intersect a river, or to display attributes of an object.
As the interface is designed to be simple, it lacks the more sophisticated interactive
Through the existing literature, it is possible and promising to extract and get
an idea of the basic components of a web-based Spatial Decision Support System.
Usually this type of system consists of a database tier, server tier and client tier. The
database tier is the place where all the information necessary for the system is
located. In a SDSS they are two types of data, spatial and attribute (Wu et al., 2008).
Spatial data consists of raster and vector-based geographic data such as layers and
maps (Malczewski, 2006) which need to be stored and handled differently to
attribute data such as population and health data. The server tier is responsible for
the main logic of the system. This is where the calculating models of the system fit
in. Muracevic and Orucevic (2008) describe a high level platform called MapGuide
open source that helps to develop interactive web-based GIS. This software provides
a repository and a mapserver that has the capability to handle and serve spatial data
and also it provides customisable and extendable client-side viewers that can be used
to display spatial and attribute data and obtain user input interactively.
Compared to online Mapping tools such as Google and Bing Maps, MapGuide
open source provides a higher level of interactivity. On top of this it provides a well
structured architecture to build web based applications. It is possible to create simple
static map based web site using Google Maps for example. However this could be
too limiting when providing advanced decision making capability.
The system developed through this research aims to be sustainable in the long
term, therefore it is beneficial to utilise open source and freely available software and
technologies as much as possible. Open source software allows developers to make
their own modifications to the software rather than waiting for a proprietor to do
what is best for everyone. This ensures that the appropriate future extensions and/or
modifications can be made to the system in a timely manner without having to look
for new alternative technologies (Kavanagh, 2004). Todays open source software
provides good out-of-the-box functionality, performance and reliability comparable
to their proprietary counterparts (Wheeler, 2007). Therefore, the money that would
have been spent on the technology can be used instead on more developer time. In
this project, open source software is used throughout the development of the system,
except in one occasion when modifying some of the spatial data files. This is
documented in section 4.4.1.
Pros
Matured software (1990) Easy web-based configuration Easy web-based
configuration
WMS, WFS Standards WMS, WFS Standards WMS, WFS Standards
Data Formats: Vector and Data Formats: Vector and Raster Data for Formats: Vector
Raster and Raster
Common database support Common database support MySQL, Common database support
MySQL, PostgreSQL PostgreSQL MySQL, PostgreSQL
Active development Active development Support for mapping
interface
Support for 3 different mapping
interfaces. AJAX, DWF and Fusion
Free Map authoring tools: Web
Studio and MapGuide Maestro
Cons
No inherent client interface. Made open source quite recently Not widely known
(2006)
Table 1: Comparison of Alternative Web GIS Technology
The system that is developed here needs to be able to handle the serving and
display of raster and vector-based maps. For this purpose a number of open source
technologies have been considered. The selected map server/renderer should be easy
to use, quick to develop in and provide good documentation and support. The
considered alternatives include MapServer, MapGuide Open Source (OS) and
Geoserver. Table 1 evaluates these technologies.
The client tier is where the user accesses the system. This is where all the
vector map data is rendered. The user accesses this through a standard web browser.
MapGuide OS provides two viewers that can be used to integrate the user interface
into a web browser. These are the DWF and Ajax viewers. Both of these viewers
provide a general interface with the capability to extend and develop using a
common JavaScript API. Therefore the interfaces developed for either of the two
viewers are portable across the two different technologies.
The Ajax viewer is fully implemented in HTML, CSS, JavaScript and XML.
Therefore, it does not require anything extra to be downloaded or installed and it is
naturally supported by all major browsers such as Internet Explorer, Firefox and
Safari. DWF viewer, on the other hand is a proprietary plug-in based on Microsofts
ActiveX control technology and it only works in Internet Explorer. In this project, we
use the AJAX viewer for its native support of all major browsers which requires no
setting up or configuration by the user. This improves the dissemination capability of
the tool.
The web tier is where the application logic of the system is specified. The core
of MapGuide is developed using PHP and it runs on the freely available Apache
server. However, the developers are not limited to just using the PHP language.
MapGuide supports development and provides APIs for three different languages:
PHP, ASP.NET and Java. Development using Java or ASP.Net provides good
structure to the code as these follow the object-oriented paradigm well. MapGuide
also support three different servers in developing the application logic: the Apache
server for development using PHP, Apache Tomcat server for development using
Java/JSP and the Microsoft IIS server for development using ASP.NET. In this
project we use the Java and Tomcat combination as they are freely available and can
also be easily ported to different systems due to operating system independence.
Finally the server tier is where the data is stored. This data includes attribute
data as well as spatial data. MapGuide uses a separate MapGuide server to serve the
vector data. It provides seven different services: Site Service, Resource Service,
Drawing Service, Feature Service, Mapping Service, Rendering Service, and Tile
Service. The MapGuide server communicates with the web server via MapGuide
API (Application Programming Interface). This API is available in all three
supported languages; in our case we use the MapGuide Java API.
There is a significant amount of data that is required for this project. Most of
this data has been collected by other researchers in the project team for developing
the RSSF. The data was collected based on its relevance to sustainability, focussing
on three key aspects: social, economical and environmental. For each of these
aspects, there are number of sustainability indicators that determined what data was
to be collected, as well as the availability of data.
an easily (and quickly) retrievable format. For database development, two freely
available options are MySQL and PostgreSQL. Both of these database servers
provide support for spatial data. For this project MySQL is chosen as the preferred
database server. MySQL is an open source relational database management system
with a large community base. It is the most popular freely available database used in
the world and therefore it is easy to obtain help and support through many forums
and mailing lists. The current QUT development servers already support
development using MySQL, without the need for further setting up and
configuration.
MySQL also supports the handling of spatial data through its spatial extension.
MapGuide provides the Feature Data Objects (FDO) data access technology to
connect to MySQL and access this spatial data. The architecture of the FDO provider
is depicted in Figure 2. The purpose of FDO is to provide a means to access spatial
data from different spatial storages and formats. In terms of support for storages it is
not just limited to MySQL. The FDO, through various different providers, supports
connections to Oracle Spatial, SQL Server, ArcSDE ODBC, OpenGIS Web Map
Service (WMS), Web Feature Service (WFS) and various different raster formats. In
addition to this it also supports using the ESRI Shapefile format (SHP) and the
Autodesk Spatial Data Format (SDF). SHP is a very popular spatial vector data
format developed and regulated by ESRI and is to the most extent considered an
open standard. SHP is an industry standard format and thus most of the spatial data
that is available and useful for this project is in this format. MapGuides support of
this format through the FDO provider is therefore very beneficial.
Other than attribute data, the system also requires spatial data, that is, raster
and vector-based geographical data. Raster data is simply images of maps such as
satellite imagery or drawings with a projected coordinate system. On the other hand
vector geographical data consists of points, lines and polygons to represent geometric
features. These carry with them a coordinate system and scales. They usually come
in table format, specifying the values that make up the shapes in relation to their
position in space. Since vector geographical data uses numerical means to represent a
map we need to use a GIS viewer to visualise these data. A GIS viewer processes the
vector data and renders it to an image. As a result, the maps generated in this way do
not lose quality when zoomed in, because a new image can be generated for this new
zoom level with an expanded scale.
Usually one particular spatial data file (for example a SHP file) consists of a set
of features, such as the geometry and location of all the rivers and lakes in
Queensland with each lake or river being the feature. Such a collection of features is
termed a layer. Combining these layers together forms a map. As mentioned
previously, spatial data is represented using lines, points and polygons and may need
to be customised in terms of the colour, font size, line thickness, transparency and by
omission of certain features.
MapGuide Ajax interface layout. It can be used to adjust the size of the columns, to
enable or disable certain buttons or panels and to add new tasks to the application.
To start the user interface construction, spatial data for the study area needs to
be obtained. Here, it needs to be shown on a map of the Queensland region relative
to other areas, to reflect the rural context. A number of layers need to be created to
represent the different interests within these regions such as locality boundaries, land
use mappings and dams and lakes. For this project all the spatial data used is in SHP
vector format. We purchased this data from the Department of Environment and
Resource Management (DERM). The ordered package was sent to us in a DVD and
it included general purpose maps, Land vegetation and water maps and property
information data.
It was proposed to initially develop the system for one specific rural location as
it can later be easily expanded to more areas by integrating more data. The chosen
areas were the Western and Southern Downs Local Government Areas. From the
DERM spatial dataset, the necessary data files relating to these areas were chosen
and included in a map package as described in section 4.4.1.
3.3 CHARTS
The map resources needed for MapGuide are specified as XML documents.
MapGuide Maestro provides a graphical tool to create and customise these
documents. It also automatically validated these XML documents against an
appropriate schema definition. It can be used to create connection to spatial data,
create Layers, define maps and modify the MapGuide client interface (layout). Using
MapGuide Maestro we created a map package for our tool. This package was then
placed in the package directory of the mapguide server from where it was served and
rendered on the client tire.
3.5 SUMMARY
The technologies used in this research are mostly open source and freely
available options. For map rendering and serving we used MapGuide Open Source. It
follows the common three-tier architecture for web-based application development:
server tier, web tier and client tier. The server tier features the MapGuide server and
our chosen database platform, which is MySQL. For the web-tier development we
used the Java/Tomcat combination. A customised version of the MapGuide AJAX
viewer is used as the client tier. To support chart generation we used the JFreeChart
Java library. Using the MapGuide Java API, we created the application logic to link
the MapGuide AJAX viewer with the MapGuide server and the MySQL database.
The specifics of this are described in the following chapters.
For better quality and easy integration we utilised vector-based spatial data.
The spatial data is directly stored on the server library, avoiding the need to
transform it on to a relational database. It is modified, manipulated and connected to
the MapGuide server using the MapGuide Maestro desktop application. Table 2
gives a summary of the main technologies used.
The technologies described above are set up and integrated to initially form the
basic system. Subsequently new tasks were added to this system to further extend
and customise the functionality to form the final system. This section gives an
overview of the MapGuide installation. Figure 3 below shows an abstract flow chart
of the integration process. A detailed description about our approach is specified in
the following sections.
SHP
ClippedSHP
Map ArcGIS
Data
Data
MapGuide
Maestro
MapPackage
WebTier
ApplicationLogic
MapGuide
SpatialServer MapGuideJSPCode
CustomTasks
ClientTier
ServerTier Libraries
WebBrowser
MapGuide AJAXViewer
MySQLConnector
JreeChart
MySQLDatabase
Classes
DatabaseAccess
DatabaseConnection
Attribute
Data
As previously mentioned, for this project we use the Tomcat web server
extension. The web extension here forms the web tier of the application architecture
described previously. Within the web extensions directory is the Apache server,
Tomcat server and the PHP installation that is required for the core operation of
MapGuide. Alongside this is the root directory of the application (AppRoot) named
www. This directory consists of all the Java/JSP and PHP files necessary to generate
the basic interface and render the maps on the clients browser. New files can be
added here or the existing ones modified to extend the behaviour and appearance of
the application. All the files necessary for our tool are placed in this directory under a
new directory called rssfTool. In addition to the basic interface, MapGuide also
provides a client-based site administration facility written in PHP. The files
necessary for this are also located under [<MGROOT>\www\] mapadmin directory.
The installer configures the Apache server to be setup on port 8008. The
Apache server is the main access point to the tool. Since we are using Java/JSP to
develop the application the Java version of the application files and the newly added
extensions and tasks to the application are all forwarded to the Tomcat server. The
AppRoot directory, www, itself is given the alias mapguide in the Apache
configuration, to be referred to as such when used in an URL. For example when
referring to the main file of the application using a web browser the following URL
will be used: serveraddress:8008/mapguide/rssfTool/ajaxviewerRSSF.jsp. All of the above
configurations are performed using the configuration file, httpd.conf, located in the
conf directory of the Apache installation.
The Server sub directory, among the two that were mentioned at the beginning,
is for the MapGuide server installation. This is where the packages of spatial data are
uploaded to. This, together with the MySQL database server, forms the server tier.
The Figure 4 shows the directory structure of MapGuide open source 2.0 and the
associated tiers.
MapGuideOpen
Source2.0
Server
ServerTier
Packages
WebServerExtensions
Tomcat
bin
lib
www
mapadmin
mapagent
mapviewerjava
ClientTier
viewerfiles
rssfTool
WebTier
WEBINF
4.2 IMPLEMENTATION
To implement our tool, we first installed the MapGuide open source 2.0
package (MgServerSetup-2.0.2.3011.exe), as described above, on our development
machine. The default installation included the MapGuide spatial server and the
MapGuide client Ajax interface. During the installation process, we opted for
installing the Apache Tomcat web server extension for our web tier. This was so that
we could develop custom extensions to MapGuide using Java/JSP.
<%
// Initialize a JSP session and register a variable to hold the
// session id, then initialize the Web Extensions, and connect
// to the site, and create a session.
InitializeWebTier();
MgUserInformation userInfo = new MgUserInformation("Anonymous", "");
MgSite site = new MgSite();
site.Open(userInfo);
String sessionId = site.CreateSession();
String webLayout =
"Library://Samples/Sheboygan/Layouts/SheboyganJsp.WebLayout";
%>
Due to the limited time frame of this research and the limited availability of
data, the decision support aspect was scoped appropriately. It was decided that this
research will only focus on the integration and presentation of data for decision
support. The research and development of statistical and econometric modelling were
considered out of scope but a possible extension to the tool, which could be
incorporated in the future. The research approach focused on the overall architecture
of the system and how different components could be integrated. Under these
constraints the resulting tool can be categorised as an Information Handline Tool
according to Hershs classification of decision support systems (Hersh, 1999).
According to the planning process described by Tornqvist, this tool would be useful
in the Awareness Raising and Shaping Modes of the planning process (Tornqvist
et al., 2008).
this task was to categorically display localities on the map, that falls above or below
a specified standard or threshold value for a given core indicator. This could be used
to easily identify performance gaps and differences between localities. The ability to
generate and display time series charts was also considered an important feature for
the proposed decision support tool. This was a key requirement for the rural council
decisions makers. Another important feature that was addressed during our
discussions was the ability to perform impact assessment. This feature involves
predicting how a change in a particular core indicator value, for a certain locality or
an area, affects the localities main services. Therefore it required advanced analysis
and modelling capabilities and as this research did not focus on this aspect, the task
we developed only focused on the input retrieval, processing and display. The
appropriate modelling and analysis capability were decided to be developed and
integrated to the task in the future work.
Database Development
The following sections give detailed discussion of our approach in each of these
stages.
To apply MapGuide to our particular case, we first start off designing the
interface. As MapGuide Ajax viewer comes with the ability to display and interact
with spatial data, it required no additional development from us with regards to this.
What we did was to integrate the spatial data for the regions that this tool was
intended to be used in. We obtained this spatial data from the Department of
Environment and Resource Management (DERM, 2010). The spatial data obtained
from DERM was in Shapefile (shp) format. In order to use this spatial data with
MapGuide we performed a map building process.
As mentioned in the spatial data section, spatial data formats (in our case the
SHP format) can be modified, manipulated and combined into a map package using
MapGuide Maestro. It is important to keep the size of each data file to a minimum,
as much as possible as this tool will ultimately need to be accessed via the internet,
and given the lower bandwidth of the internet (in particularly, for local councils in
rural growing regions) the size of the data determines the load time of the tool.
However the spatial data obtained from DERM covered the whole of Queensland.
Using all of this data made the application unnecessarily slower. Therefore, we made
a separate copy of some of these SHP files to only include the data for the Western
and Southern Downs regions. We used ArcGIS to do this.
To restrict the spatial data, to the Western and Southern Downs regions, we
used a full copy of the Local Government Area (LGA) layer and removed all other
LGAs on that layer. This new layer was then placed on top of other SHP layer files
that we were interested in customising, to extract the relevant portions using the
clipper tool provided in ArcGIS. This was the only occasion proprietary software
was used in the development of the tool. As mentioned, ArcGIS was only used at the
initial stage of the development for minor data processing purposes. Once the spatial
data was put into the appropriate form we continued to use those data without
depending on ArcGIS.
element structure used in the map building process. This particular example depicts
the LGA Boundary spatial connection and all the necessary data files associated with
that connection.
In MapGuide Maestro we also created a layout for the web application. This
was specified under the Layouts element. The layout we created was based on the
default layout template. We named it simpleJsp. We edited this layout to increase the
width of the task display area to 450 Pixels, as we found the default value to be too
small. Figure 8 shows the screen for MapGuide Maestro layout setup. After we have
completed map definition in MapGuide Maestro, all of the map resources (the SHP
spatial data, layer, layout and map definition files) were then exported to a map
package.
We then placed this package in the package directory of the MapGuide server.
To load this package we used the site administrator facility (Site Administrator is
accessed using a web browser by pointing it to the URL:
serveraddress:8008/mapguide/admin/login.php). Once logged in, we select Manage
Packages from the left menu. The package that was placed on the package directory
appeared under load packages in the newly loaded web page. We selected this
package and clicked on Load Package. Once this was completed, all the spatial
data within the package could be accessed via the web tier and rendered on the client
tier.
Instead of connecting all the SHP files directly via MapGuide Maestro as
described above, we could also load all the spatial data to the MySQL database, and
then connect it to MapGuide application using MapGuide Maestro and its MySQL
FDO provider. This approach was not pursued as this data is likely to remain
relatively static and therefore placing them on a relational database would create an
unnecessary overhead due to database connection and querying. Instead, we use
MySQL to simply store all the attribute data belonging to environmental, economic
and social categories for each of the regions.
As the interface of the tool was used for decision support purposes it therefore
required the capability to present statistical data. A good way to visualise statistical
data is by using charts. Therefore, we extended the MapGuide AJAX interface to
facilitate this.
As indicated in the Technology and Data section, we used JfreeChart for chart
generation. To use JfreeChart, we downloaded the latest JfreeChart Java library
(jfreechart-1.0.13.jar) (Gilbert, 2009). We then placed this file in the
[MGROOT\WebServerExtensions\www\WEB-INF\] lib directory of our tomcat web tier.
With JfreeChart, we generated charts as PNG images on the server. Each of our Java
based tasks, which generated a chart as output, was designed to generate the code
necessary to embed that chart on to a web page. This was, to use the newly created
chart image name and location, to generate a HTML image tag and store it in a Java
String variable. We use Ajax to transfer this string, as an output, back to the request
initiated JavaScript function in the client tier. When this function receives the
response, it passes it to our toggleContent() JavaScript function which retrieves the
appropriate tag from the MapGuides map frame and attaches the code (the chart
image) to it.
The custom tasks for this application were populated on the task display area.
An available list of the tasks can be viewed by clicking on the task icon located on
the top right corner of the task display area. When this icon was clicked, a call was
made to OpenTaskMenu() JavaScript function which was provided as part of the
MapGuide JavaScript API. This function was specified in the HTML code located in
the task frame [<MGROOT>\ WebServerExtensions \www\viewerfiles\taskframe.templ]. Once
the application was generated on the web browser, the OpenTaskMenu() function
toggled the task list i.e. it slides it open just so that there was enough space to display
all of the available tasks. This is depicted in Figure 9. The default MapGuide
behaviour was to hide the task list in the initial load. The user must click on the
Tasks button to unfold the list and this list was retracted back after a set amount of
time. This made it difficult for the user to locate the tasks and thus reduced the
usability and efficiency of the tool. Therefore, we modified the OpenTaskMenu()
function to add an initial slide operation when the tool loads and to disable the timed
retraction of the task list.
The specific tasks that need to appear in this list were added to the simpleJsp
layout that we created in MapGuide Maestro. In MapGuide Maestro, we specified a
task with a name and a link to the file that needed to be invoked to perform the task.
Figure 10 shows an example of this for the locality classification task. As we used
the Java web extension for our web tier all of the tasks were developed in this
language.
The Majority of the attribute data for this project was available to us in Excel
format. The researches involved in collecting the data had organised the data in to a
simple and easy to use structure. This data was categorised as per the environmental,
economic and social categories. Each of these categories consisted of a set of themes,
each of these themes consisted of a set of issues and a particular issue had number of
core indicators.
In the EER diagram we specified the relationship between each of these tables.
The set of region names for which the data in the table belong to were stored in the
regions table. We specified the regions and the coreIndicators tables to have a
many-to-many relationship as one region can have multiple coreIndicators and one
coreIndicator can belong to many regions. This relationship was specified using the
intermediate table coreIndicatorsData. The coreIndicatorsData table also stored the
year to which a specific core indicator data belong to. To prevent duplication of data
in the coreindicatorsdata table, we specified a combined UNIQUE constrain on the
RegionsID, CoreIndicatorsID and Year columns. Figure 11 shows the database
tables and their relationships.
To connect to the database from our proposed tasks, we used the MySQL Java
connector (mysql-connector-java-5.1.10-bin.jar). This connector operates over the
Java Database Connectivity (JDBC) API. We placed this file in the following
directory: [<MGROOT>\WebServerExtensions\www\WEB-INF\lib].
To help query the database from our tasks, we created two Java classes. These
were the DatabaseConnection and DatabaseAccess classes. The
DatabaseConnection class stored all the information such as the driver name,
database location address, username and password that was necessary to make a
successful connection to the database. DatabaseAccess took an instance of
DatabaseConnection class as input to establish a connection. It consisted of methods
to load the drivers, make procedure calls, execute SQL query statements and update
statements that were passed as strings.
All custom tasks for MapGuide were developed using Java/JSP. These tasks
extended the web tier of MapGuide. To setup the environment for our tasks we
created another directory called, rssfTool inside the [<MGROOT>\WebServerExtensions\]
www directory. We copied the ajaxviewersample.jsp to this directory and renamed it
to ajaxviewerRSSF.jsp. Then we modified this file to point to our map layout that we
generated and stored in the mapguide spatial server with MapGuide Maestro. We did
this by modifying the webLayout variable to point to
"Library://QLD/Layouts/simpleJsp.WebLayout". We also created a number of other
directories under rssfTool directory for each of our tasks. The main files within these
directories were linked to the simpleJsp layout as described previously in Task
Display section.
Each of our tasks required the ability to communicate with the server tier and
client tier (interface). MapGuide comes with a developer guide and a Java
Application programming interface (API). The Java API gives description about all
of the Java classes that were implemented to access the MapGuide spatial server. To
use this API, the MapGuideApi.jar file needed to be placed in the
[\<MGROOT>\WebServerExtensions\Tomcat\] lib directory. This was done for us
automatically during the installation as we opted for the Tomcat web server
extension. MapGuide also provide a JavaScript API, which can be used in our
JavaScript code to communicate with the client tier. We used it to perform operations
such as getting and clearing the user selected items on the map, setting the zoom and
scale of the map, and refreshing the map. As indicated in the beginning of this
chapter, this client tier was generated by the MapGuide JSP files inside
[<MGROOT>\WebServerExtensions\www\] mapviewerjava directory.
Initially, to develop JSP code we used a simple text editor with syntax
highlighting, called PSPad. JSP files
usually consist of code from Java,
JavaScript and HTML. As a result most
text editors in this situation fail to provide
adequate syntax highlight. However,
PSPad was able to apply syntax
highlighting for the three languages
separately within the same file. This made
it easier to edit the code with PSPad.
However, the downside to using PSPad
was that it provided no syntax error
checking. The only way these errors were
correct was after testing each of those
tasks on a browser. Since in this case, the
tomcat server attempted to compile and
run the code and generated errors if it
failed. As this was a time consuming
process, we later decided to use Eclipse
(3.6) to develop the code. The advantage Figure 12: Eclipse Project Directories
of Eclipse was that it provided automatic syntax and dependency error checking
capability in addition to multiple language syntax highlighting. This increased our
software development productivity, as all syntax errors were shown and corrected in
real time while writing the code. As a result of this, when functional testing was
performed only the relevant runtime problems were detected.
The downside to using Eclipse was that it required more setting up. However,
once these settings were made, it operated smoothly. To develop software in eclipse
we had to create a new Dynamic Web project. We called this project MapGuide.
When the Dynamic Web project option was selected, Eclipse automatically
generated the directory structure for the project. Within this directory structure was
the WebContent directory where the java files needed by the web application were
placed. However, we were not able to simply create our task files directly under this
directory as these tasks need other dependent libraries that were not available in the
Eclipse directories. These dependencies were installed in the MapGuide server
directories. Creating our tasks directly in the Eclipse directory produced dependency
errors by the automatic builder. This made it difficult to distinguish normal Java
errors from the dependency errors and therefore defeated the purpose of using
Eclipse.
One way to overcome this was to copy all the Java dependencies from
MapGuide server directory to the MapGuide project directory in Eclipse. However,
with this approach at the end of writing the code, all the new files needed to be
moved back to the MapGuide server directory, so that it could be run and tested as a
web application.
To avoid all this, we replicated our MapGuide server directory structure within
the Eclipse project. To do this we emptied the WebContent directory to delete all the
automatically generated content. Then we used the directory link feature in Eclipse to
create links within the WebConent directory to all the necessary MapGuide server
directories. This included mapviewerjava (MapGuide JSP libraries), WEB-INF
(MapGuide and other Jar libraries) and our task directory rssfTool. Figure 12 shows
the final directory structure and the linked directories within Eclipse. Once this was
completed, we verified that all the libraries were added correctly by right clicking on
the project name (MapGuide) and clicking properties. This loaded the properties for
the project. In project properties, from the left menu, we selected the Java Build path
section and clicked on libraries tab. This provided a list of all the libraries used in
building the project.
Each of our tasks were developed using a number of Java classes and JSP files.
For each task we designed a main JSP file, a request handling method and a
processing class. The main JSP file for each task was responsible for generating the
task interface. Within the source code of this file, we used a JavaScript asynchronous
POST request to pass the user input to the particular handling method. The request
handling method retrieves these inputs and initiates the appropriate processing.
We also had the option of creating Java classes, called Servlets, to do the
request handling. Since every time changes were made to a Java class, it required
manual compiling and restarting of the tomcat server, this approach was considered
inefficient to use. Therefore all of the Java methods and classes designed for our
tasks were in JSP format. However we designed the DatabaseAccess and
DatabaseConnection classes to be normal Java classes. This was important,
especially for the database connection class, as it stored the username and password
of the database. Once this class was compiled and stored on the server, no third party
was able to easily see this information, even if they had access to the server, as the
compiled file was in binary format.
The processing class was designed to process the user inputs and generate the
necessary output. To simplify the processing of the input we broke down this stage
and spread it over a number of classes. Doing it in this way improved the
interoperability and readability of the code and made it easier to debug the code. At
the end of the processing stage, the output was returned back to the handling method.
The handling method used this output and generated the user output. Depending on
the task, we displayed the user output on the map, on the task page or using both
methods. The diagrams in Figure 13 show the structure of the code for each of the
tasks. The Section 5.2 gives more detailed description about the final product of our
tasks and how their algorithms work.
Classification.jsp
Trend.jsp
HandleCFN.jsp
HandleTrend.jsp
ProcessCFN.jsp
TimeSeries.jsp
Update.jsp ImpactAssess.jsp
HandleUpdate.jsp
ProcessIAS.jsp
BarChart.jsp
We tested our tasks and the web application on Internet Explorer 8 and Firefox
3.6 browsers. To load the web application in the browser we used to the following
URL: http://localhost:8008/mapguide/rssfTool/ajaxviewerRSSF.jsp. This loaded the main
interface and our tasks. We selected each of the tasks we were working on to test
their functionality. Tasks that did not depend on other MapGuide components were
also tested separately. For example the database update task was accessed in this
way: http://localhost:8008/mapguide/rssfTool/dev_update/update.jsp. This only loaded the task
without other MapGuide layout components.
To monitor the progress and failure of a task, we used Java print statements
(System.out.println()), which specified each of the main steps the task was about to
execute and the content of its main variables. These print statements were surround
with a if(DEBUG) condition. The DEBUG variable used was a final static Boolean
variable, declared in global scope. It allowed us to easily turn off debugging by
setting its value to false. To see these print statements we had to run the Tomcat
server in console mode. To do this we ran the startup.bat file located in the
[MGROOT\WebServerExtensions\Tomcat] bin directory. The console mode also displayed
other standard Java error messages such as database connection errors. Figure 14
shows the output of the Tomcat console after running the locality classification task.
4.7 SUMMARY
To start developing the tool we first installed the mapguide package and the
available samples. We then familiarised our self of using the MapGuide technology
with the help of MapGuide documentation and the source code. To apply MapGuide
to our problem, we first obtained, customised and integrated the relevant spatial data.
Then we extended the MapGuide interface to support chart display. Next, we
designed and developed the database to store and retrieve the available data. Finally,
we developed and integrated four tasks to support decision making. The general
structure of these tasks consists of an interface generating JSP file, a request handling
method and a processing class. The resulting web application was tested in Internet
Explorer 8 and Firefox 3.6. To debug Java code of our application we utilised the
tomcat console and for JavaScript we used the embedded debuggers in each of the
browser.
The RSSF tool provides easy access and interactive manipulation of data for
rural decision making. The tool handles such capabilities through a number of
custom developed tasks and through the use of the interactive MapGuide AJAX
interface for spatial data manipulation. As described in the previous chapter, the
basic three tier architecture of MapGuide was extended to incorporate other
technologies and custom tasks to fulfil the objectives of the decision support tool.
This chapter discusses the outcome of our development. The final version of this tool
can be accessed from the following web page: http://www.growingregions.org.au/.
5.1 INTERFACE
The interface of our tool is developed based on this Ajax viewer. Figure 15
shows how the final version of our tool looks when it is initially loaded. As
highlighted in Figure 15, the interface consists of four main areas. These are the
legend display, property display, map display and task display areas.
Legend Display
Task Display
Property
Display Map Display
To make the interface useful for the context in which it is used and to provide
the user with spatial visual feedback, we have incorporated the appropriate spatial
data. These spatial data belong to the Western and Southern Down regions. The user
can use various tools to navigate around these spatial data. The user can move around
on the map using the pan tool. This tool can be activated by clicking on the hand icon
tool located on the toolbar at the top of map display area. Alternatively, the user can
also use the compass buttons beneath the zoom scale to move around the map. The
user can also zoom in on the map by using the mouse wheel or by clicking on the
scale located at the top right corner of the map display area. Zooming in on the map
reveals more layers and shows more detail. There are three distinct zoom levels
available to the user. These are the region, locality and street/property level. Initially,
the user is presented with a map that shows the regional areas of Queensland. If the
user wishes to see a specific area, for example the property packages for the locality
Chinchilla, then from the initial screen they need to pan on to its region (in this case
the Western Downs region). From here, they need to zoom down to reveal the
localities that belong to that region. Finally they again pan to find the locality
(Chinchilla) and zoom down to reveal the street and property level detail. A portion
of the street level detail for Chinchilla is shown on Figure 16 . The toolbar also
provides a quick way to zoom to a specific location on the map. This is done using
the Zoom To drop down menu. Clicking on the Zoom To icon reveals to the user
a list of available locations from which to choose. Clicking on one of these locations
centres and scales that location on the map display area. Pre-defined locations can be
added here to make the navigation more efficient.
The interface also allows the user to enable and disable certain features that are
displayed on the map. As shown on Figure 16 this can be done by clicking on the
check box next to the desired layer on the legend display area. For example, when
viewing the street level details, if the user wants to know to which locality the part of
the map that is displayed belongs, they can simply place a check on the Locality
Boundaries layer on the legend display area. This will place an outline of the
locality boundaries on the map.
Figure 16: Street Level Detail for Chinchilla with the Locality Outline
The interface also allows the user to select certain features of the map. The
default behaviour for selecting a feature is using a single left mouse click on the
desired feature. However, if the user has activated the pan tool this behaviour is
overridden and therefore it needs to be reactivated by clicking on the arrow icon on
the toolbar. When a feature is selected, the data that is used to describe the feature,
such as its name and type, is loaded to the property display areas. The user can also
select multiple features by left clicking with the mouse and dragging (highlighting)
on the map to select an area. The feature selection tool helps to interactively receive
spatially oriented inputs from the user.
So far the description has focused on the visual, interactive and usability aspect
of the tool. As these aspects focus on the presentation of spatial data to the user, it
can be categorised as the GIS component of the tool. The system tasks that we
developed and integrated are described in this section. These tasks add the decision
support component. With this addition, the tool can be classified as a spatial decision
support system.
We created four tasks to help in the decision making-process. These are the
Localities Classification, Trend Display, Impact Assessment, and Data Entry and
Update. Table 3 gives a brief description of each of these tasks. These tasks are
structured using a number of classes and methods.
Task Function
Localities The user is able to select certain indicators such as
Classification population, employment or number of housing and to classify
them in terms of political/administrative or regional divisions
in order to discover performance differences.
Data Trend Display The user is able to select political/administrative divisions
and to view trends associated with core indicators such as
population and employment, based on past data.
Impact Assessment The impact assessment task helps the user to view the
changes to services when certain core-indicator values are
modified.
Data Entry and Update The user can directly access the data in the database to
modify and update, with the ability to view multiple
combinations of records. Also they have the ability to add
new core indicators to the database.
The aim of this task is to provide the user with a means to generate thematic
maps interactively. Thematic mapping is defined as the ability of a GIS to filter data
and to selectively display it using different colours, styles or symbols (Caldeweyher
et al., 2006). This task is important in categorising and viewing certain indicators
such as population, employment and number of hospitals, in terms of
political/administrative or regional divisions, in order to easily discriminate between
them. This particular implementation aims to categorise different localities in terms
of the chosen indicator and according to a given threshold value. For example, the
number of hospital beds per thousand people and the corresponding standard that is
specified by government policy. Performing such classification enables the user to
easily visualise which localities within a Local Government Area fall above or below
a certain standard.
For this task to work a number of structural components are required. First, the
user needs to provide the necessary information through the client tier. The source
code for this task is documented in Appendix A. This task is populated in the task
pane area. As shown in Figure 17, the user specifies the region to be classified by
dragging with the mouse on the map or by holding the Ctrl key and clicking on
multiple individual localities. Then the user can load the task from the task drop
down list located at the top of the task pane. This will load the task and display to the
user the selected regions. Alongside this the user can choose the indicator of interest
using the drop down box provided. Beneath this the user specifies the threshold for
the selected indicator. Finally, clicking on the classify button sends this information
to the web tier.
The task processes the inputs and generates a colour coded layer based on the
processing. This is shown on Figure 18. The task resets the scale of the map so that
all the localities that are classified are in range. The task also generates and displays
a table describing the regions that were selected, along with the data and the year of
the data that was used in the processing.
The chart is generated as a PNG file and saved on the server. It is displayed to
the user as described previously in section 4.4.2. Initially we generated the lines on
the chart using single continuous lines. This became a problem when distinguishing
between years that had data, from years with no data, as a continuous line can be
drawn through a number of years hiding the years that have no data. This can make
the user come to the wrong conclusion that there is some steady growth over a
certain period of years, when in fact the chart only shows the data for the beginning
and end years. To avoid this ambiguity, we chose to place symbols for each of the
data points in the chart. Figure 20 below shows one particular time series chart that is
generated using this task. It compares the total government students, total non-
government students and the total students for Stanthorpe between the years 2002
and 2008.
Figure 20: Final Output of the Task for One Particular Selection
The aim of this task is to show the user how the changes in one core indicator
dataset affect main services. The prediction of how the dataset will change needs to
be based on a statistical model. The limited availability of data and the complexity of
the problem have made it difficult to incorporate such modelling capability in time.
However, the research conducted by the economic division of this project has
managed to produce a possible model that could be incorporated in to this tool. It is
described in the paper: Forecasting Population Changes and Service Requirements
in the Regions: A Study of Two Regional Councils in Queensland, Australia
(Athukorala et al.)
In this version of the tool however, we only address the visual aspect and the
web tier logic in executing the impact assessment task. Visually we present the
outcome using side-by-side bar graphs which display the current value of the datasets
and their predicted change. Due to the lack of data availability we restrict the
changes to be displayed only for the widely available datasets. These are the
Population, Number of Hospitals beds and Number of Police. This task helps to
demonstrate the capability of the tool to integrate a model alone with the available
data and user interface. In subsequent versions of the tool, the proper statistical
models can be incorporated, as further described in the implementation section 5.3.3,
to improve the tool.
For this to work, the user must first select a locality by clicking on the
appropriate feature on the map and then loading the impact assessment task from the
task list, which will populate it on the task pane. The interface of the task gives the
user a systematic approach in selecting the necessary dataset. First, the user selects
the category of the dataset from environmental, economic or social categories. This
is presented to the user as three radio buttons. Selecting this populates the themes and
issues belonging to that category from the database into two drop down boxes (these
drop-down boxes are placed beneath the category selection buttons).
Second, changing the theme will make the issue values update according to the
selected theme. Third, once the user has selected a particular issue they can then
choose a dataset that belongs to that issue. Selecting the dataset and clicking apply
loads the controls to specify the necessary changes in that dataset. For example, say
the user selected the farm as the dataset, and then the user can specify the number of
farms they would like to increase. The user then selects from the three output
categories: peri-urban development, land and water, and labour resources to see the
effects of the changes. When the user submits the request, the number specifying
their change along with the output category is passed to the web tier. Figure 21
shows the interface for this task. The output chart is shown in Figure 22.
choose from. Alongside the core indicator is the measurement, which is displayed so
the user is able to identify what kind of data is stored in a particular core indicator.
The regions, core indicator and measurement are displayed using expanded select
boxes. This is so that the user can quickly see their content without having to scroll
too much.
When the task is initially loaded from the task list, it displays the data for the
current year. The user can select a new year by clicking on the drop down list. The
years displayed here are loaded directly from the database after retrieving the unique
values. When the user selects a new year, the page reloads again to update the select
boxes. The user can change the region to load core-indicator data belonging to that
region.
Beneath the core indicators and measurement select boxes is a text box that
specifies the value of the selected core indicator. This value is also loaded in a
similar fashion as described previously. It is updated as the user clicks on different
core indicators. The user can update a core-indicator value specified here, by
overwriting the current value with a new one and clicking on the update button
located next to it. When the user clicks on the update button it forms a request to
send all the currently selected items in the user interface such as the year, region
name, and core indicator together with the newly entered core indicator value to the
UpdateValue Java class. This class then forms the necessary update SQL statement
and saves the entered data to our MySQL database.
This task also provides a way for the user to view multiple core-indicator and
region data in a table format. To use this, the user needs to specify the necessary core
indicators and the regions for a given year. This is done by double clicking on each
core indicator and region of interest that is available in the select boxes. As shown in
Figure 24, the double clicked items are placed in the empty select boxes located at
the bottom of the task window. The user can also click and drag on the core
indicators in the select box to select multiple items. Multiple selections can be loaded
into the empty select box by clicking the Get Selected Items button located beneath
the empty select boxes. Once the required items are displayed in the core indicators
and the regions select boxes, the user can then click Load Table button to display
this data in table format.
In this new popup window, underneath the generated table is a button that can
be clicked on to update the database with the data in the table cells. The user can
choose to modify any of the cells, or leave them as is, and then click the update
button. This saves the data in to the database.
Using this table generation method the user can quickly update multiple sets of
values more intuitively. In addition to this, it also provides an easy way to visualise
and compare different regions for a given set of core indicators.
5.3.1 CLASSIFICATION
For this task we created two Java classes, HandleCFN and ProcessCFN, to
perform its operation. This task is designed so that the user can specify locality
selection by selecting them on the map.
When the user submits the request to perform the task, the HandleCFN class
initialises a location object for each selected locality in the map and stores in it the
locality name and the feature ID. Feature ID is a unique ID given to a spatial feature
in a certain spatial feature set. This is similar to a primary key of a relational database
table. The initialised location objects are stored in an array list called the featureList.
HandleCFN then creates an instance of the object ProcessCFN and passes it the user
selected featureList, indicator names, and threshold value along with the MapGuide
session ID (MgSeesionId) and the MapGuide map name (MgMapName). The
ProcessCFN class is responsible for most of the logic implemented in this task.
Before going into detail it is important to understand how MapGuide stores features
in its library and how to dynamically modify this for a particular purpose.
The actual visual customisation is specified under the AreaRule tag, which is a
child of the VectorScaleRange tag. The AreaRule tag itself, consists of a number of
child tags, such as the Filter, ForegroundColor, BackgroundColor, FontName and
BackgroundStyle, all of which can be used to customise a particular layer. Out of all
the child tags under AreaRule tag, the one of most interest to us is the Filter tag. This
tag can be used to specify expressions that can be used to filter certain data from the
spatial dataset. We can use this tag to filter and group different features that belong
to a certain classification according to our calculations. To perform the filtering we
simply list the IDs of the desired features separated with an OR statement inside the
filter tag. This makes the customisations specified, under one particular declaration
of the AreaRule tag (in that XML resource), apply only to those features that are
listed in the filter tag. By having multiple AreaRule tag declarations, with different
feature IDs in the filter tag, we are able to have multiple different categories of
classification.
We designed a separate Java class to obtain the desired XML resource, modify
it and to store it back on to the server tier. This class is called the Filter. To abstract
the handling of the XML documents, we also created a separate class called
HandleXML(). Both of these classes are initialised in the ProcessCFN class, as this is
where the algorithm for this task is implemented.
The genColorMap() method simply creates a Java map of the colours that will
be used in the classification. It uses the English name of the colour as the key and the
hexadecimal colour code as the value of the Java map. This allows more intuitive
referral of the colours throughout our program. The getData() method, creates an
SQL statement using the feature names and the dataset name, to fetch the necessary
data from the database. This statement is then executed using the database access
object which returns the result set of the query. This result set is then iterated and the
corresponding data stored in the appropriate location objects.
LocationSet Array
The size of
these depend on
how many Locality 1 Locality 3 Locality 6 Locality 5
localities
Locality 4 Locality 7 Locality 8 Locality 3
belong to each
of the . . ..
categories ..
. . .
.
. .
Next step in the setFilter() method is to initialise the Filter object, passing it
the MapGuide session ID, Map Name and the resource name. The resource name is
the name and location of the XML document that we are interested in modifying. In
this case we are classifying localities which are the features in the Localities
Boundary layer. Therefore the fully qualified resource name is
Library://DLB_SD/Layers/Locality_Boundaries.LayerDefinition. The Filter object uses the
MapGuideJavaAPI to access the current session of the map and fetches the
LayerDefinition XML where the user had made their selection. ProcessCFN, The
class that initialised the Filter, can retrieve this XML document by calling the
getLayerXML() method of the Filter object.
XML Processing
All XML parsing, modifying and building operations are performed by the
HandleXML object. What we are interested in modifying are the child elements
under the AreaRule tag of the layer definition XML. We need to create multiple of
these tags, one for each category. Therefore we created a separate template file called
arearule.templ with just the AreaRule tag and its content. As shown in Figure 27, in
the arearule.templ file, under the Filter and ForegroundColor child tags, we place a
%s symbol to indicate that the values for these will be populated by our code, at
runtime, to create a unique category for each of the deferring classes of localities.
The HandleXML object, parses the LayerDefinition XML for the locality layer
and retrieves the VectorScaleRange tag that contains the appropriate scale range
(between 9 and 45) we are interested in modifying. Once a string copy of the
arearule.templ file is updated with the appropriate values, it can be sent to the
updateXML() method of HandleXML. This method will then build that string into an
XML tag and attach it under the previously retrieved VectorScaleRange.
The ProcessCFN then retrieves the modified layer XML using the
getModLayer() method and passes it to the setLayer() method of the Filter object.
This method creates a new layer from the given XML definition, creates a category
called classification in which to place the new layer and appends all these updates to
the runtime library of the map.
In this task, the chart generation is handled by our TimeSeriesChart Java class.
The HandleTrend class initialises TimeSeriesChart and passes a ResultSet object as a
parameter. This ResultSet object consists of the data for the user selected items in the
interface. These data are retrieved from the database. The TimeSeriesChart utilises
the Java JFreeChart API to generate charts. To generate time series charts, our
TimeSeriesChart class requires a TimeSeriesCollection dataset. A
TimeSeriesCollection dataset is a data structure that is specified in the JFreeChart
API.
To further illustrate this, we can take the scenario where the user selects the
following three core indicators: Total government students, total non-government
students and total students for Stanthorpe locality between the years 2002 and 2008.
In this case, our listOfSeries Java ArrayList, would consist of three elements for each
of the three core indicators. Within these elements are the TimeSeries objects for
those core indicators. And each of these TimeSeries objects would consist of the
corresponding core-indicator data from the year 2002 to 2008.
Finally, TimeSeriesChart iterates through the Java list (listOfSeries) and adds
each of the available TimeSeries objects to the TimeSeriesCollection dataset. This is
done by calling the method addSeries() in TimeSeriesCollection class. This dataset is
then used in the createChart() method to form the time series chart.
As for other tasks, the handle class (HandleIAS) of this task retrieve the inputs
from the client tire (interface). It initialises an instance of the ProcessIAS class and
feeds the input to it. The ProcessIAS class initialises variables locationName,
datasetName and incrementValue. These variables are initialised to the parameters
from the interface. It then calls the getCurrentData() method which creates an SQL
statement based on the location name and the datasets that would be affected by the
user-selected dataset. As mentioned before we want to look for the changes in the
datasets of Population, Number of Hospitals and Number of Police. Once the
DatabaseAccess object has completed the query, its result is stored within
ProcessIAS. This ends the execution of the getCurrentData() method.
Next the ProcessIAS object calls the modelScenario() method. Within this
method the appropriate calculation and analysis, to accurately predict the changes, is
designed to take place. Once the appropriate model is developed, it can be
incorporated to the modelScenario() method. This model may be developed as a Java
class, in which case it would be initialised within this method and executed to receive
the result. If the model requires the execution of an external application such as an
advanced statistical package, we would need to have this installed in our server. We
could use the Java Runtime.exec() to execute this application within our
modelScenario() method. Then we could have the output of this program saved to a
file on the server and then read from our method to be used in further processing.
Since we dont have access to a sophisticated model that can be used for this
purpose, for this version of the task we simply linearly increase the current value
based on the specified change. Once the new data is obtained it is stored alongside
the current data in a Java Map variable.
Chart Generation
After completing the modelling part, the ProcessIAS object then calls the
generateChart() method. Here we use a separate class, called BarChart to perform
the chart generations. This chart generation class utilises the open source JFreeChart
Java library. It is designed to be able to initialise side-by-side or single bar charts. In
this case we are interested in the side-by-side bar charts. The generation of a side-by-
side bar chart occurs when the BarChart class is passed two, as opposed to one, Java
Maps as parameters. The class has the capability to create the appropriate chart and
save it as a PNG image on the server. Once ProcessIAS completes its execution, it
returns control back to HandleIAS. This is where the code necessary to display the
chart is generated and passed to the client tier.
This task is design to dynamically retrieve data upon user selection. The task
uses AJAX to handle this sort of data retrieval. The loadData() JavaScript function
initiate the AJAX request. This function takes the currently selected item in the
interface and the type of data to load as input parameters. It is attached to all
necessary HTML elements using their onChange and onClick properties. The
function is designed so that the input type can specify either a name of an indicator
or its value. For example, the user may specify to retrieve all the core-indicators
given a particular region or the value of a particular core- indicator and the region.
The type is setup as a string variable that could take the form of either ind or
val. When the user changes the name of the region it is the indicator name that
needs to be loaded therefore the loadData() function calls the loadIndicator()
function. This function sets up the parameters: region name, year and data type, to
retrieve a list of core indicators. Then using an AJAX request it passes these
parameters to the LoadData Java class.
The LoadData class retrieves these parameters and forms an SQL statement
and executes this statement over the DatabaseAccess object to retrieve a list of core
indicators and their measurements. Each of the core indicators that are retrieved for a
particular year and region are combined into a string with a , character separating
each individual name. The corresponding measurements are also combined into a
separate string in a similar way and the two are separated by a | character. The
finalised string is then set as the response output of the LoadData class. Once the
request is completed the control is then returned back to loadData() JavaScript
function that initialised the request. This function then invokes the call back method
getIndicator(). In this function the obtained response string is split by the |
character and by the , character to create two arrays of core indicators and
measurement names. These are then used to update the core indicators and
measurement select boxes in the interface.
Table Format
When the user makes this request, the values in the select boxes are submitted
as a form using the post method to the HandleUpdate Java class. This class can
handle two kinds of requests. The initial request is to use the items from the select
boxes to generate a table. The class uses two if statements to check which parameters
are available and then choose the appropriate request to perform.
To perform the table generation request, first we use the submitted core
indicators, regions and year values to form an SQL statement to retrieve the data
from the database. Once this data has been retrieved it is stored in a Java SQL
ResultSet object. We then loop through this ResultSet object to form the table. To aid
in forming this table, we use a two-dimensional array called table[][]. The number of
rows and columns in this array is determined by the number of core indicators and
regions in the ResultSet object. The retrieved ResultSet consists of three columns: the
region, core indicator and value. The objective is to translate this ResultSet into a
table format on to the two-dimensional array. We do this as we loop through the
ResultSet. This table will have one column for core indicator and one row for each
region. Therefore, for each row of the ResultSet, we check to see if the region has
changed. If so, we increment the row value of the table[][] two-dimensional array. If
when iterating through the ResultSet, the current row has the same region name as
the previous, then we store the corresponding core-indicator value in the column
position of the table array. The values in this array are stored as a HTML statement.
That is, using an input text box with its default value set to the actual data value. This
input text box represent a cell in the table. As our table cell is represented by an input
text box, the values in it can be modified and when the table is submitted it can
therefore be used to update the database. To facilitate this, we give the input text box
a name to uniquely identify it. It is important that this name corresponds to the order
in which the specified cells are created. Therefore the name is set to be a decimal
number that is incremented each time a cell is created. Once the ResultSet is
completely transformed into a table, the table[][] array is then written out to a new
popup window.
This will again call HandleUpdate which this time will execute the code for
updating the database with the values in the table. This request also occurs as a form
post operation as the table is designed to be part of a form. The cells of the table are
essentially text input fields. To update the data using the text field values we first
need to retrieve a ResultSet from the database restricted to the regions and
coreindicators in the table. This ResultSet will be a subset of the core-indicators table
in the database. When we have a ResultSet from just one table, JDBC allows us to
update the values of the actual table by updating the value of the ResultSet object.
5.4 SUMMARY
The system design consists of database, interface and application logic. The
database of the system is developed using MySQL. The interface of the tool is based
on MapGuide AJAX viewer. It is modified and extended for this particular case with
the help of MapGuide Maestro. This interface of the tool has good interactive
capabilities and behaviour similar to that of a desktop application. This makes it
intuitive to the user and therefore easy to use and understand. The application logic
of the system implements four tasks: Localities Classification, Trend Display, Impact
Assessment, and Data Entry and Update. The Localities Classification feature
enables the user to choose or filter required characteristics for a particular locality or
area. The Data Trend Display features help in visualising and displaying trends
based on past data. The Impact Assessment task helps the use to visualise how a
change in one core indicator can affect other main services, whilst the Data Entry and
Update task assists in accessing the database to make required modifications and
changes.
One thing to understand about MapGuide Maestro, that makes it easier to use,
is the fact that it is basically an intuitive graphical front end to edit all XML
resources. It provides various graphical components to easily specify configurations
for a given resource that is needed by the web application. All these configurations
are ultimately saved to an XML file. Maestro can also be used to view these resource
files directly in a text-based XML format. This is important as it helps to make batch
processing tasks much quicker. For example, when duplicating features in a
particular layer resource, we can simply copy the necessary XML segment and paste
it where necessary instead of having to follow all the steps in the graphical interface
to reconstruct it. One thing to beware of, when creating feature sources with
MapGuide Maestro and Shapefile format, is to make sure that we include all the
files that come with it. This includes the .shp file along with .shx, .dbf, .sbx,
.sbn and .prj files. These files are needed to set the metadata and correct
coordinate systems. It is also important that we specified the correct coordinate
system for all the feature sources in MapGuide Maestro, in order to get the correct
map scale and to enable advanced spatial analysis such as distance measuring and
buffer creation. Another problem with Maestros limited availability of good
documentation is that it makes it difficult to know about all FDO capabilities to build
expressions. These expressions are needed to specify different formatting on spatial
data, such as different colours for property parcels and appearance of the labels on
the map. Some of the FDO capabilities include the ability to perform comparisons,
conversions between strings and integers, and concatenation. A complete list of FDO
capabilities for each provider can be obtained from the MapGuide server that was
installed. To retrieve this, we need to browse to the mapagent page of the MapGuide
server. Assuming the server is on local host, this would be:
http://localhost:8008/mapguide/mapagent/. From this page, we choose Features under
Server API and then click on getCapabilities which returns a HTML form. In this
form, we need to make sure that the provider field specifies the provider that we
are interested in, for our case this is OSGeo.SHP. After submitting the form, the
server returns an XML document. This document, under each of the function
definition tags, gives a description about all the supported capabilities and their
inputs and outputs.
The final version of our tool implements four tasks to support the decision-
making process. These are the Localities Classification, Impact Assessment, Data
Trend Display and Data Entry and Update. These tasks help to automate
cumbersome and laborious data processing and analytical operations and provide
visual feedback to the user. This help to support quick, accurate and well informed
decision-making.
The localities classification task provides the user with a way to interactively
generate thematic maps. Generation of such thematic maps for a region is a
convenient way to identify localities that are performing poorly. The task uses the
most recent data available in the developed database, which means any changes are
immediately reflected in the output. Currently the task only allows the user to specify
a single limit for comparison. One way to improve this is to give the user the ability
to input a range of limits and generate the appropriate thematic output. This task
provides a good demonstration of the capability of MapGuide Open Source in
interacting and processing spatial data.
The Trend Display task gives the user a way to visualise changes in a specific
dataset over a period of time. The user selects a location on the map, loads the task,
selects the time range in years and selects what dataset to plot. As well as plotting the
trend for a single dataset, the task has the capability to plot multiple datasets. This
allows the user to compare interdependent datasets in terms of how they performed
over a particular time period. One limitation in this task is that when comparing
multiple datasets, the user cannot select datasets with different measurements. For
example data stored as a percentage compared with value-based data. This can be
solved by making sure that the data collection and recording process adheres to one
particular format. Also we need to be cautious when comparing different datasets
with a large gap between their values, which can make the graph scale stretch too
much, and therefore unable to display an apparent trend. One way to solve this would
be to apply normalisation do the two datasets (such as logarithmic normalisation)
before it is plotted. Another way would be to have stacked charts with different
scales.
The Data Update task provides the user with a way to add, update and visualise
all the data available in the database. This task is anticipated to be used by
responsible council personal who has knowledge about the datasets that is needed for
their decision making. Currently there is a significant gap in the availability of data
for the Western and Southern Downs regions. This task ensures that the data is
collected and recorded in one place and that all decision makers can easily gain
access to it.
The developed tool also allows easy extension capability. It was developed
using an object-oriented paradigm, which means that the existing classes can be
easily modified and reused to achieve the desired changes. It uses Java for server-
side development and therefore any existing Java-based statistical models can be
easily embedded to increase the tools analytical capabilities. Also the open source
nature of all the components used makes it possible to create changes to the core
functionality of the tool. Currently the tool is limited to the Western and Southern
Downs regions, but by incorporating more relevant data it can be easily extended to
other rural regions. Further, specific research needs to be carried out to develop
sophisticated modelling capabilities to this tool.
One important thing to make sure of when developing this kind of tool is that
the interactivity does not come at the cost of performance. As a result, the developer
may need to compromise on some interactive features. For example, in the case of
map interaction, instead of having continuous zooming of the map it can be set to
have predefined zoom levels, so that the user can quickly get to the point. Another
thing to beware of when developing for high interactivity is the accessibility
concerns. For this tool to function it requires the use of both the mouse and the
keyboard. Also it uses a lot of JavaScript to perform background requests and other
dynamic tasks to convey a seamless interaction. These JavaScript interactions depend
on the users willingness to have it enabled on their browser. Therefore, if the tool is
ultimately used by a government body for greater public service, a separate version
with some sacrificing of interactive capabilities may need to be developed to comply
with accessibility policies. Also this tool uses a lot of vector-based spatial data which
needs to be processed by the server. The way the server initialises and handles this
can create delays in the initial load of the tool.
The RSSF tool together with its four tasks, combines and brings together
information which otherwise would be dispersed. This makes the decision-making
process much easier for the decision maker as they can access all the information
they need from one place. Not only this, it helps to refine, update and keep accurate
the information that is available, as decision makers gather around a single hub of
information. One of the difficulties in making planning decisions is due to the lack
of data. Data collection and entry is a time-consuming task. The lack of data is also a
big limitation to this tool. Usually it is the decision maker who knows what problems
need to be solved and what data can be used for this. The availability of a tool that
amalgamates all known datasets and presents them to the decision maker, helps to
identify any gaps in the data so that timely procedures can be put in place to fill these
gaps. In addition to this, through this research we have discovered open source and
new technologies that can be used for spatial decision support purposes. Using these
technologies we have implanted a system that can be used in decision support and
have demonstrated the capabilities of our selected technologies.
believe that the development and release of the RSSF tool is a step in the right
direction to making a positive impact in promoting sustainable development in rural
Queensland.
AIHW (2008). Rural, regional and remote health: Indicators of health status and
determinants of health. Canberra ACT: Australian Institute of Health and Welfare.
Athukorala, W., Wilson, C., Neelawela, P., Miller, E., Sahama, T., Grace, P., et al.
Forecasting Population Changes and Service Requirements in the Regions: A Study
of Two Regional Councils in Queensland, Australia. Economic Analysis and Policy
(EAP), 40(3), 327-349.
Bell, M., Dean, C., & Blake, M. (2000). Forecasting the pattern of urban growth with
PUP: a Web-based model interfaced with GIS and 3D animation. Computers,
Environment and Urban Systems, 24(6), 559-581.
Belussi, A. (2007). Spatial data on the Web : modeling and management. Berlin:
Springer.
Bhalla, S., Hosozawa, T., Sasaki, H., Watanabe, K., Yatsunami, T., Berthouze, N., et
al. (2002). A user interface for a Web-geographic information system (Web-GIS).
Paper presented at the Proceedings of the 6th World Multiconference on Systemics,
Cybernetics and Informatics. Orlando, FL, USA: Int. Inst. Inf. & Syst.
Caldeweyher, D., Jinglan, Z., & Pham, B. (2006). OpenCIS-open source GIS-based
Web community information system. International Journal of Geographical
Information Science, 20(8), 885-898.
Cowen, D. J., Cundall, A. J., Helmunn, P. W., & Richers, D. (1996). Maintaining
metadata through a common Web and GIS interface. In (pp. 1063-1070). Bethesda,
MD, USA: American Society for Photogrammetry and Remote Sensing.
Bibliography 83
84
DEWHA (1992). Our Community Our Future: A Guide to Local Agenda 21.
Canberra ACT: Department of the Environment, Water, Heritage and the Arts
Dutta, D. (2000). AVSWAT- a Spatial Decision Support System for Land and water
management an its application for watershed management in Bankura district of
West Bengal. In Map India 2000. New Delhi. Retrieved July 23, 2009, from
http://www.gisdevelopment.net/application/nrm/water/watershed/watws0003b.htm
Dye, A. S., & Shaw, S. (2007). A GIS-based spatial decision support system for
tourists of Great Smoky Mountains National Park. Journal of Retailing and
Consumer Services, 14(4), 269-278.
Elkington, J. (1998). Cannibals with Forks: The Triple Bottom Line of 21st Century
Business (The Conscientious Commerce Series): New Society Publishers.
Hardi, P., & DeSouza-Huletey, J. A. (2000). Issues in analyzing data and indicators
for sustainable development. Ecological Modelling, 130(1-3), 59-65.
Kavanagh, P. (2004). Open Source: The Good, the Bad, and the Ugly. In Open
Source Software (pp. 41-65). Burlington: Digital Press.
Li, X., Yingyi, C., & Li, D. (2009). A spatial decision support system for land-use
structure optimization. WSEAS Transactions on Computers, 8(3), 439-448.
84 Bibliography
85
Miller, E., Buys, L., & Rich, B. R. (2006). Defining the social dimension of triple
bottom line for the Australian dairy industry: Challenges, priorities and
opportunities. Paper presented at the 2006 Australasian Business and Behavioural
Sciences Association International Conference: School of Commerce, University of
Adelaide, Australia. from http://eprints.qut.edu.au/8522/
NAO (National Audit Office) (2002). Better Regulation: Making Good Use of
Regulatory Impact Assessments. London.
Power, D. J. (2007). A Brief History of Decision Support Systems. Retrieved July 23,
2009, from http://DSSResources.COM/history/dsshistory.html
Robert, K.-H., Daly, H., Hawken, P., & Holmberg, J. (1997). A compass for
sustainable development. International Journal of Sustainable Development & World
Ecology, 4(2), 79 - 92. Retrieved May 25, 2010, from Science Direct database.
Sikder, I. U., & Yasmin, N. (1997). Spatial Decision Support System for Location
Planning. Paper presented at the Proceedings of the International Conference on
Geo-Information for Sustainable Land Management (SLM). Enschede, Netherlands.
Stimson, R., & Shyy, T. (2007). A Prototype Web-Based Spatial Decision Support
System to Benchmark Queensland Local Government (1991-2001) Socio-economic
Performance. Paper presented at the ARCRNSISS Methodology, Tools and techniques
and Spatial Theory Paradigm Forums Workshop (2005 : University of Newcastle).
Melbourne, VIC: RMIT Publishing.
Bibliography 85
86
Tornqvist, R., Norstrom, A., Karrman, E., & Malmqvist, P. A. (2008). A framework
for planning of sustainable water and sanitation systems in peri-urban areas. Water
Science and Technology, 58(3), 563-570.
Wang, L., & Cheng, Q. (2008). Design and implementation of a web-based spatial
decision support system for flood forecasting and flood risk mapping. Paper
presented at the Proceedings of the IEEE International Geoscience and Remote
Sensing Symposium (IGARSS) Barcelona, Spain: Institute of Electrical and
Electronics Engineers Inc., from http://dx.doi.org/10.1109/IGARSS.2007.4423879
Wu, Q., Zhang, H., Chen, F., & Dou, J. (2008). A web-based spatial decision support
system for spatial planning and governance in the Guangdong Province. Paper
presented at the Proceedings of the Geoinformatics 2008 and Joint Conference on
GIS and Built Environment: The Built Environment and Its Dynamics. Guangzhou,
China: SPIE. from http://link.aip.org/link/?PSI/7144/71442G/1
Yukui, S., & Sheng, Z. (2009). Analysis of problems and trends of decision support
systems development. Paper presented at the Proceedings of the 2009 International
Conference on E-Business and Information System Security Piscataway, NJ, USA:
IEEE. from http://dx.doi.org/10.1109/EBISS.2009.5137932
86 Bibliography
87
Appendices
Classification.jsp
<%@page import="org.osgeo.mapguide.*" %>
<%@page import="org.apache.jasper.JasperException" %>
<%@page import="java.util.*" %>
<%@page import="java.io.*" %>
<%@page import="java.text.*" %>
<%@page import="javax.servlet.jsp.*" %>
<%@page import="javax.servlet.http.*" %>
<%@page import="org.jdom.output.*" %>
<%@page import="org.jdom.xpath.XPath"%>
<%@page import="org.jdom.*,org.jdom.input.SAXBuilder"%>
<%@ include file="../../mapviewerjava/common.jsp/" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%!/*
* This file generates the interface for this task.
* When the task it loaded it retrieves the user selected
features on the map
* It passes all the user input to HandleCFN.jsp
* Author: Oshan Manawadu
*/
<%
String featName="";
String featId = "";
String featSelec = "";
List<String> featureName = new ArrayList<String>();
InitializeWebTier();
MgResourceService resourceService =
(MgResourceService)siteConnection.CreateService(MgServiceType.Resour
ceService);
MgFeatureService featureService =
(MgFeatureService)siteConnection.CreateService(MgServiceType.Feature
Service);
Appendices 87
88
map.Open(resourceService, mgMapName);
if (layers != null){
MgFeatureQueryOptions queryOptions = new
MgFeatureQueryOptions();
for (int i = 0; i<layers.GetCount(); i++) {
if(DEBUG) System.out.println(layer.GetName());
queryOptions.SetFilter(selectionString);
MgFeatureReader featureReader =
featureService.SelectFeatures(layerFeatureResource,layerClassName,qu
eryOptions);
String tmp="";
String sep="";
while(featureReader.ReadNext()){
tmp = featureReader.GetString("ADMINAREAN").split(",")[0];
tmp = tmp.substring(0,1).toUpperCase() +
tmp.substring(1).toLowerCase();
featName = featName +sep+ tmp;
featId = featId+sep+featureReader.GetInt32("FeatId");
featureName.add(tmp);
sep=",";
}
}
}
}
pageContext.setAttribute("fName", featureName);
featSelec = featId + "|" + featName;
%>
88 Appendices
89
<head>
<script type="text/javascript">
var dataSetName;
function process() {
request = createReqObject();
if (request != null) {
request.open("POST", url, true);
request.setRequestHeader("Content-Type",
"application/x-www-form-urlencoded;");
request.send(param);
request.onreadystatechange = getResponse;
}
}
function createReqObject() {
var xmlhttp = null;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest();
} else if (window.ActiveXObject) {
try {
xmlhttp = new
ActiveXObject("Msxml2.XMLHTTP");
} catch (e1) {
try {
xmlhttp = new
ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
alert("error cannot create request
object");
}
}
}
return xmlhttp;
}
function onRquestReturn() {
var x = parent.parent.mapFrame.GetCenter().X;
var y = parent.parent.mapFrame.GetCenter().Y;
parent.parent.mapFrame.ClearSelection();
//parent.parent.mapFrame.ZoomSelection();
parent.parent.mapFrame.ZoomToView(x, y, 12, true);
Appendices 89
90
parent.parent.mapFrame.LegendCtrl.Refresh();
//parent.Refresh()
}
}
function trim(stringToTrim) {
return stringToTrim.replace(/^\s+|\s+$/g, "");
}
function setLegend(dsn) {
<style type="text/css">
h2 {
font-family: "Arial";
font-size:20px;
}
#hed1, legend {
background-color:lightgrey;
font-family:"Arial";
font-size:13px;
font-weight:bold;
}
fieldset {
float:left;
}
#sec1{
padding-top:15px;
float:left;
clear:both;
}
90 Appendices
91
#sec1 table {
background-color:#ECE9D8;
font-family:"Verdana";
font-size:12px;
width:100%;
}
#rgSelect {
background-color:#ECE9D8;
/*border-width:0px;*/
}
#cLegend{
margin-left:5px;
float:left;
padding-top:15px;
width:30%;
visibility:hidden;
}
#cLegend table td {
width:20px;
height:20px;
font-family: "Verdana";
font-size:10px;
}
#data {
margin-left:2px;
float:left;
padding-top:15px;
visibility: hidden;
}
#data table tr.head {
font-family: "Arial";
font-weight:bold;
}
#data table {
font-family: "Verdana";
font-size:12px;
width:100%;
}
</style>
</head>
<body onLoad="parent.parent.mapFrame.Refresh();">
<div id="container">
<h2> Classification </h2>
<fieldset id="dset">
<legend>Controls</legend>
<p>
<table>
<tr>
<td>
Data Set
</td>
<td>
<select name="dataset" id="dsSelect" >
<option value="Population">Population</option>
<option value="Unemployment rate">Unemployment
rate</option>
<option value="Mean temperature">Mean
temperature</option>
</select>
</td>
Appendices 91
92
</tr>
<tr>
<td>Limit</td>
<td><input type="text" name="threshold" size=11
value=1000 id="thsInput" > </td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right"><input type="button"
value="Classify" onclick="process()"></td>
</tr>
</table>
</p>
</fieldset>
<div id="sec1">
<div id="hed1"> Selected Regions </div>
<table>
<tr> <td> </td> </tr>
<c:forEach items="${fName}" var="name">
<tr>
<td><c:out value="${name}" /> </td>
</tr>
</c:forEach>
</table>
</div>
<div id="data">
</div>
<div id="cLegend">
<div id="hed1"> Legend: <span class="dsn"> </span>
</div>
<table>
<tr>
<td class="colored" style="background-
color:#ff6600;"> </td>
<td> Greater than </td>
<td > <span class="limit" ></span></td>
</tr>
<tr>
<td class="colored" style="background-
color:#ffff00;"> </td>
<td> Equal to </td>
<td ><span class="limit"></span></td>
</tr>
<tr>
<td class="colored" style="background-
color:#006600;"> </td>
<td> Less than </td>
<td> <span class="limit"></span> </td>
</tr>
<tr>
<td class="colored" style="background-
color:#000000;"> </td>
<td> No Data </td>
<td ></td>
</tr>
</table>
92 Appendices
93
</div>
</div>
</body>
</html>
Appendices 93
94
HandleCFN.jsp
<%@ page import="org.osgeo.mapguide.*" %>
<%@ page import="java.util.*" %>
<%@ page import="java.io.*" %>
<%@ page import="java.text.*" %>
<%@ page import="javax.servlet.jsp.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ include file="ProcessCFN.jsp" %>
<%!
private static final boolean DEBUG = true;
%>
<%
/*
* This method retrieves the user input from client tier
* It then initialse the ProcessCFN class and passes these
inputs
* It uses the output from this class to generated the task
output page
* Author: Oshan Manawadu
*/
if(!fs.equals("|")){
String[] featId = fs.split("\\|")[0].split(",");
String[] featNames = fs.split("\\|")[1].split(",");
94 Appendices
95
out.print("Value");
out.print("</td>");
out.print("</tr>");
for(Location aLoc : featureList){
out.print("<tr>");
out.print("<td>");
out.print(aLoc.getYear());
out.print("</td>");
out.print("<td>");
out.print(aLoc.getValue());
out.print("</td>");
out.print("</tr>");
}
out.print("</table>");
%>
Appendices 95
96
Location.jsp
<%@ page import="java.util.*" %>
<%!
/*
* This class is used to store the locality name, dataset
name,
* data value, year and colour coding for each of the features
selected in the map.
*/
96 Appendices
97
%>
Appendices 97
98
ProcessCFN.jsp
<%@ page import="Database.*" %>
<%@ include file="Filter.jsp" %>
<%@ include file="HandleXML.jsp" %>
<%@ page import="java.sql.*" %>
<%@ include file="Location.jsp" %>
<%!
/*
* This class processes the input passed from HandleCFN
* It retrieves and stores data for each location for the
specified dataset
* It classifies this data into groups based on the
specified threshold value
* Then it creates a colour coded layer resource, based on
this categories,
* and set it on the map
* Author: Oshan Manawadu
*/
List locationSet;
featureList = fl;
dataset = ds;
threshold = tsh;
mgSessionId = sId;
mgMapName = mName;
genColorMap();
}
public List run(){
if(DEBUG) System.out.println("runing get data");
getData();
setFiltre();
return locationSet;
}
98 Appendices
99
colorMap.put("red","ff0000");
colorMap.put("orange","ff6600");
colorMap.put("yellow","ffff00");
colorMap.put("green","006600");
colorMap.put("black","000000");
}
String statement="";
for (Location aLocation: featureList){
try{
ResultSet dbResultSet = dba.callProcedure("call
isr.getRecentIndicatorValue('"+aLocName+"','"+dataset+"')");
if(dbResultSet.next()){
if(DEBUG) System.out.println(dataset+"
"+dbResultSet.getString(1).split("-")[0]+"
"+dbResultSet.getString(2));
// Add data and year to each location object
aLocation.setValue(dbResultSet.getString(2));
aLocation.setYear(dbResultSet.getString(1).split("-
")[0]);
}else {
if(DEBUG) System.out.println("No Data");
}
}catch (SQLException error) {
String msg = error. getMessage();
System.out.println("Error printing data:
"+error.toString());
}
}
dba.close();
}
int size = 4;
locationSet = new ArrayList(size);
Appendices 99
100
processLocations(locationSet);
if(DEBUG){
System.out.println("Just before setLayer()");
System.out.println(modLayer);
}
flt.setLayer(modLayer);
if(DEBUG){
System.out.println("======================================");
System.out.println("edning SetFilre method");
}
100 Appendices
101
sep2=" or ";
hasLocations = true;
}
// Add the featureIDs of each location in the same categorie
to the
// arearule template
if(hasLocations){
String[] vals = {featId,color};
try{
templ = LoadTemplate(templName);
//substitue the values to the template
modTempl = Substitute(templ, vals);
hx.updateXML(modTempl);
}catch(FileNotFoundException e){
System.out.println("File Not found");
}catch(IOException e){
}
sep1="\n";
}
}
return modTempl;
}
loc.setColor(colorMap.get("black"));
((List)locationSet.get(0)).add(loc);
}else if(loc.getValue()<threshold){
loc.setColor(colorMap.get("green"));
((List)locationSet.get(1)).add(loc);
}else if(loc.getValue()>threshold){
loc.setColor(colorMap.get("orange"));
((List)locationSet.get(2)).add(loc);
}else{
loc.setColor(colorMap.get("yellow"));
((List)locationSet.get(3)).add(loc);
}
}
}
}
%>
Appendices 101
102
Filter.jsp
<%@page import="org.osgeo.mapguide.*" %>
<%@page import="org.apache.jasper.JasperException" %>
<%@page import="java.util.*" %>
<%@page import="java.io.*" %>
<%@page import="java.text.*" %>
<%@page import="javax.servlet.jsp.*" %>
<%@page import="javax.servlet.http.*" %>
<%//@ include file="../utilityfunctions.jsp" %>
<%@ include file="../../mapviewerjava/common.jsp" %>
<%!
/*
* This class initilises a map guide session
* Gets the layer resources and return this for modification.
* Then it saves the modified layer resources, which is
passed
* to this class as a String xml via setLayer();
*/
MgUserInformation userInfo;
MgSiteConnection siteConnection;
MgResourceService resourceService;
MgFeatureService featureService;
String mgSessionId;
String mgMapName;
MgMap map;
MgResourceIdentifier resourceID;
String resName;
String layerXml;
intMg(mgSessionId,mgMapName);
layerName = layer;
layerLegendName = legend;
groupName = group;
groupLedgendName = legend;
102 Appendices
103
this.mgSessionId = mgSessionId;
this.mgMapName = mgMapName;
try{
InitializeWebTier();
resourceService =
(MgResourceService)siteConnection.CreateService(MgServiceType.Resour
ceService);
featureService =
(MgFeatureService)siteConnection.CreateService(MgServiceType.Feature
Service);
}catch(MgException e) {
e.printStackTrace();
}
}
e.printStackTrace();
}
}
if(DEBUG)
System.out.println("Session:"+mgSessionId+resName.substring(8,21)+la
yerName+".LayerDefinition");
resourceID = new
MgResourceIdentifier("Session:"+mgSessionId+resName.substring(8,21)+
layerName+".LayerDefinition" );
Appendices 103
104
resourceService.SetResource(resourceID,byteSource.GetReader(),null);
MgLayer newLayer;
MgLayerGroup newGroup;
MgLayerCollection newlayerCollection = map.GetLayers();
if(!newlayerCollection.Contains(layerName)){
newLayer = createLayer(layerName,layerLegendName);
MgLayerGroupCollection layerGroupCollection =
map.GetLayerGroups();
if(!layerGroupCollection.Contains(groupName)){
newGroup = createGroup(groupName,groupLedgendName);
layerGroupCollection.Insert(0,newGroup);
if(DEBUG) System.out.println("name of new group:
"+newGroup.GetName());
}else {
newGroup = layerGroupCollection.GetItem(groupName);
}
newLayer.SetGroup(newGroup);
newlayerCollection.Insert(0,newLayer);
}
map.Save(resourceService);
}catch(MgException e) {
System.out.println("Something wrong with setLayer()");
}
}
104 Appendices
105
HandleXML.jsp
<%@page import="org.apache.jasper.JasperException" %>
<%@page import="java.util.*" %>
<%@page import="java.io.*" %>
<%@page import="java.text.*" %>
<%@page import="org.jdom.output.*" %>
<%@page import="org.jdom.xpath.XPath"%>
<%@page import="org.jdom.*, org.jdom.input.SAXBuilder"%>
<%!
/*
* This class builds up the final XML layer for the
modified layer
* It does this by adding each of the generated filter
arearule tags
* on top of each other
* This is done for the map scale between 4 and 12.5
* Author: Oshan Manawadu
*/
public class HandleXML {
Document jdomDoc;
Document templJdomDoc;
Element templRoot;
XPath xp;
List<Element> nodes;
String modLayer;
String templ;
try{
}catch(JDOMException e){
e.printStackTrace();
}catch(IOException e){
e.printStackTrace();
}
}
Appendices 105
106
try{
if(DEBUG) System.out.println("Start parsing templ");
templJdomDoc = sb.build(new StringReader(templName));
if(DEBUG) System.out.println("Finished parsing templ");
templRoot = (Element)
templJdomDoc.getRootElement().clone();
}catch(JDOMException e){
e.printStackTrace();
}catch(IOException e){
e.printStackTrace();
}
if(node.getChildText("MinScale").equals("4") &&
node.getChildText("MaxScale").equals("12.5")) {
if(DEBUG) System.out.println("between 4 and 12.5");
try{
//adds the mod template on top of the existing
arearule tag for this scale
node.getChild("AreaTypeStyle").addContent(1,templRoot);
try {
//write the XML to a file for debug purposes
BufferedWriter out = new BufferedWriter(new
FileWriter("nodeDebug.txt", true));
out.write(outputter.outputString(node));
out.write("\n<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n");
out.close();
} catch (IOException e) {
e.printStackTrace();
}
}catch (Exception e) {
e.printStackTrace();
}
}else if(Double.parseDouble( node.getChildText("MinScale")
)<12.5) {
try{
// Removes all other nodes (Scale levels) as we don't
require it for this layer
// and the there is nothing over MinScale 12.5
jdomDoc.getRootElement().getChild("VectorLayerDefinition").removeCon
tent(node);
}catch (Exception e) {
e.printStackTrace();
}
if(DEBUG) System.out.println("Not between...");
}
}
}
}%>
106 Appendices