View
9
Download
0
Category
Preview:
Citation preview
GIS SUPPORT FOR
EMERGING INFECTIOUS DISEASES
IN EAST AFRICA
A dissertation submitted to
The University of Manchester
for the degree of
Master of Science in the Faculty of
Engineering and Physical Sciences
2010
By
JOHN MUUMBI
SCHOOL OF COMPUTER SCIENCE
Table of Contents
Table of Contents
List of Tables and Figures......................................................................................................4
Abstract..................................................................................................................................5
Declaration.............................................................................................................................6
Copyright................................................................................................................................7
Acknowledgements................................................................................................................8
Chapter 1 Introduction and Background...............................................................................9
1.1 Introduction: Emerging Infectious Diseases (EIDs)........................................................9
1.2 What are emerging infectious diseases and why are they important?.............................9
1.2.1 Avian influenza. Origins and effects. .........................................................................11
1.2.2 Swine Flu. Origins and impact...................................................................................13
1.3 What is AVID?...............................................................................................................14
1.3.1 Rift Valley Fever as a case study................................................................................15
1.3.2 Prevention is better than cure (and ultimately less expensive)..................................16
1.4 Disease monitoring and outbreak prediction.................................................................19
1.4.1 Arthropod Borne Viruses............................................................................................19
1.4.2 Predictive modelling...................................................................................................24
1.5 Geographical Information Systems...............................................................................27
1.5.1 What is a Geographical Information System, (GIS)? ................................................27
1.5.2 Related Areas..............................................................................................................31
Chapter 2 Methodology.......................................................................................................35
2.1 Overview of existing application..................................................................................35
2.1.1 Design considerations.................................................................................................37
2.2 Web mapping ................................................................................................................38
2.2.1 Evaluation...................................................................................................................39
2.3 Building blocks..............................................................................................................44
2.3.1 Hypertext Pre Processor (PHP)..................................................................................44
2.3.2 MySQL Relational Database Management System...................................................45
2.3.3 Apache Web Server....................................................................................................46
2.3.4 Google Maps API.......................................................................................................47
GIS support for emerging infectious diseases in East Africa 2
2.3.5 Keyhole Markup Language........................................................................................48
2.4 Conclusion: Bringing it all together..............................................................................48
Chapter 3 Implementation...................................................................................................51
3.1 Implementation Objectives ...........................................................................................51
3.1.1 Data acquisition and preparation ...............................................................................52
3.1.2 Data Processing..........................................................................................................54
3.1.3 Data Presentation........................................................................................................59
3.2 Typical use case.............................................................................................................78
Chapter 4 Conclusion..........................................................................................................80
4.1 Review ..........................................................................................................................80
4.2 Challenges.....................................................................................................................81
4.3 Recommendations.........................................................................................................82
4.4 Future work...................................................................................................................83
References............................................................................................................................84
Appendices...........................................................................................................................89
Appendix A: H1N1 Worldwide Incidences ....................................................................89
Appendix B: Global Risk Map for Rift Valley Fever .....................................................90
Appendix C: WampServer 2.0i Installation Guide .........................................................91
Appendix D: Installing the Application...........................................................................96
Appendix E: Source Codes..............................................................................................99
Word Count: 18,544 (Main text )
GIS support for emerging infectious diseases in East Africa 3
List of Tables and Figures
List of Tables
1.1 Confirmed cases of HPAI.…................................................................................................. 111.2 Confirmed cases of H1N1.…................................................................................................ 143.1 Organisms table structure.…................................................................................................ 553.2 Samples table structure.….................................................................................................... 553.3 Projects table structure.…..................................................................................................... 563.4 ELISA table structure.…...................................................................................................... 563.5 Storage table structure.…..................................................................................................... 573.6. Spatial table structure.…...................................................................................................... 573.7 Trial view structure.….......................................................................................................... 603.8 Trial1 view structure.…........................................................................................................ 613.9 Avidresults1 view structure.................................................................................................. 623.10 Storage1 view structure........................................................................................................ 633.11 Storage2 view structure........................................................................................................ 63
List of Figures
1.1 GLEWS Modus Operandi .................................................................................................... 181.2 SOI against RVF activity .................................................................................................... 251.3 Dr. John Snow's map of the Cholera epidemic..................................................................... 321.4 Health Care Coverage Status................................................................................................. 341.5 Smoking Survey ..…...…...................................................................................................... 342.1 The three-tier architecture model.......................................................................................... 362.2 Market Share for Top Servers.…........................................................................................... 462.3 Process Model for the extended application......................................................................... 493.1 AVID Search form …..…..................................................................................................... 643.2 AVID Search results.....…..................................................................................................... 683.3 Points on map ….........…..................................................................................................... 723.4 Overlay choices…............................................................................................................... 733.5 Single overlay ….........….................................................................................................... 743.6. Combined overlays.…......................................................................................................... 753.7a Clear map …...….................................................................................................................. 773.7b Animation begins........…...................................................................................................... 773.7c Animation progressing.…..................................................................................................... 773.8 Login Screen..…................................................................................................................... 783.9 Populated search form ......................................................................................................... 783.10 Search results........................................................................................................................ 793.11a Marker clicked. ..........…...................................................................................................... 793.11b Sample storage details.......................................................................................................... 79
GIS support for emerging infectious diseases in East Africa 4
Abstract
Geographical information systems have become ubiquitous in managing spatial
information in a variety of fields ranging from navigation to urban planning. These systems
provide a way to represent and manipulate spatial data in a useful way to complement
decision making and often form part of complex decision support systems. This project
applies geographical information systems to map incidences of Rift Valley Fever and other
diseases over multiple datasets to allow for the observation of trends. Using Google Maps,
incidences are plotted and the map views combined with other spatial data via KML
overlays to create a framework to evaluate relationships between environmental factors
and disease occurrence.
At present, there is a need to provide a visualization tool for the geographical element of
the large datasets currently being collected by the Biosciences East and Central Africa,
(BECA), project known as AVID. The project is currently working on disease prediction
mechanisms for Arthropod Borne viruses in East and Central Africa. This involves
collecting biological samples, several times a year, from both human and animal sources.
The data collected includes geographical information in the form of the coordinates,
latitude and longitude, of the point of collection. The date and time is also recorded,
forming a time stamp for the geographical data.
The aim of this project is to extend the functionality of previous work carried out in
establishing an information management system. This previous work resulted in a web
based application which provides a basic information system to manage and query the vast
amounts of data being collected. The system provided a database structure to hold key data
items and establish relationships between them in an efficient manner for formulating
queries. This extension to the current system provides a visual representation of the data
using Google maps and other open source geographical information system tools.
GIS support for emerging infectious diseases in East Africa 5
Declaration
No portion of the work referred to in the dissertation has been submitted in support of an
application for another degree or qualification of this or any other university or other
institute of learning.
GIS support for emerging infectious diseases in East Africa 6
Copyright
Copyright in text of this dissertation rests with the author. Copies (by any
process) either in full, or of extracts, may be made only in accordance with
instructions given by the author. Details may be obtained from the appropriate
Graduate Office. This page must form part of any such copies made. Further
copies (by any process) of copies made in accordance with such instructions may
not be made without the permission (in writing) of the author.
The ownership of any intellectual property rights which may be described in this
dissertation is vested in the University of Manchester, subject to any prior agreement to
the contrary, and may not be made available for use by third parties without the written
permission of the University, which will prescribe the terms and conditions of any such
agreement.
Further information on the conditions under which disclosures and exploitation may take
place is available from the Head of the School of Computer Science.
GIS support for emerging infectious diseases in East Africa 7
Acknowledgements
I would like to firstly acknowledge Almighty God for granting me the focus and strength to
complete this project. I would like to thank my family and friends for their support and
encouragement throughout. Special thanks go to my supervisor, Dr. Richard Banach, for
his guidance, direction and faith in my abilities to complete this project.
I would also like to thank the team at AVID for their assistance in this project and last and
definitely not least I would like to thank everyone at the University of Manchester who
provided me any assistance in any small way during my studies here.
GIS support for emerging infectious diseases in East Africa 8
Chapter 1 Introduction and Background
1.1 Introduction: Emerging Infectious Diseases (EIDs)
Emerging infectious diseases are a constant threat to public health. With every new disease
strain or re-emergence of an old incurable foe, public health infrastructure comes under
increasing strain to deliver appropriate responses. In particular, as population densities
increase with longer life expectancies, ironically, epidemics spread faster and claim more
victims. To understand some of the complexities of battling these new diseases, let us
explore them through a series of questions.
1.2 What are emerging infectious diseases and why are they important?
An Emerging infectious disease is defined as, “An infectious disease that has newly
appeared in a population or that has been known for some time but is rapidly increasing in
incidence or geographic range” [1]. Examples of these that have appeared over the last four
decades include the Ebola virus, HIV / AIDS and Hepatitis C [2]. Quite often these
diseases will re-emerge with no known pattern at seemingly random intervals. As such,
emerging infectious diseases, EIDs, represent an ever changing frontier for modern
medicine. They often render existing treatments ineffective or redundant and are usually
more resilient than variants that may have been seen previously. They threaten human and
animal life and since they often have no immediate cure, have the potential to take
significant toll in this regard.
Awareness of these diseases is increasing as modern ways of life make the transmission of
these diseases far quicker than in decades past. Previous outbreaks that were largely
localized now “benefit” from the world's developed transportation infrastructure.
Commercial passenger flights mean that a person infected in South East Asia can be in
North America in 24 hours, before showing any signs of illness while spreading pathogens
all along the route. This type of scenario means that the disease can spread much farther
and quicker than the means to contain it initially. If such a disease is fatal, the potential for
disaster is evident.
GIS support for emerging infectious diseases in East Africa 9
Emerging infectious diseases cause significant health and economic damage. The fact that
some of them appear only periodically, or seemingly at random, makes treatments and
studies difficult. The AVID focus on Rift Valley Fever provides a good model because of
the comparatively large amount of historical data available. According to the Centre for
Disease Control, CDC, Rift Valley Fever is an “ … acute, fever-causing viral disease that
affects domestic animals (such as cattle, buffalo, sheep, goats, and camels) and humans”
[3]. Rift Valley Fever belongs to a group of diseases referred to as Zoonoses. A Zoonosis is
“An infection or an infectious disease transmissible under natural conditions from
vertebrate animal and humans” [4]. These are discussed in more detail later in this chapter.
Why Zoonoses? Zoonoses and their impact on the world
According to the World Health Organization, 75% of new diseases affecting human beings
in the last decade have been zoonotic in nature, i.e. they originated from pathogens found
in animals or animal products [5]. There are various reasons why the percentage is so large.
Some of these include environmental changes, human and animal demography, pathogen
changes and changes in farming practice [6]. Human population increases sometimes
results in increased interaction of domestic animals and wildlife as human beings encroach
on what were previously uninhabited areas and encounter naturally occurring zoonoses.
These are diseases common in wildlife populations but that would normally not occur in
domesticated animals because they would never come into contact with one another.
Examples of recently emerging zoonoses include Avian influenza, more commonly known
as “bird flu” and Swine influenza, also known as “swine flu”. More traditional zoonoses
include anthrax, rabies and the West Nile Virus. Some of these diseases have been isolated
and treated due to their causes being understood and studied long enough to develop
effective cures. Others remain endemic and form part of the justification for projects like
AVID. In order to understand the impact of these zoonoses, we need to realize that animal
health impacts human health directly with animals providing the bulk of human food and
livelihood particularly in the developing countries. To illustrate this, let us look briefly at
two of the recently emerged diseases; avian influenza and swine influenza.
GIS support for emerging infectious diseases in East Africa 10
1.2.1 Avian influenza. Origins and effects.
Avian influenza is defined as, “... an infectious disease of birds caused by type A strains of
the influenza virus.” [7]. It's effects range from mild illness to a fatal condition in birds.
Normally, this disease will not infect humans, however, a virulent strain called Highly
Pathogenic Avian Influenza, (HPAI), is known to affect human beings. It is identified as
H5N1 avian influenza and has spread from infected poultry to human beings, causing
deaths. It is highly virulent and mutative and differs significantly from other strains. The
most recent outbreak occurred in 2003. The main difference with the latest outbreak was
that the prior outbreaks remained largely localized. All major outbreaks though still
resulted in high poultry losses.
The WHO maintains figures of reported cases, including deaths related since the 2003
outbreak. This currently stands at 504 reported cases with deaths standing at 299 as at 12th
August 2010. See table 1.1 below.
Table 1.1 Confirmed cases of HPAI. Source: W.H.O. [8].
Country
2003 2004 2005 2006 2007 2008 2009 2010 Total
cases deaths cases deaths cases deaths cases deaths cases deaths cases deaths cases deaths cases deaths cases deaths
Azerbaijan 0 0 0 0 0 0 8 5 0 0 0 0 0 0 0 0 8 5
Bangladesh 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0
Cambodia 0 0 0 0 4 4 2 2 1 1 1 0 1 0 1 1 10 8
China 1 1 0 0 8 5 13 8 5 3 4 4 7 4 1 1 39 26
Djibouti 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 0
Egypt 0 0 0 0 0 0 18 10 25 9 8 4 39 4 21 8 111 35
Indonesia 0 0 0 0 20 13 55 45 42 37 24 20 21 19 6 5 168 139
Iraq 0 0 0 0 0 0 3 2 0 0 0 0 0 0 0 0 3 2
LaoPeople'sDemocraticRepublic
0 0 0 0 0 0 0 0 2 2 0 0 0 0 0 0 2 2
Myanmar 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 1 0
Nigeria 0 0 0 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1
Pakistan 0 0 0 0 0 0 0 0 3 1 0 0 0 0 0 0 3 1
Thailand 0 0 17 12 5 2 3 3 0 0 0 0 0 0 0 0 25 17
Turkey 0 0 0 0 0 0 12 4 0 0 0 0 0 0 0 0 12 4
Vietnam 3 3 29 20 61 19 0 0 8 5 6 5 5 5 7 2 119 59
Total 4 4 46 32 98 43 115 79 88 59 44 33 73 32 36 17 504 299
GIS support for emerging infectious diseases in East Africa 11
The primary concern with H5N1 avian influenza is the possibility for mutation into a form
that will allow for pandemic human to human transmission. This has led to aggressive
preventive control measures being enacted.
Control measures
Since the primary method of transmission was through contact with infected poultry, this
became the main focus of the control efforts. To curb the spread of H5N1 avian influenza,
large numbers of poultry were culled in the affected areas. The numbers varied
significantly but in all cases, the local poultry industry was significantly affected.
Quarantines were effected and bans on poultry product exports were implemented against
those countries where outbreaks had occurred. Estimates of losses in poultry for the 2003
outbreaks according to the FAO, are put at 44 million birds in Vietnam, (approximately
17.5% of the poultry population), and 29 million in Thailand, (approximately 14.5% of the
poultry population) [9]. These losses directly affected the economies of those countries
with Thailand losing it's position as the world's 5th largest exporter of fresh poultry.
Furthermore, the long term effects on the livelihoods of the small scale producers are yet to
be taken into account. Most of those will have taken the heaviest losses, relative to their
income.
World Bank estimates on the potential economic impact of avian influenza, should it
mutate into a human pandemic, on Gross Development Product, (GDP), range between a
drop of 0.7%, (mild), to 4.8% , (severe), across the world with the most affected areas
being Europe and Central Asia where the drop is estimated to range between 2.1%, (mild),
to 9.9%, (severe), at 2006 figures [10]. Further detailed estimates translate this into a
monetary value of US$ 965.4 billion, with the bulk of that figure, US$ 774 billion, coming
from high income countries. Latin America and the Caribbean would incur the heaviest
losses by percentage, incurring an estimated loss of 4.4% in their GDP [11].
It is against this potential scenario that the research projects into the behaviour of emerging
infectious diseases, like AVID, are being undertaken. Let us consider another example, the
H1N1 pandemic, more commonly referred to as swine flu.
GIS support for emerging infectious diseases in East Africa 12
1.2.2 Swine Flu. Origins and impact.
Swine flu refers to the pandemic H1N1 virus that is defined by the WHO as a previously
unidentified cause of infection prior to the current H1N1 pandemic, with its origins being
traced back to animal influenza viruses [12]. This virus is different from the seasonal
human H1N1 influenza virus but is transmitted in the same way and therefore spreads
quickly among human populations. Outbreaks in North America in 2009 quickly spread to
several countries with a worldwide pandemic being declared in June of that year. To date,
the disease has been reported virtually worldwide with greatly varying numbers of
infections and fatalities, see appendix A.
The virus causes severe illness and death and as of 6th August 2010 has been responsible
for at least 18,449 human fatalities according to the WHO, see table below, with
continuing cases being reported in parts of India and New Zealand. These figures are
considered a severe underestimation of actual numbers because of the fact that many
deaths will not be tested or diagnosed for influenza and therefore not linked. Considering
the fact that there was no effective vaccine available for the disease at its discovery, its
high rate of fatalities and the speed at which it propagates through human populations, it is
clear that it poses a significant threat to public health and development.
Various treatments and a vaccine are now available and the logistics of producing and
delivering these treatments to the affected areas will be the focus of mitigation efforts.
Without research into the behaviour and cause of the disease, the relatively quick
availability of such treatments would have been impossible. The impact of the disease
beyond the immediate loss of life is yet to be studied.
GIS support for emerging infectious diseases in East Africa 13
Table 1.2 Confirmed cases of H1N1. Source: WHO [13]
The human cost of swine flu is far more than that of avian influenza. While it is technically
not a zoonosis, it is an emerging infectious disease and a prime example of what can
happen during an epidemic. The study of the behaviour of such diseases is the premise of
the AVID project.
1.3 What is AVID?
The Arbovirus Incidence and Disease (AVID) project is a three year project coordinated by
icipe - African Insect Science for Food and Health, to undertake a project titled “An
integrated response system for emerging infectious diseases in East Africa”. It brings
together an array of partners from the fields of veterinary health, wildlife services, public
health, agricultural research, medical research and livestock ministries in the target area.
Specifics of AVID research. What is AVID looking at?
AVID is an initiative that is focused on increasing the understanding of the emergence / re-
emergence of such diseases by developing detection platforms for Arthropod Borne
Vectors in Kenya. By studying the model of Rift Valley Fever epidemics, it is hoped that
insights into how these types of disease re-emerge will be gained and the factors
influencing their prevalence shall be documented.
GIS support for emerging infectious diseases in East Africa 14
The stated objective of the project is to “ … demonstrate the feasibility of developing a
multidisciplinary surveillance, research and response system to enhance the prediction and
prevention of emerging infectious diseases, particularly arboviruses, using Rift Valley
Fever virus (RVF) as an initial model” [14]. Lessons learned and methods derived can then
be applied to other scenarios.
1.3.1 Rift Valley Fever as a case study
Rift Valley Fever has been recorded for approximately a century, with the first incidences
reported in 1900s by veterinary officers in Kenya [15]. The virus was identified in 1937
and is mostly associated with periods of excessive rainfall, also known as the El
Niño/Southern Oscillation (ENSO) weather phenomenon and has been documented several
times in the last century with the outbreaks spreading beyond Africa in the recent past [16].
A detailed listing of recent outbreaks is found later in this chapter.
The effects of Rift Valley Fever can be devastating. An outbreak in 1950 - 1951 led to the
loss of an estimated 100,000 head of sheep [17]. In human terms, Rift Valley Fever has led
to fatalities in less than 1% of those infected and occurs in two forms; a mild form with
feverish symptoms that pass in between four and seven days from the onset of symptoms
and a severe form with symptoms that range from haemorrhagic fever to
meningoencephalitis. The impact of the outbreaks on the livestock sector of the economy
of the affected country is usually significant. Besides the loss of animals and livelihood for
the cattle owners, bans on exports usually follow. The 2007 outbreak of Rift Valley Fever
led to Kenya's loss of a beef export quota to the European Union of 4,000 metric tonnes
[18]. The reason given was the failure to control animal diseases with the quota being
awarded to a competing country, Botswana.
The unpredictability of Rift Valley Fever outbreaks has long been a hindrance to effective
management. Despite the fact that it is associated with the ENSO phenomenon, the factors
surrounding its emergence are still not fully comprehended. The infrequent nature of the
outbreaks and the comparative localization of the virus has meant that inadequate resources
have been spent in developing effective countermeasures. Only in more recent outbreaks
GIS support for emerging infectious diseases in East Africa 15
has the virus began to emerge outside its traditional confines, representing new challenges.
Appendix B contains a map of the countries in the world at risk of Rift Valley Fever
outbreaks as well as those where actual cases have been reported. Understanding how the
virus sustains itself between outbreaks and how it is influenced by environmental factors
leading up to an outbreak is at the core of modern Rift Valley Fever research. Further
details on the nature of the disease and the research being carried out by AVID are
contained in the section on disease monitoring further in this chapter.
Understanding the way in which Rift Valley Fever sustains itself in the periods between
epidemics as well as why similar environmental factors do not always trigger outbreaks
will make the prevention and managing of outbreaks much more of an exact science. It will
also allow for the fine tuning of practices that can be disseminated to cattle rearers to
mitigate the spread of the disease in the event of an epizootic. In order to prevent an
outbreak, it has to be known that one is expected and where. There are ongoing initiatives
in this regard with the biggest one being coordinated by the world's three major agencies
concerned with human and animal health; the W.H.O., the F.A.O. and the O.I.E.
1.3.2 Prevention is better than cure (and ultimately less expensive)
The World Health Organization, (WHO), the Food and Agriculture Organization of the
United Nations, (FAO), and the World Organization for Animal Health,(OIE), have
developed the Global Early Warning System for Major Animal Diseases, including
Zoonoses, (GLEWS), monitoring system. GLEWS lists its objective as, “... to improve the
early warning and response capacity to animal disease threats of the three sister
organizations for the benefit of the international community” [19].
GLEWS allows the three organizations to channel information from a variety of sources
into a shared space and to coordinate their responses in a way that uses their disparate
resources and strengths to complement one other. GLEWS currently prioritizes a total of
25 diseases, both zoonotic in nature and otherwise, including Rift Valley Fever. GLEWS
focuses on early warning and response capabilities for the international community with
regards to infectious disease outbreaks and is charged with the dissemination of
GIS support for emerging infectious diseases in East Africa 16
information as deemed relevant to any country which may be currently or potentially
affected. The coordination of the three bodies allows for a mining of a larger pool of
information, including informal networks and other reporting resources, to deliver
information on incidences of disease.
GLEWS is also placing emphasis on trend analyses and forecasting on four diseases,
namely Contagious Bovine Pleuropneumonia, (CBPP), Foot and Mouth Disease, (FMD),
Rift Valley Fever and Sheep Pox. This is key to fulfilling the early warning mandate and
shows just how important an activity it is. Early warning allows authorities to prepare
medical resources and take preventive action where possible to reduce the impact or even
occurrence of an outbreak, avoiding potentially heavy human and animal losses.
The establishment of GLEWS is a natural progression of the separate early warning and
response systems that existed previously among the three organizations, particularly as
disease outbreaks often do not respect any geographic or political boundaries and so often
require cross border coordination in response to them. The scale of such tasks becomes
much easier when efforts can be unified to make use of the combined resources. Figure 1.1
below shows GLEWS operational model.
GIS support for emerging infectious diseases in East Africa 17
The relatively long period that the Rift Valley Fever virus has been known to exist and the
amount of data collected has allowed for the development of vaccines and more recently,
predictive models. These predictive models are of immense interest in providing ample
warning time for the outbreak of infectious disease. There are clear humanitarian reasons
for conducting this research as well as economic ones. We shall investigate these predictive
models in detail in the following section covering disease monitoring and outbreak
prediction.
GIS support for emerging infectious diseases in East Africa 18
Figure 1.1 GLEWS Modus Operandi Source: GLEWS [20]
1.4 Disease monitoring and outbreak prediction
Disease monitoring can be defined as the observance and recording of disease incidence
and prevalence in a population of any kind within a specific environment. This activity is
not carried out merely to create a historical record but to provide information that could be
used to combat the disease in the future.
We shall define outbreak prediction in this context as the process of evaluating
environmental and biological factors with a view to forecast incidences disease in the near
future. This process relies on accurate current and historical data to predict an outcome
with a high degree of confidence, based on trends observed in the past and any correlations
that have been established as a result of the investigation of those trends.
The AVID project seeks to perform both of these activities by performing disease
monitoring in East and Central Africa and is targeting Arthropod Borne Viruses. In
particular, the Rift Valley Fever, (RVF), disease is being monitored with samples being
collected from various subjects at regular intervals and epidemiological tests being carried
out to determine prevalence. The amount of data captured in these samples is vast, though
most of the parameters do not reference the spatial domain and as such the subset required
for geographical representation remains small.
1.4.1 Arthropod Borne Viruses
Arthropod Borne Viruses or arboviruses are, as the name suggests, a class of viruses
transmitted to humans by arthropods [21] i.e. the arthropod is the vector. An arthropod is
an invertebrate animal characterised by jointed legs and a hard outer exoskeleton and
includes some insects [22]. A vector is defined as any organism that transmits a pathogen
from an infected host to an uninfected one [23] and in this context it is an arthropod.
Several species of mosquito are known vectors of Rift Valley Fever as well as other
bloodsucking insects such as ticks.
GIS support for emerging infectious diseases in East Africa 19
Arboviruses fall into three main families:-
• Togaviruses – examples include western equine encephalomyelitis (WEE) and
Eastern equine encephalitis virus (EEE).
• Bunyaviruses – examples include Rift Valley Fever (RVF) and Crimean-Congo
Haemorrhagic Fever.
• Flaviviruses – examples include Yellow fever and St. Louis Encephalitis (SLE).
The differences between them are beyond the scope of this project but are useful in
separating from amongst them the types which may not affect human beings. Rift Valley
fever affects both animals and humans and is the subject of much research as the reasons
behind its periodical re-emergence are still unclear.
The AVID project is carrying out research to this end as well as other arbovirus research
and is collecting samples from various organisms. Various epidemiological tests are
performed on the samples to determine the presence and nature of any pathogens. The
primary detection test for the arbovirus in question is serology.
Arbovirus Transmission
Arboviruses have two defined transmission cycles. The WHO definition of an arbovirus
describes the transmission by stating, in part, “... through biological transmission between
susceptible vertebrate hosts by haematophagous arthropods ...” [24]. The role of the
arthropod plays as the disease vector is the key difference in the two cycles.
1. Man – arthropod – man cycle: in this instance, the arthropod will transmit the virus
from an infected person, the host, to another uninfected person. This is the mode of
transmission for arboviruses such as dengue fever. The reservoir is the infected
person although it can also be the arthropod itself in some cases.
2. Animal – arthropod – man cycle: in this case, the reservoir is in an animal. The
virus is transmitted by the arthropod in between animals and also from animal to
human. This is the case with Rift Valley Fever.
GIS support for emerging infectious diseases in East Africa 20
Some arboviruses, such as yellow fever, can be transmitted through both cycles. Rift Valley
Fever may also be transmitted through contact with the blood of infected animals and
through the air in a laboratory situation [25]. These other methods do not involve
arthropods and so we shall not detail them any further.
The fact that Rift Valley Fever is transmitted via the animal – arthropod – man cycle means
that there are several possible reservoirs of the disease to be monitored in addition to the
vector. As the disease primarily affects domestic animals and humans, there are a large
variety of samples to be collected.
Let us look at the process of sample collection and its integration with GIS and other
technologies to enable outbreak prediction.
Sample Collection
The AVID project collects samples from various field locations from a variety of subjects.
The samples are tested for the presence of arboviruses and the results processed. Sample
collection is a constant process with subjects being sampled regularly as part of the
monitoring aspect of the project. The screening of the samples for arboviruses provides a
picture of the prevalence of the disease even when it may not be causing immediate harm
to the host.
The AVID project collects samples from various animal sources, ranging from cows and
sheep to wild animals such as warthog [26]. Humans are also sampled as are the arthropods
themselves, in this case the mosquitoes. This is necessary to monitor the presence of the
virus in all the stages of the cycle. Various methods are employed to gain sufficient
numbers of vectors with traps being used to collect mosquitoes. All the samples collected
in the field will have their location recorded. This adds the spatial component to the data
instance. The date is recorded as well providing a time reference as well. An overview of
arboviruses follows, together with the most prevalent methods of virus transmission.
GIS support for emerging infectious diseases in East Africa 21
Environmental Factors
The Rift Valley Fever virus occurs naturally in the eggs of the Aedes mosquito [27]. The
mosquito larvae hatch and are infected with the virus. As adults, they go on to infect the
animals they feed on. Changes in the environment, flooding in particular, allows for large
increases in vector population. Mosquito eggs that have lain dormant will have an
opportunity to hatch. It has been observed that excessive rainfall that causes localized
flooding, often precedes widespread incidences of the disease and this is attributed to the
increased population of the vector.
As a result, weather prediction has become a key component in the larger process of
outbreak prediction. The monitoring of environmental factors in general is considered to be
a key part of arbovirus management because of the effect of these factors on vector
population. Remote sensing plays a big role in the prediction of weather as the land and sea
temperatures are key indicators in predicting the expected rainfall. The advance warning of
environmental conditions that may favour a significant increase in vector populations can
allow for preventive action to take place and for better preparations to be made to manage
the anticipated increase in disease prevalence.
Previous outbreaks
Outbreaks of Rift Valley Fever have been documented over several decades with the first
known instances being reported in the early 1900s. The virus itself was identified in 1931
and cases have been reported in sub-Saharan and North Africa as well as in Saudi Arabia
and Yemen. The major outbreaks, (also known as epizootics), of Rift Valley Fever recorded
in the second half of the twentieth century up to present day are as follows [28] [29]:
1. 1950 – 1951, Kenya.
2. 1967 – 1970, Nigeria.
3. 1969, Central African Republic.
4. 1976 – 1977, Sudan.
5. 1977 – 1978, Egypt.
6. 1987, Mauritania.
7. 1993, Egypt and Senegal.
GIS support for emerging infectious diseases in East Africa 22
8. 1997 - 1998, Kenya and Somalia.
9. 2000 – 2001, Saudi Arabia and Yemen.
10. 2006 – 2007, Kenya, Tanzania and Somalia.
11. 2008 – Madagascar.
12. 2010, Republic of South Africa.
In addition to any human losses, the economic costs of Rift Valley Fever are quite
significant with large numbers of animals lost in the outbreaks. In the outbreak of 1950 –
1951 in Kenya, an estimated 100,000 animals were lost. Apart from the direct impact on
animals, there is a knock on effect on the farming industry of the affected country as well
as the meat exports which can be suspended for the duration. All of these result in a strong
motivation for the management and mitigation of Rift Valley Fever.
The documentation of the past outbreaks provide useful statistical data for researchers to
study. Environmental data in particular has proven to be most useful, allowing researchers
to study the conditions in the months preceding an epizootic. The analysis of weather
conditions prior to and during an epizootic have been of great interest and has led to the
association of certain environmental indicators, primarily above average rainfall and
localized flooding, with Rift Valley Fever [30].
The understanding of the conditions that precede an epizootic are critical to the forecasting
process. The retrospective application of new techniques allows for trends to be observed
and correlations drawn that can then be used to inform the establishment early warning
systems. The continued data collection of the AVID project and other Rift Valley Fever
monitoring activities like it, are essential in providing this information.
Arbovirus detection
Technology plays a key role in the detection of arboviruses. The continued improvements
in computing power and new techniques in the field of medicine have led to better
detection and treatment of arboviruses. Serology is the method or process used to detect
Rift Valley Fever in a serum sample. Serology is defined as “ … the scientific study or
diagnostic examination of blood serum, especially with regard to the response of the
GIS support for emerging infectious diseases in East Africa 23
immune system to pathogens or introduced substances” [31]. Serological tests are used to
detect arboviruses and the samples collected in the AVID project are processed via the
Enzyme-linked immunosorbent assay, (ELISA), test. This test detects the presence of
particular antigens or antibodies [32].
The outcome of this test on a sample gives an indication of the presence (or absence) of
Rift Valley Fever and other pathogens depending on other specifics that may be employed
during testing. The volume of samples collected means that results take some time to be
collated, however this period appears consistent with the resources available to the project.
Serology thus remains a reliable method for determining the presence of Rift Valley Fever
and it is anticipated that improvements in technology will continue to increase the speed
and volume of processing.
1.4.2 Predictive modelling
In 1999, a report was published that detailed a method for accurately forecasting outbreaks
of Rift Valley Fever [33]. This method made extensive use of remote sensing techniques
and when applied retrospectively, was able to detect previous outbreaks with great
accuracy, based on the data provided by satellites. This method utilized the Southern
Oscillation Index, (SOI), commonly used in the monitoring of the El Nino –Southern
Oscillation , (ENSO), that is associated with above average rainfall patterns in East Africa
[34].
This technological breakthrough came about as a result of applying new technologies to
the large body of data available on Rift Valley Fever and the corresponding weather
information. All of this data was available through unrelated information gathering efforts
but none the less proved instrumental in the development of the model as without it, there
would be no possibility of generating proofs.
The figure 1.2 below shows the apparent relationship between SOI anomalies and Rift
Valley Fever outbreaks. It should be noted that not all negative SOI anomalies resulted in
an outbreak, however, all outbreaks were preceded by negative SOI anomalies suggesting
that SOI has a role to play in conjunction with other factors.
GIS support for emerging infectious diseases in East Africa 24
Also investigated were the equatorial Pacific Sea Surface Temperatures (SSTs), Indian
Ocean Sea Surface Temperatures, and Normalized Difference Vegetation Index, (NDVI),
collected from remote sensing satellites. These factors were input to a computer simulation
with the aim of determining which combinations would assist in the reliable prediction of a
Rift Valley Fever epizootic. The report suggested the most promising factors based on their
ability to accurately predict precious outbreaks based on historical data as well as avoiding
false predictions when similar weather conditions were observed. The report proposed the
set of factors that were found to have the most accurate detection rate; equatorial Pacific
and Indian Ocean SST and NDVI anomaly data.
GIS support for emerging infectious diseases in East Africa 25
Figure 1.2: SOI against RVF activity, a time series plot of SOI anomalies between January 1950 and May
1998 [35]
Advances in computing power since the report was published, as well as increased access
to satellite data means that prediction of this nature can now take place in near real time,
allowing for stakeholders to take preventive action. The successful development of early
warnings systems using satellite imagery and weather forecasting data can be used to
support this [36]. The aversion of an epizootic and the associated human, animal and
economic losses would greatly reduce the impact of Rift Valley Fever.
Geographical Information Systems are playing a key role in the forecasting process by
making spatial data available to a wider set of stakeholders. The satellite imagery used in
the 1999 report was taken from satellites operated by the National Oceanic and
Atmospheric Administration (NOAA) satellites using the advanced very high resolution
radiometer (AVHRR) instrument. It is noted that such imagery and associated data may not
be easily accessible to all stakeholders, whether due to cost or other factors, and yet it is a
key part of accurate disease forecasting. It becomes clear therefore that any other GIS that
can provide complimentary functions to the sampling and monitoring aspects of the AVID
project and others like it will be useful in enhancing the understanding of the behaviour of
arboviruses like Rift Valley Fever.
The development of support tools that are more accessible would go a long way in
assisting projects like AVID in their research. The ideal GIS tool would be easy to use,
widely compatible with a range of technology platforms and be easily maintained by
trained staff. This tool would need to incorporate the relevant GIS capabilities necessary
for the work of forecasting and trend analyses. In the next section we expound on the field
of GIS and the technologies that make it such a powerful observation tool.
GIS support for emerging infectious diseases in East Africa 26
1.5 Geographical Information Systems
Spatial or location data is increasingly being used to provide perspective in performing
data analyses. Historically, spatial data has been used only in the context of providing the
boundaries within which sample collection takes place and nothing more. This is now
changing as newer technology makes it easier to process spatial data. Geographical
information systems allow spatial data to be integrated into sample collection by
processing the data and turning it into useful perspectives. Providing a geographical
context to the data that is being collected allows the analyst to view it against other
demographic data in a simplified, visual manner that can provide the basis for further study
or drawing correlations.
1.5.1 What is a Geographical Information System, (GIS)?
“A geographic information system (GIS) integrates hardware, software, and data for
capturing, managing, analysing, and displaying all forms of geographically referenced
information” [37]. Historically, the basic form of a GIS was a series of maps. With newer
technology, it is possible to create digital maps of the same quality as paper maps and even
higher. Digital maps have the benefit of being manipulated easily to represent different
viewpoints, perspectives or locales.
“Cartography (in Greek chartis = map and graphein = write) is the study and practice of
making maps (also can be called mapping). Combining science, aesthetics, and technique,
cartography builds on the premise that reality can be modelled in ways that communicate
spatial information effectively” [38]. Traditional cartography allows for very rich, detailed
maps to be produced using modern printing techniques. A variety of materials may be used,
resulting in rugged, durable maps. These are practical and portable and very useful in field
operations, especially in areas where other types of maps will be non-existent. They can
also be more accurate since they are likely to be vetted for accuracy by third parties before
publishing and may be produced to higher scales than other types of maps that may be
commercially available.
GIS support for emerging infectious diseases in East Africa 27
Traditional cartography involves working with physical media. The skills of cartographic
artists in collecting, classifying, indexing and finally portraying these geographic features
on the physical media available to them are very specialized and take years of training to
acquire [39]. These advanced skill sets and the principles behind them have a long history
and are no less important in modern cartography. It is however important to note that the
field has evolved, primarily in the tools and media being used. Maps are no longer
confined to physical media such as paper or canvas. Data collection has moved forward
and incorporated many technologies. Aerial photography has provided much of the raw
data for the basis of modern cartography ever since the advent of powered flight in the
beginning of the twentieth century. Advances in camera technology and imaging also
allowed for better resolution photographs and better tolerance to varying light conditions.
Wartime events in the first half of the twentieth century were to bring the most significant
improvements to the field of cartography at the time with the need for up to date
assessment of battle damage and troop movements resulting in the application of new
technologies to the field of imaging, (both still photography and video) [40]. The quality of
picture and resolution led to the provision of high quality raw material for cartographers to
compile detailed maps of any surveyed area [41].
In the second half of the twentieth century, satellite technologies made an appearance,
redefining the work of the modern cartographer. While the principles of classifying and
representing geographical data remained the same, it was now possible to have images that
were not months or days but just hours old. Truly up to date imagery of the globe became a
reality. The technology available allowed for the photographing of any part of the globe
and the transmission of those images back to the ground instantaneously or within minutes.
Access to high resolution imagery from these satellites has been expensive. However, the
advent of consumer grade devices and applications for street navigation and outdoor
recreational pastimes such as hiking and trekking have opened new avenues for access to
this geographical data.
GIS support for emerging infectious diseases in East Africa 28
Technological advances in electronics has allowed portable devices to have sufficient
communication and processing power to become a platform for delivering mapping and
location information. Small, light, energy efficient displays have been developed to
provide rich colour screen output on hand held of vehicle mounted devices that can display
maps as well as the user's location in real time. Improvements in battery technology means
that these devices can be truly portable, working for several hours or days on small battery
packs. These devices rely on global positioning systems, GPS, as well as calculations of
user orientation and movement from electronic sensors, gyroscopes and compass. GPS is
reliant on a signal from orbiting satellites and can vary in accuracy by a few metres with
modern systems being accurate to within a few feet [42].
Digital photography has also improved due to the same technological advances. Advances
in optics and electronics means that it is possible to take extremely high resolution pictures
with equipment that is far less expensive than was possible before and without the need for
a separate process to convert the images from their physical form to a digital copy. This
shortens the process of image acquisition and allows cartographers to produce maps much
more quickly. Digital cameras can be controlled to take pictures that are geographically
tagged as they are taken so that the image is referenced to an exact geographical point. This
allows the alignment of aerial photos to take place with better accuracy and is cheaper than
using satellite platforms to take high resolution photos of smaller areas. This type of digital
photography is used by cartographers to produce high scale maps of areas for both digital
and paper media.
In the last two decades, the internet has expanded massively as an information sharing
platform. Since its origins in the 1970s to the widespread availability in the 1990s and the
continued propagation in the present day, the ability to collaborate and share information
across disparate geographic locations has impacted all areas of life. Cartography is no
exception. The ability to share geographical information without committing it to a
physical medium and sending it to the recipient has allowed for new forms of collaboration
in assembling geographical data.
GIS support for emerging infectious diseases in East Africa 29
The propagation of the internet and the advent of consumer digital photography has led to
a phenomenon known as geotagging. Geotagging is defined as “… the process of adding
geographical identification metadata to various media such as photographs, video,
websites, or RSS feeds and is a form of geospatial metadata. These data usually consist of
latitude and longitude coordinates, though they can also include altitude, bearing, distance,
accuracy data, and place names”, (Miller, 2009) [43]. We can also use the term social
mapping to refer to this practice. This is because the spatial features that are being captured
are usually collected by the general public and not specialized, trained cartographers. The
collaboration afforded by the internet allows for this spatial data to be combined into
digital map interfaces to produce maps with additional information that would not be
possible by other means or that would be very costly to produce in such fashion. An
example of this is the ability of users to suggest landmarks and building names that may be
new or overlooked in previous maps by forwarding their modifications via mapping
websites. This is very useful for modern cartographers because they provide an alternative
source of updated content for the large maps that they have to maintain. In addition, it
allows for custom maps to be produced by a user for their personal use, without the
cartographer having to go through the entire process of producing a custom map for a
single user. Moreover, this can be maintained digitally separate such that it does not
interfere with other users views of the same map i.e. each user can have their own
customised digital map without affecting any others who are using the mapping resource.
This custom map can then be shared with anyone who may need to use it and at they can
further modify it, making it truly a social map.
With regards to the area in question, eastern Kenya, detailed paper maps would need to be
acquired or commissioned from government or private agencies. There are private agencies
that can provide digital and paper maps of the area but that will be outside our scope at the
present time. We shall instead make use of web mapping tools that shall be discussed in the
following section. The base application we are integrating with is a web based information
system that holds data on biological samples collected by the AVID project in East Africa.
Location data is collected as part of the data set. This data consists of a set of coordinates
that provides the location at which the data was collected as well as several fields that
relate to the biological sample itself.
GIS support for emerging infectious diseases in East Africa 30
We would like to use this information to build a Geographical Information System, GIS,
component to the information system that is able to display these locations on a map and
provide additional functionality to overlay other geographical datasets for comparison and
decision making purposes.
1.5.2 Related Areas
The application of GIS to sample collections is not restricted to the biological research
field. Spatial information can be used to complement many other data sets in fields varying
from urban planning to resource management [44]. In the field of demographics, GIS has
been applied to provide key visual indicators of the effects of government policy
implementation such as the building of new infrastructure, population density, impact of
population growth, human migration as well as environmental factors such as forest cover
and precipitation.
This has led to the existence of complimentary data sets that allow for insightful
comparisons to be made. In implementation of the GIS, we will seek to incorporate several
of these datasets to provide overlays of useful information. The GIS will allow for the
extraction of the location data in the AVID samples to produce a visual representation that
can then be compared to a dataset of population density for example. This could provide
interesting insights into possible correlations between population densities and incidences
of disease in a very visual way. The same can be used to compare a variety of
environmental factors that may be relevant to the research taking place with regard to the
effect they may have on the propagation of arthropod borne viruses.
Similarly, any recurring patterns that would be complex to explain with numbers and
graphs in a purely statistical report, can emerge with great impact when displayed in a
visual manner using a GIS. This can greatly aid in conveying the impact that disease
prevalence has in a particular area. The graphical presentation of the sample collection data
and by extension the disease incidence locations can provide support to theories on the
spread and influences on the occurrences of the arthropod borne viruses in question. This
makes GIS very useful in disease mapping and monitoring.
GIS support for emerging infectious diseases in East Africa 31
Disease Mapping
While asset management, monitoring of land use and properties have been the primary
application fields of geographical information systems [45], many other fields have found
it to be an invaluable tool for visual analysis. One of the earliest recorded and most
famous uses of a GIS for disease outbreak was by Dr. John Snow, circa 1854, showing the
occurrences of Cholera in a section of London, (see figure 2.3).
GIS support for emerging infectious diseases in East Africa 32
A modern example of similar use of disease mapping with GIS is observed with a study in
Lincoln, Nebraska, which aimed to locate the population requiring particular health
services and those affected by particular health problems, in order to allow the health
services to target their efforts more effectively [47].
In this case, surveys were administered to 1000 respondents, and the data input to a
database. The respondents were selected using census data to determine other factors
relevant to survey such as age, ethnicity and size of household. Locational data was
compiled by recording the addresses of all the interviewees. This database was then
brought into a GIS program, ESRI Arc/Info and geocoding was used to match the
addresses against a street database with the results being plotted on a map. The address
information provided made it possible to produce useful visuals to aid in decision making
as far as providing preventative health care. By looking at behavioural trends in the area
and generating visualizations of the same, it becomes possible to predict the types of health
services that would be required going forward as well as informational campaigns that
would impact on the anticipated health concerns.
A selection of the maps produced in that study are reproduced below and give an indication
of the kind of visuals that are possible with spatial data and GIS.
GIS support for emerging infectious diseases in East Africa 33
The base map quality available presently is far improved and can provide much richer
detail. This is a factor that this project takes advantage of in its implementation. Let us now
look at the design of the application that allows us to achieve all of this.
GIS support for emerging infectious diseases in East Africa 34
Figure 1.5 Smoking Survey [49]Figure 1.4 Health Care Coverage Status
[48]
Chapter 2 Methodology
In this chapter we shall discuss the design of the application and the tools that were used to
create the application. Modern application development typically requires an integration of
various platforms to achieve the desired result. We shall focus on all those aspects here.
Bearing in mind that we are building upon an existing application we shall start with a
brief review.
2.1 Overview of existing application
The existing application makes use of the established practice of Model-View-Controller
paradigm with its associated advantages. The MVC paradigm separates application
development into three:
• The model, which is the business data.
• The view, which is the presentation logic.
• The controller, which is the application logic.
According to Gamma et al (1995), “MVC consists of three kinds of objects. The Model is
the application object, the View is its screen presentation, and the Controller defines the
way the user interface reacts to user input” [50]. In reality, there can be a little overlap
between the three.
The main advantage of this method is that it allows for a high degree of modularization.
This means that the different aspects of the application can be designed in tandem with
very little conflict. This usually results in very quick application development and very
high specialization at each level.
GIS support for emerging infectious diseases in East Africa 35
Web applications typically make use of the three-tier model to implement MVC. This
allows for the deployment of an application to a very wide user base with no configuration
necessary. The client needs only a web browser. The existing application is no different and
applies this by incorporating a three tier model using a website as its front end, a web
server and middle-ware as its middle tier and a database server as its back end or third tier.
This is demonstrated in figure 2.1 below.
In the context of AVID, this type of application model works particularly well as it allows
the field operations continue without any modification: they can collect data in the way
that is most efficient for them so long as they can process it into an appropriate format for
the information system. AVID have deployed a custom data collection software which is
used by field agents to record information. Employing the MVC paradigm means that the
information system will not interfere with the specialized data collection activities.The
existing application consists of a set of web pages that query a relational database
management system, RDBMS, via a web server running a scripting engine. The web pages
allow for data capture and input to the database as well as display of stored data via the
browser interface,using tables.
GIS support for emerging infectious diseases in East Africa 36
Figure 2.1: The three-tier architecture model of a web
database application. Source Williams et al [51]
2.1.1 Design considerations
In extending this application, we are to introduce a GIS component to the provide a
visualisation of the stored data. This application, which forms an information management
system in itself, is therefore to be extended to manipulate spatial data in addition to
retrieving and displaying the standard text information that is stored in the database.
The use of a custom data collection software has rendered the data input / capture pages of
the existing application redundant. The extended application will therefore take this into
account during the design revision. Updated user requirements have been received and
have resulted in the following set of objectives with regard to the GIS component:
• Visual representation of sample collection points within the geographical research
area and by extension incidences of any diseases detected.
• Overlay of additional datasets of information that are relating to the geographical
research area as may be made available, such as weather conditions or livestock
population densities.
• Representation of the AVID dataset within the bounds of a time period. In order to
represent events occurring over a timespan of selected weeks or months it should
be possible represent the incidences in an animated form showing the occurrence of
disease over the map with time.
The visual representation of the sample collection points will be the first level of
application for the GIS component. This plots all the sample collection points or a dynamic
subset of the same based on a user query. Each unique type of sample should be
represented by a different style of icon.
Additional overlay information will be provided by the datasets that will be sourced from
other research and data collection institutions. These datasets will cover livestock density,
average rainfall and tsetse fly prevalence.
GIS support for emerging infectious diseases in East Africa 37
The animation component of the GIS will be developed to provide a visualization of the
data set over time. This is dependent on the provision of adequate results data to model
trends, failing which it will be possible only to model the feature but not to have any trend
discovery utility.
The tools used have been carefully chosen to provide the most appropriate result within
the constraints present. We will be reusing the set of tools used to develop the existing
application and introducing a new tool for the GIS component: web mapping.
2.2 Web mapping
This is the area of GIS that we are concerned with in this project because we are
combining a web based information system with a GIS application.
Web mapping extends the functionality of traditional GIS by allowing map information to
be displayed in a browser, without the need for the underlying hardware and software to be
present in the same system. Web mapping allows remote systems to access maps over the
internet and have dynamic views built on the fly for display at the user end. This is
achieved by using an Application Programming Interface, (API), that generates rich
content that web browsers can interpret and display.
These APIs have provided a means to access vast amounts of mapping data without having
to invest in the hardware and software to run a full GIS. This greatly simplifies the task of
converting the location data collected in the samples into visual representations. All tasks
involving the data manipulation are performed by a remote GIS installation and only the
results are returned.
This frees the users of the system from the high cost of running a GIS system which would
require systems and mechanisms for satellite imagery and aerial photography, processing
and dissemination as well as other cartographic expertise. While there are cheaper
commercial options to running a complete GIS system, there would still be the cost of
licensing those applications and maps which for most users may be prohibitive.
GIS support for emerging infectious diseases in East Africa 38
2.2.1 Evaluation
There exist several applications that provide various levels of GIS functionality that are
required for this project. We shall explore of them.
• Infrastructure for Spatial Information in the European Community (INSPIRE)
• OpenLayers by Open Source Geospatial Foundation.
• ESRI web mapping API.
• Microsoft Bing maps platform.
• Google earth / maps API.
Infrastructure for Spatial Information in the Europ ean Community (INSPIRE)
INSPIRE is a platform that was established in 2007 to provide a common standard for the
representation and sharing of spatial information across the European Union (EU) by
member states. It aims to facilitate the sharing of this information amongst public sector
organizations to assist in policy making and provide better public access to the same [52].
INSPIRE intends to provide access to detailed environmental spatial data to EU by having
member states compile spatial data according to a common set of implementation rules.
Currently the member states have set a target date of the establishment of a portal offering
spatial information at community level of November 2010. Full implementation across
member states is targeted for completion in May 2019 [53].
Being a public sector initiative, it is key to note that the quality of spatial data available is
likely to be quite high, benefiting from access to government resources and data sets.
Though INSPIRE is still in its infancy, it has the possibility to provide very detailed
information services once implemented.
GIS support for emerging infectious diseases in East Africa 39
However, being an EU concern, INSPIRE data collection is limited to EU member states
and this it will not have any bearing on the current BECA project as the research location
falls outside of this. Even if the INSPIRE standard can spur worldwide adoption, this will
happen in the long term, way beyond the scope of this project.
The availability of more mature products with a larger user base and better support and
documentation also provide reasons why INSPIRE would be an unsuitable technology at
this time.
OpenLayers by Open Source Geospatial Foundation
OpenLayers is a programming interface that allows a programmer to display a dynamic
map in a web page [54]. It is a product of the Open Source Geospatial Foundation and is
purely open source software.
OpenLayers can display map and markers from any source and can use a number of
industry standards such as Web Mapping Service (WMS), Web Feature Service (WFS),
Time Map Service (TMS), WorldWind, (an SDK developed by NASA for representing
environmental data) and GeoRSS, (a method for geographically tagging RSS feeds). This
is useful because it makes it possible to import other geographical datasets compiled in or
exported from other GIS applications and overlay them on top of a map layer. A map layer
is the equivalent of a paper map represented in a browser window. This is especially useful
in providing additional information. Road networks for example can be represented in this
way. Power lines and other forms of infrastructure as well can be overlaid in the same
manner.
The open source nature of OpenLayers is attractive because it is constantly being evaluated
and improved by third parties. This makes it easier to find and build third party add-ons to
provide functionality that may be absent in other products.
OpenLayers makes use of Javascript which is supported by all desktop browsers, making it
cross platform. The ability to integrate numerous data sources makes it attractive for use in
our intended application.
GIS support for emerging infectious diseases in East Africa 40
ESRI web mapping API
Environmental Systems Research Institute, (ESRI), is a company that produces GIS
software for commercial use and is well known for its stand alone products in the field.
The company provides a broad range of products that cater to different industries and
different expertise levels under the branding ArcGIS.
ESRI also makes available a free web mapping API to extend this functionality to the
internet. This gives access to the mapping capabilities of its proprietary software and
allows web designers to include maps in their web applications. The API provides the
ability to overlay selected ESRI mapping resources and allows for the creation of “mash-
ups”. A “mash-up” is the integration of two seemingly unconnected applications, for
example, combining a map and a social networking application to display the locations of
user activity in real time. The API allows for the creation of such combinations.
There are some restrictions on the usage of the maps and functionality provided and the
proprietary nature of the software means that it may not always be possible to customize it.
Some content and functions require payment before usage and deployment may be subject
to some restrictions while using the free API.
However, ESRI brings a rich feature set to the web mapping API as follows:
• support for GeoRSS
• third party map overlays
• compatibility with content created by commercial stand alone ESRI products.
• A selection of reference maps for use with the mapping API
ESRI web mapping API provides an established platform to incorporate dynamic maps
into the web information system. Its proprietary system is built on years of experience in
the field and leverages the stand alone suite of products which are considered industry
standard. On the other hand, the web mapping API is relatively new and does not have a
wide user base despite the desktop and server suite of GIS products holding a commanding
market share, quoted at up to 30% in 2009 [55].
GIS support for emerging infectious diseases in East Africa 41
Microsoft Bing maps platform
The Microsoft Bing maps platform is another free web mapping API that seeks to provide
mapping functionality for web pages. It is also a proprietary platform, produced by the
Microsoft Corporation. The Bing maps platform was known previously as Microsoft
Virtual Earth. The Bing platform builds on the expertise of Microsoft Virtual Earth
technologies and is designed to provide tools to layer information on top of Bing maps.
Bing maps simply refer to the map images provided by the underlying GIS.
The Bing maps platform provides an API with the following functionality :
• Overlays.
• Bird's eye and street views.
• Mobile device support.
• GeoRSS feeds.
• Routing and navigation.
• Geocoding i.e. the translation of a geographical address to a set of geographical
coordinates on a map.
The satellite map imagery provided by the Bing maps platform is the most up to date of the
East Africa region out of all the web mapping options that are being evaluated in this
report. Having said that, other supporting data for the region remains unavailable. There is
no geocoding or navigation support for the region and landmark information is minimal.
This means that without the additional supporting information, the map imagery remains
without sufficient context to make it a good candidate for selection. It is anticipated that in
future, upgrades to this supplementary information will remedy this.
Alternatively, a solution that will be able to merge the satellite imagery provided by the
Bing platform with extensive geocoding and navigation support for the East and Central
Africa region, from a third party, would be able to generate a high quality hybrid which
would satisfy all the necessary requirements. This is however out of the current scope of
this project.
GIS support for emerging infectious diseases in East Africa 42
Google earth / maps API
Google earth / Google maps is yet another proprietary mapping platform that provides
functionality to display and manipulate map data within a web page. The platform is
provided free of charge by the Google company, subject to terms and conditions of use and
deployment. The Google maps API takes the functionality present in the Google Earth
suite of programs and provides the interface to display similar imagery in web pages.
The Google earth API provides all the functionality found in the Bing mapping platform
and adds facilities for time and animation. These are useful components as they allow us to
make use of the date and time component of the sample collection. The time and animation
functionalities will allow visual representations which are able to take into account when
the events occurred and not just where. This is especially useful when trying to observe the
formation of any patterns or trends.
The satellite map imagery of the East Africa region provided by the Google maps API is
not as up to date as that of the Bing mapping platform. However, the API provides
significantly more underlying infrastructure data, both roads and landmarks, and higher
zoom levels. Furthermore, the mapping data is currently open for user contribution,
increasing the underlying content regularly and map updates will see the imagery improve.
The Google maps API is considered a mature platform, based on the Google Earth product
which itself was known prior as Earthviewer 3D, a product available from Keyhole
Incorporated since 2001 [56].
While all the desired features of the mapping API found in Google earth may not be
implemented in Google maps, virtually all the necessary functions are available. The
Google earth plug-in also requires to be downloaded for the mapping display to work in
the browser and is not supported on all major operating systems as yet. Therefore the
choice of Google maps will provide a better cross platform experience. That the AVID
project is sponsored by Google.org means that this will also be a natural fit since there will
be opportunities for further support and collaboration that may not be possible with other
platforms. The Google maps API has undergone many refinements since it's inception,
with the current API version, version 3, supporting new devices and technology platforms.
GIS support for emerging infectious diseases in East Africa 43
2.3 Building blocks
The existing application was built using the following tools,
• PHP
• MySQL Relational Database
• Apache web server
The extended application uses the same tools and adds the following to the tool set.
• Google Maps API
• Keyhole Markup Language
We shall briefly describe each of these tools.
2.3.1 Hypertext Pre Processor (PHP)
PHP, originally named Personal Home Page tools, is a general purpose scripting language
developed in 1995 by Rasmus Lerdorf [57] and currently developed and maintained by The
PHP Group. There is more than one implementation of the language but it is open source
with the most popular implementation produced by the Zend company. It was designed for
creating HTML content although it has since extended beyond that domain.
It is suited for web development purposes due to the fact that it can be embedded within
HTML and executed on the fly by the web server. This is achieved by the web server
calling a command line executable to process the code, with the results being returned to
the server and forwarded to the browser as HTML.
PHP provides methods to access and manipulate data in SQL compliant databases. SQL
stands for Structured Query Language and is a standard through which relational databases
can be accessed and managed. The application makes use of PHP for connecting to the
database and performing searches as well as formatting and displaying the results.
GIS support for emerging infectious diseases in East Africa 44
It is an open source tool which is now in its fifth iteration of development with the current
version being PHP 5.3.3. The original application was developed with a previous version
while the extended application makes use of version 5.3.0.
2.3.2 MySQL Relational Database Management System
MySQL is a relational database management software, (RDBMS), that stores and
manipulates data stored within a data set, (relational database). A relational database stores
data within tables as well as the relationship between that data with tables as well. This
allows for various representations of that data to be derived and manipulated without
changing the tables themselves. This is a big advantage and allows for complex
associations to be created that would otherwise not be possible.
The data collected by the AVID project is stored a MySQL database from which it is
managed and manipulated. The MySQL RDBMS provides the means to retrieve all or
subsets of that data based on search parameters structured in query statements. These
statements act as filters on the dataset to allow users to sift through large amounts of data
to find specific information that matches their search criteria.
The current iteration of MySQL is the MySQL Community Server version 5.1.50 with the
version used in our application being version 5.1.36. The MySQL RDBMS is open source
software, multi-platform and is also available in other enterprise class forms with paid
support and other benefits for users that require that level of service. MySQL provides a
fast, optimized data store for the application to utilize.
GIS support for emerging infectious diseases in East Africa 45
2.3.3 Apache Web Server
The Apache web server or Apache httpd is an open source web server that has been
developed and is maintained by the Apache HTTP Server Project. It is an HTTP server that
is used for hosting of web pages and provides extensions for all web server tasks that are
required by current standards. These range from secure encrypted connections to virtual
domains. Apache web server supports PHP and this makes it suitable for our application
and provides the framework for our pages to be accessed. It is robust, available on the
major operating system platforms and it is designed to operate with modest computer
hardware requirements. The extended application makes use of Apache version 2.2.11 with
the most recent stable version available being version 2.2.16.
Apache web server currently holds the largest market share for web servers, despite being
an open source product, and has been the most popular web server software since 1996.
This can be seen in figure 2.2 below which shows market share statistics as of August
2010.
GIS support for emerging infectious diseases in East Africa 46
2.3.4 Google Maps API
The Google Maps API is a programming interface that allows web pages to query the
mapping service provided by Google incorporated. The API is in its third iteration of
development with the current version being version three often abbreviated as Google
maps v3. Our application is web based and we are making use specifically of the Google
Maps JavaScript API V3 which is compatible with virtually any browser currently
available on any platform.
As mentioned before, the Google maps API provides to following functions: overlays,
bird's eye and street views, mobile device support, GeoRSS feeds, routing and navigation
and geocoding. These are largely dependent on the amount of mapping information,
imagery and road data available for the area of the surface of the earth that is being viewed.
The more underlying data is available, the more features are enabled and accessible for that
particular area.
The API provides for both static and dynamic maps to be integrated into any web page
with the use of Javascript coding and Google's mapping service. In particular, the API
provides the means to display custom spatial data on a map which have been passed to it
from another source, for example, a database. This is a key functionality since it allows us
to generate spatial datasets dynamically and pass them to the API for display. The Google
Maps API provides utilities for map manipulation such as zooming, panning and viewing
of several different map types; road maps, satellite views, topographical, sometimes known
as relief, views as well as a combination of road and satellite.
The mapping service is proprietary although the API is publicly available for developers to
make use of at no charge. The Google maps API is provided in both free and paid
enterprise class flavours. The extended application makes use of the free version.
GIS support for emerging infectious diseases in East Africa 47
2.3.5 Keyhole Markup Language
The idea of overlaying complimentary datasets is central to our GIS component. As
discussed earlier, these additional datasets allow for comparisons to be made with the other
factors that they represent.
In order to make these datasets available to our application, they need to be in a compatible
format. The format compatible with our application is known as Keyhole Markup
Language, (KML). According to Udell (2009), “KML is a standard that was originally
developed for use in Google earth and has since come into widespread use in the geoweb”
[59]. It is tag based and defines elements for describing geographical data. Google describe
KML as “... a file format used to display geographic data in an earth browser, such as
Google Earth, Google Maps, and Google Maps for mobile” [60]. The earth browsers
“read” KML and format and output geographical features in the same way that web
browsers “read” HTML and format the display accordingly.
KML provides the mechanisms to define overlays and attach them to the map view in a
browser. This allows us to take the rich complimentary spatial datasets and convert them to
second “map” that can be placed on top of our Google map that is embedded in our web
page. KML provides for the describing of points, lines, polygons and indeed irregular
shapes to represent regions or geographical features complete with associated text.
2.4 Conclusion: Bringing it all together
These building blocks allow us to assemble our extended application into the following
process model.
1. The user logs on to the system and submits a search requirement via a web form.
2. The Apache web server processes the HTML and Javascript while PHP is passed on
to the PHP executable.
3. PHP processes the script and if there are database operations to be performed,
connects and queries the database based on the parameters received.
4. The MySQL database performs the query and returns the results.
GIS support for emerging infectious diseases in East Africa 48
5. The PHP executable receives the result set and closes the connection. After closing
the connection it formats the result set and returns it to the web server as HTML or
XML depending on script commands.
6. The Apache web server receives the result set and continues with Javascript
processing to request map services from the Google API.
7. The web server formats the output which includes the request for the appropriate
map and send it back to the browser.
8. The Google map service processes the request and serves the browser with the
requested dynamic map with the specified components, (points or overlays).
9. The browser displays the combined output from the web server and the map from
the Google map service.
Figure 2.3 shows the steps in the process model.
GIS support for emerging infectious diseases in East Africa 49
Figure 2.3: Process model for the extended application
The different servers (software), with the exception of the Google maps service can be run
on a single hardware system although in practice the web server and the database server
are often run on separate hardware systems. Our implementation will run on a single
hardware system.
GIS support for emerging infectious diseases in East Africa 50
Chapter 3 Implementation
3.1 Implementation Objectives
The aim of this project is to develop GIS support for an emerging infectious disease
monitoring project, AVID. This project builds on earlier work that culminated in an
information system that supported the collection and management of biological sample
data. To this information system, we are to provide GIS support via mapping extensions to
manage the spatial data collected.
Earlier in this document, under our design considerations, we set out three objectives we
would like to fulfil with the GIS extension to the application. These were,
• Visual representation of sample collection points within the geographical research
area and by extension incidences of any diseases detected.
• Overlay of additional datasets of information that are relating to the geographical
research area as may be made available.
• Representation of the AVID dataset within the bounds of a time period.
Using the tools outlined in the chapter on methodologies, the following is the
implementation of the stated project objectives in the extended application, divided into
three sections :
1. Data acquisition and preparation.
2. Data processing
3. Data presentation
These complement the three-tier architecture model described earlier in this document
although they do not directly correspond. They are not entirely discrete and overlap
wherever necessary.
GIS support for emerging infectious diseases in East Africa 51
3.1.1 Data acquisition and preparation
AVID is responsible for collecting and processing biological data and yet the application
requires further external data sources to process the spatial data effectively. Therefore, the
origins of the data for the application can be divided into two sources: AVID and others.
AVID data
The AVID project collects sample data from the field using a custom application.
Biological samples are collected from the human and the various animal populations and
analysed for pathogens. This process can be looked as occurring in two distinct phases;
sample collection and sample processing.
In the sample collection phase, data is collected about the sample origin, location and
storage. This is fed into a database together with information on which project it belongs
to. During the sample processing phase, the results of the serology tests are added to the
database as well. This completed the picture of the AVID data.
The original application was developed without receiving any actual data input from the
AVID project. For this project, AVID provided a batch of 5,000 records as sample input
data for the application. These records were in the form of a Microsoft Excel spreadsheet
with multiple worksheets which had been extracted from the AVID database.
The main worksheet containing sample data contained 18 columns with a secondary
worksheet detailing the organism types sampled that held two columns. The data required
sorting before it could be fit for purpose. The sorting process involved three tasks :-
• Verifying that there were no empty cells or cells with null values.
• Verifying that the data in the worksheets was valid i.e. that that the data was in line
with what was expected from the column heading.
• Verifying that there were no duplicate records and that there was consistency in the
various identification columns in the spreadsheet.
GIS support for emerging infectious diseases in East Africa 52
The excel spreadsheet was manipulated to list the rows in alphabetical order to group null
or empty values in various fields. The aim was to eliminate rows with incomplete or
missing data from the worksheets. This resulted in all rows with missing data (empty cells)
or null values to be removed from the sample data. Subsequently, the excel sheet was
manipulated to list the date and time data in order. Rows with invalid date and time values
were removed at this point.
Finally the excel sheet had duplicate columns removed for clarity. Rows with inconsistent
value formats were also removed.
Out of the 5,000 received records, the sorting process filtered the set down to 3,419. 1,581
rows were discarded for failing the verification criteria process outlined above. The
remaining rows would then move on to data processing which is covered later in this
chapter.
Other data
Other data is required for the GIS component to satisfy the stated objectives. Acquisition
of complementary datasets for overlay purposes is the task that this comprises of. The GIS
component of the application is to overlay multiple datasets over the base map to achieve
this.
A total of five datasets were considered for this purpose. The five datasets are comprised of
:-
1. Human population density.
2. Livestock density.
3. Rainfall / precipitation.
4. Wildlife population densities.
5. Tsetse fly prevalence.
These datasets were acquired from publicly available repositories namely the GIS section
of International Livestock Research Institute (ILRI) and the publications section of the
World Resources Institute websites. The Kenya Wildlife Service was also requested to
provide up to date GIS data.
GIS support for emerging infectious diseases in East Africa 53
3.1.2 Data Processing
The data processing is divided into three parts:-
1. Formatting.
2. Database creation and import.
3. Overlay conversion.
Formatting
The filtered AVID data required processing before it could be used by the application.
Specifically, the data and time information required reformatting and the geographical
coordinates were to be converted to a signed decimal notation. Date and time values were
formatted with an appropriate mask to emulate a timestamp, resulting in the format
yyyy:mm:dd hh:mm:ss.
The coordinate columns were converted to signed decimal notation with latitudes having
southerly values designated negative and vice versa. Longitudinal data was also
transformed to the same scheme with westerly values designated as negative and vice
versa. This was necessary to facilitate the passing of coordinate values to the Google API
which uses this format.
Finally, the values in the ELISA results were changed from text values “0” and
“POSITIVE” to integer values zero (0) and one (1) respectively, to represent the boolean
values true and false.
Database creation and import
The next step in the processing was to import the data into the MySQL database. The
original application defined database structures to hold AVID information. It was designed
without the benefit of sample data and as a result the table structures would be revised to
reflect the actual data that had been received. A new database was created in the MySQL
RDBMS.
GIS support for emerging infectious diseases in East Africa 54
The new table structures were developed along the same guiding principles as those of the
original table, taking into account the significance of spatial data. This resulted in six tables
being defined. The tables are listed below with a short description and their structure:
1. Organisms – this defines all the different organisms from which samples are
collected. The primary key is “id” which is set to auto-increment with every new
row added to the table. The “name” field describes the type of organism and the
“comment” stores any additional descriptive information.
Table 3.1: Organisms table structure
Field Data Type Null Default Value Primary Key
id Integer (11) No None Yes
name Varchar (30) No None
comment Varchar (25) Yes Null
2. Samples – this defines the sample types prepared for biological analyses. The
primary key is “id” which is set to auto-increment with every new row added to the
table. The “sample_type” field is an integer identifier for the samples and the
“description” field holds the text description of this identifier.
Table 3.2: Samples table structure
Field Data Type Null Default Value Primary Key
id Integer (11) No None Yes
sample_type Integer (3) No None
description Varchar (60) No None
3. Projects – this defines the various different projects for which samples are
collected and analysed. The primary key is “id” which is set to auto-increment with
every new row added to the table. The “Project” field stores an integer identifier
for the project that is conducting the sampling. The “Description” field stores the
text identifier for the project.
GIS support for emerging infectious diseases in East Africa 55
Table 3.3: Projects table structure
Field Data Type Null Default Value Primary Key
id Integer (11) No None Yes
Project Integer (3) No None
Description Varchar (20) No None
4. ELISA – this table defines the pathogens that are targeted through the serology
analyses and holds the information on which samples tested positive for which
pathogens. The primary key in this table is “SampleID” which holds the unique
alphanumeric identifier that is assigned to each sample. The “id” field is set to
auto-increment with every new row added to the table. The “Rift_Valley_Fever”,
“Anaplasma_marginale”, “Typanosoma_congolense” and “Theileria_parva” store
integer values that are interpreted as boolean for the presence and absence of the
respective pathogens.
Table 3.4: ELISA table structure
Field Data Type Null Default Value Primary Key
id Integer (11) No None
SampleID Varchar (11) No None Yes
Rift_Valley_Fever Tinyint (4) No None
Anaplasma_marginale Tinyint (4) No None
Typanosoma_congolense Tinyint (4) No None
Theileria_parva Tinyint (4) No None
5. Storage – this table holds all the physical storage information for each sample and
the project it belongs to. The primary key in this table is “SampleID” which holds
the unique alphanumeric identifier that is assigned to each sample. The “id” field is
set to auto-increment with every new row added to the table. The “sample_type”
field is an integer identifier for the samples. The “Organism” field stores an integer
value that corresponds to the “id” field in the Organism table and is used as a key
to identify the sampled organism. The “Animal_ID” field holds a unique identifier
for animals that are sampled. The “Box_ID” field identifies the box in which a
GIS support for emerging infectious diseases in East Africa 56
sample is stored. The “Box_details” field identifies the location within the box that
the sample is stored. The “Tray_ID” holds the name of the box in which the
sample is stored. The “Project” field stores the integer identifier for the project that
is conducting the sampling.
Table 3.5: Storage table structure
Field Data Type Null Default Value Primary Key
id Integer (11) No None
SampleID Varchar (12) No None Yes
sample_type Integer (3) No None
Organism Integer (2) No None
Animal_ID Varchar (7) No None
Box_ID Integer (5) No None
Box_details Varchar (4) No None
Tray_ID Varchar (10) No None
Project Integer (2) No None
6. Spatial – this table defines and holds all the spatial data associated with the
biological samples. The primary key in this table is “SampleID” which holds the
unique alphanumeric identifier that is assigned to each sample. The “id” field is set
to auto-increment with every new row added to the table. The “Visit_ID” stores the
name of the place where the sample was collected or an alphanumeric identifier for
the same. The “Visit_Date” field stores the date and time that the sample was
collected. The “Long” and “Lat” fields store the longitude and latitude coordinates
taken from the GPS device for the location where the sample was collected.
Table 3.6: Spatial table structure
Field Data Type Null Default Value Primary Key
id Integer (11) No None
SampleID Varchar (12) No None Yes
Visit_ID Varchar (12) No None
Visit_Date datetime No None
Long Float (10,6) No None
Lat Float (10,6) No None
GIS support for emerging infectious diseases in East Africa 57
Importing was then completed by creating new worksheets in the filtered excel spreadsheet
containing only the fields that corresponded to each data table and then exporting the
contents of each into text files in comma separated value (csv) format which were then
imported into the corresponding MySQL database tables using the phpMyAdmin web
interface.
Overlay conversion
The overlays acquired for the GIS component are created in the ArcGIS software and thus
are in a proprietary file format that is used in that software. The file format is known as the
shapefile spatial data format. According to the Environmental Systems Research Institute
(1998), a shapefile consists of three files: a main file (extension .shp ), an index file
(extension .shx) and a dBASE table (extension .dbf) [61]. The main file contain the shapes
defined by vertices, the index file contains the offsets for each shape in relation to the
beginning of the main file and the dBASE file contains the feature attributes for each shape
in the order they appear.
This format is cannot be used by the Google Maps API and as such conversion needs to be
performed to Keyhole Markup Language in order for the overlays to be compatible with
our application. The conversion of the overlays from the shapefile format to KML format
is performed by a third party software called Shape2KML. This program allows for the
conversion of shapefiles to KML format as well as the assignment of colour schemes.
Shapefiles do not support colour directly with that feature being handled by the software
which is reading the file assisted by any colour information that may be contained in the
dBASE file as an attribute.
The five overlays were processed using the Shape2KML utility and the resulting KML files
were used in the application. However, two of the shapefiles, population density and
wildlife density were not used. This is because the conversion process did not yield files
with adequate colour differentiation to make the visual information useful. Therefore, only
three of the datasets yielded satisfactory overlays that could be used with the GIS
component.
GIS support for emerging infectious diseases in East Africa 58
3.1.3 Data Presentation
To present the data and run the application, we need a suitable environment. Since the
application is a web application we require a web server. We also require a database and
scripting engine as per our three-tier architectural model. Having already selected our tool
set previously we need to set up our environment.
To do this we use the WampServer program. WAMP is an acronym that stands for
Windows (Operating System), Apache (web server), MySQL (RDBMS) and PHP
(scripting engine). It provides a complete installation of the web server, scripting engine
and RDBMS on a Microsoft Windows computing environment along with associated
management tools. This type of environment is derived from a LAMP environment,
(Linux, Apache, MySQL, PHP), which had proven to be very popular among developers in
the open source community. There also exists a MAMP environment, (MacOS, Apache,
MySQL, PHP), for Apple Macintosh hardware computing environments that are running
MacOS. This allows our application to be set up on any one of the three major software
environments that exist currently. Appendix C outlines the installation process for the
WampServer 2.0i which is the version that is used in this project. The Wampserver
software installs all three components and includes a web interface for management of the
MySQL RDBMS, phpMyAdmin. This tool allows us to manage our databases from within
a web browser, simplifying the task of creating tables and views. Once installation is
complete, we are able to create a number of database tables and views that are crucial to
the presentation of our data. The database tables have been covered in the data processing
section and so we move on to database views.
A database view is a subset of of data created through a stored query and is accessible as a
virtual table in a database. Database views are useful in simplifying queries and collating
data from different tables within a database into one virtual table for querying. This has the
advantage of allowing flexible subsets to be created without affecting the underlying tables
holding the data. These views can be used in the creation of more views allowing for the
compilation of a virtual table containing fields from several “real” tables. To illustrate this
we shall look at three views that form the basis of our main data presentation.
GIS support for emerging infectious diseases in East Africa 59
The first view, named trial , is created with the following SQL query.
select `Spatial`.`SampleID` AS `SampleID`,`Spatial`.`VisitID` AS
`VisitID`,`Spatial`.`VisitDate` AS `VisitDate`,`Spatial`.`Long` AS
`Long`,`Spatial`.`Lat` AS `Lat`,`Storage`.`Organism AS `Organism` from (`Spatial`
left join `Storage` on((`Spatial`.`SampleID` = `Storage`.`SampleID`)))
This query creates a result set with fields from the “Spatial” table and the “Storage” table,
resulting in a virtual table with the following structure.
Table 3.7: trial view structure
Field Data Type
SampleID Varchar (12)
Visit_ID Varchar (12)
Visit_Date datetime
Long Float (10,6)
Lat Float (10,6)
Organism Integer (2)
The query uses a left join on the fields Spatial.SampleID and Storage.SampleID to achieve
this.
This gives us the type of the organism as identified by the number key appended to the
fields found in the Spatial table. In order to make this information easier to understand, we
use this view as a source to create another, called trial1. We use the following SQL query.
select `trial`.`SampleID` AS `SampleID`,`trial`.`VisitID` AS
`VisitID`,`trial`.`VisitDate` AS `VisitDate`,`trial `.`Long` AS `Long`,`trial`.`Lat` AS
`Lat`,`Organisms`.`name` AS `name` from (`trial` left join `Organisms`
on((`trial`.`Organism` = `Organisms`.`id`)))
GIS support for emerging infectious diseases in East Africa 60
This query creates a result set with fields from the “trial” view and the “Organism” table,
resulting in a virtual table with the following structure.
Table 3.8: trial1 view structure
Field Data Type
SampleID Varchar (12)
Visit_ID Varchar (12)
Visit_Date datetime
Long Float (10,6)
Lat Float (10,6)
name Varchar (30)
The query uses a left join on the fields trial.Organism and Organisms.id to achieve this.
This gives us the name of the organism as identified by the “name” field in the Organisms
table, which effectively replaces the “Organism” field that was found in the “trial1” view.
Using this second view, we create a third which adds fields from the ELISA table using the
following SQL query.
select `trial1`.`SampleID` AS `SampleID`,`trial1`.VisitID` AS
`VisitID`,`trial1`.`VisitDate` AS `VisitDate`,`tria l1`.`Long` AS `Long`,`trial1`.`Lat` AS
`Lat`,`trial1`.`name` AS `name`,`ELISA`.`Rift Valley Fever` AS `Rift Valley
Fever`,`ELISA`.`Anaplasma marginale` AS `Anaplasma
marginale`,`ELISA`.`Trypansoma congolense` AS `Trypansoma
congolense`,`ELISA`.`Theileria parva` AS `Theileria parva` from (`trial1` left join
`ELISA` on((`trial1`.`SampleID` = `ELISA`.`SampleID`)))
This query creates a result set with fields from the “trial1” view and the “Organism” table,
resulting in a virtual table with the following structure.
GIS support for emerging infectious diseases in East Africa 61
Table 3.9: avidresults1 view structure
Field Data Type
SampleID Varchar (12)
Visit_ID Varchar (12)
Visit_Date datetime
Long Float (10,6)
Lat Float (10,6)
name Varchar (30)
Rift_Valley_Fever Tinyint (4)
Anaplasma_marginale Tinyint (4)
Typanosoma_congolense Tinyint (4)
Theileria_parva Tinyint (4)
The query uses a left join on the fields trial1.SampleID and ELISA.SampleID to achieve
this.
This gives us the ELISA results for each sample in our new view, named “avidresults1”.
This view forms the table that we shall query from our web pages.
While the view “avidresults1” provides the spatial and serology result data, we create
another view to provide additional details on the sample. We follow the same pattern of
building views, starting with the following query.
select `Storage`.`SampleID` AS `SampleID`,`Storage`.`Animal_ID` AS
`Animal_ID`,`Storage`.`Box_ID` AS `Box_ID`,`Storage.`Box_Details` AS
`Box_Details`,`Storage`.`Tray_ID` AS `Tray_ID`,`Storage`.`Project` AS
`Project`,`Samples`.`description` AS `description` from (`Storage` left join `Samples`
on((`Storage`.`sample_type` = `Samples`.`sample_type`)))
This query creates a result set with fields from the “Storage” table and the “Samples” table,
resulting in a virtual table with the following structure.
GIS support for emerging infectious diseases in East Africa 62
Table 3.10: storage1 view structure
Field Data Type
SampleID Varchar (12)
Animal_ID Varchar (7)
Box_ID Integer (5)
Box_details Varchar (4)
Tray_ID Varchar (10)
Project Integer (2)
description Varchar (60)
The query uses a left join on the fields Storage.sample_type and Samples.sample_type to
give us the description of the sample type appended to a subset of the fields found in the
Storage table.
To this view, named “storage1”, we add the name of the project that the sample belongs to
by creating a new view with the following SQL query.
select `storage1`.`SampleID` AS `SampleID`,`storage1`.`Animal_ID` AS
`Animal_ID`,`storage1`.`Box_ID` AS `Box_ID`,`storage1`.`Box_Details` AS
`Box_Details`,`storage1`.`Tray_ID` AS `Tray_ID`,`storage1`.`description` AS `Sample
Type`,`Projects`.`Description` AS `Origin` from (`storage1` left join `Projects`
on((`storage1`.`Project` = `Projects`.`Project`)))
This query creates a result set with the fields from the “storage1” view and the “Samples”
table, resulting in a virtual table with the following structure.
Table 3.11: storage2 view structure
Field Data Type
SampleID Varchar (12)
Animal_ID Varchar (7)
Box_ID Integer (5)
Box_details Varchar (4)
Tray_ID Varchar (10)
Sample Type Varchar (60)
Origin Varchar (20)
GIS support for emerging infectious diseases in East Africa 63
The query uses a left join on the fields storage1.Project and Projects.Project to give us the
project name as the field “Origin”, effectively replacing the “Project” field in the
“storage1” view.
These two views, “avidresults1” and “storage2”, are the two tables that our PHP scripts
shall be querying.
The queries that the PHP scripts pass to the MySQL RDBMS are user driven. This means
that they are created from user input via a web form. This form is contains several input
fields as can be seen in figure 3.1 below.
The user can enter a sample id in the search term field as well as dates to search within.
The list of pathogens that AVID monitors is included as a drop down list. The PHP code
that converts the user input into a formatted SQL query for the database is shown below.
GIS support for emerging infectious diseases in East Africa 64
Figure 3.1: Avid Search form
<?php
// Has the user provided the parameter?
if (empty($searchValue))
{
// No, the user hasn't provided a parameter or initial page load
// Do nothing
} // end of if empty($searchValue) body
else
{
// Start a query ...
$query = "Select SampleID,
`VisitID`,
`VisitDate`,
`Lat`,
`Long`,
`name` AS 'type'
from `avidresults1`";
// ... then, if the user has specified a search term,
// add the searchValue as a WHERE clause ...
if ($searchValue != "All")
{$query .= " WHERE SampleID Like '$searchValue%'";}
else {$query .= " WHERE 1";}
// ... then, if the user has specified a "From" date term,
// add the timestampFrom field as a WHERE clause ...
if ($fromValue != "")
$query .= " AND VisitDate >= '$fromValue'";
// ... then, if the user has specified a "To" date term,
// add the timestampFrom field as a WHERE clause ...
if ($toValue != "")
$query .= " AND VisitDate <= '$toValue'";
// ... then, if the user has selected a pathogen,
// add the selection value as a WHERE clause ...
if ($disease != "0")
$query .= " AND `$disease` IS TRUE";
// ... and then complete the query.
$query .= " ORDER BY VisitDate LIMIT 0, 100";
GIS support for emerging infectious diseases in East Africa 65
The results are limited in the query to 100 for the sake of map performance. This shall be
elaborated on later. The comments in the code provide a step by step description of the
assembling of the query from the user parameters filled in the form before the query is
completed. Once the query is complete, the following code passes it on the the MySQL
RDBMS.
// run the query and show the results
displayAVIDList($connection, $query, $searchValue);
The function displayAVIDList() takes three arguments; a database connection, an SQL
query as a string and finally the search parameter entered by the user in the form. The
function submits the query to the database and prints any results in a table together with a
button for mapping them. If no results were found, the user is informed accordingly.
The code for the function is displayed below,
// Show all sample records in a <table>
function displayAVIDList($connection, $query, $searchValue)
{
// Run the query on the DBMS
if (!($result = @ mysql_query ($query, $connection)))
mysql_error( );
// Find out how many rows are available
$rowsFound = @ mysql_num_rows($result);
// If the query has results ...
if ($rowsFound > 0)
{
// Define $color=1
$color="1";
// ... print out a header
echo "<p>Results for $searchValue<br>";
GIS support for emerging infectious diseases in East Africa 66
// Map link
echo '<p>
<form name="goMap" action="mapthis.php" method="POST">
<input type="hidden" name="filters" value="';
echo rawurlencode($query);
echo '"><input type="submit" value="Map this result set">
</form>
</p>';
// and start a <table>.
echo '<table width="400" border="0" align="left" cellpadding="2" cellspacing="1">';
//Column titles
echo '<tr><td>Sample ID</td><td>Location</td><td>Organism</td></tr>';
while($rows=mysql_fetch_array($result)){
// If $color==1 table row color = #FFC600
if($color==1){
echo "<tr bgcolor='#bfd9ff'>
<td>".$rows['SampleID']."</td><td>".$rows['VisitID']."</td><td>".$rows['type']."</td>
</tr>";
// Set $color==2, for switching to other color
$color="2";
}
// When $color not equal 1, use this table row color
else {
echo "<tr bgcolor='#e8e8e8'>
<td>".$rows['SampleID']."</td><td>".$rows['VisitID']."</td><td>".$rows['type']."</td>
</tr>";
// Set $color back to 1
$color="1";
}
} // end while loop body
// Finish the <table>
echo '</table>';
GIS support for emerging infectious diseases in East Africa 67
} // end if $rowsFound body
else
{
// Ask user to check selection
echo "<p>No records were found. Please review your search parameters.</p>";
}
// Report how many rows were found
echo "$rowsFound records found matching your
criteria.</p>";
} // end of function
The results are displayed in a table as shown in figure 3.2, together with the button used to
implement the mapping option.
The form that is created for the mapping facility holds the SQL query in a hidden field.
This is necessary for the mapping page to retrieve the coordinates of the samples in the
result set to display on the map. The form passes the query to the mapping page which in
turn passes it to another PHP script that uses it to recreate the dataset and retrieve the
coordinates. These are then written to an XML file which serves as a temporary data store
for the Google Maps script that renders them on the map. The page is based on a sample
script provided in the Google Maps API documentation for performing exactly this type of
map manipulation.
GIS support for emerging infectious diseases in East Africa 68
Figure 3.2 : AVID search results
The mapping page relies on a PHP script to convert the output of the database into the
XML store. This PHP script is invoked by a Google Maps API function, downloadUrl(url,
callback), which is a function for XML and data parsing. The code snippet that does this is
listed below.
downloadUrl("avid_genxml.php"+"?option="+ postVars, function(data) {
var xml = data.responseXML;
var markers = xml.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
var name = markers[i].getAttribute("name");
var address = markers[i].getAttribute("address");
var type = markers[i].getAttribute("type");
var point = new google.maps.LatLng(
parseFloat(markers[i].getAttribute("lat")),
parseFloat(markers[i].getAttribute("lng")));
var html = '<b><a href="details.php?sample=' + name + '">' + name +'</a></b> <br/>' + address +
"<br/>" + type;
var icon = customIcons[type] || {};
var marker = new google.maps.Marker({
map: map,
position: point,
icon: icon.icon,
shadow: icon.shadow
});
bindInfoWindow(marker, map, infoWindow, html);
pointArray.push(marker);
}
});
}
The function invokes the script “avid_genxml.php” and passes the query to it in the HTTP
GET parameter “option”. The Javascript variable “postVars” contains the query string that
it url encoded, having been retrieved from the HTTP POST variable that was passed from
the form in the previous page.
GIS support for emerging infectious diseases in East Africa 69
The PHP script “avid_genxml.php” carries out the following functions when invoked:
• Opens a connection to the database server and selects the appropriate database.
• Retrieves the query string from the HTTP GET variable passed to it.
• Executes the query
• Outputs each row result into an XML document as elements.
• Closes the database connection.
The code snippet for the PHP script performing the above functions is below:
// Opens a connection to a MySQL server
$connection=mysql_connect ($localhost, $username, $password);
if (!$connection) {
die('Not connected : ' . mysql_error());
}
// Set the active MySQL database
$db_selected = mysql_select_db($database, $connection);
if (!$db_selected) {
die ('Can\'t use db : ' . mysql_error());
}
// Use get value for query
$query= rawurldecode($_GET['option']);
// Select the matching rows according to the query
$result = mysql_query($query);
if (!$result) {
die('Invalid query: ' . mysql_error());
}
header("Content-type: text/xml");
// Start XML file, echo parent node
echo '<markers>';
// Iterate through the rows, printing XML nodes for each
while ($row = @mysql_fetch_assoc($result)){
// ADD TO XML DOCUMENT NODE
echo '<marker ';
GIS support for emerging infectious diseases in East Africa 70
echo 'name="' . parseToXML($row['SampleID']) . '" ';
echo 'address="' . parseToXML($row['VisitID']) . '" ';
echo 'lat="' . $row['Lat'] . '" ';
echo 'lng="' . $row['Long'] . '" ';
echo 'type="' . $row['type'] . '" ';
echo '/>';
}
// End XML file
echo '</markers>';
// Close the DBMS connection
mysql_close($connection);
The downloadUrl() function will execute the callback argument, function(data), after the
PHP script has concluded and make use of the the XML document created to create the
points on the map and place markers at the corresponding locations. Each point represents
a sample from the result set and is marked by a custom icon depending on organism type.
These icons are defined in the page and correspond to the Organism name retrieved from
the database. Each type of organism will have a different coloured icon to represent it on
the map. Clicking on an icon brings up supplementary information about that sample,
written into the information window component of the marker. The information window
content was modified to include a link to a further script that retrieves the storage details of
the sample. Additionally, the downloadUrl() function was also modified so that it stores
the points into a global array for use in the animation function.
GIS support for emerging infectious diseases in East Africa 71
The results of the mapping page on a set of results is shown in the screen capture below.
This is the achievement of our first objective: visual representation of sample collection
points within the geographical research area. The first thing we notice is that a selection of
our points lie in the Indian Ocean. This is explained under “Challenges” in the next
chapter.
Having arrived at this point, we proceed to implement the code to satisfy our second
objective: overlay of additional datasets of information that are relating to the geographical
research area. There are three datasets available as overlays. These are implemented by
three buttons on the mapping page interface, along with a button to remove them from the
map window. Furthermore, custom overlays are supported by use of a feature that takes the
URL of a valid KML file entered in text box and overlays it on the map. This allows any
valid KML overlay to be added to the map, provided it is publicly accessible on the
internet.
GIS support for emerging infectious diseases in East Africa 72
Figure 3.3: Points on map
Figure 3.4. shows the interface that performs these functions.
Each button is mapped to a Javascript function to perform the overlay. The code snippets
that achieve this are listed below.
Button Mapping
<div id="overlays">
<input onclick="showRainOverlay();" type=button value="Rainfall distribution"/>
<input onclick="showTsetseOverlay();" type=button value="Tseste distribution"/>
<input onclick="showCattleOverlay();" type=button value="Cattle distribution"/>
<input onclick="clearOverlays();" type=button value="Clear Overlays"/>
<br/>
<form action="#" name="overlay">
<input name="url" type="text">
<input onclick="showCustomOverlay(this.form);" type="button" value="Custom overlay">
</form>
</div>
Overlay case 1: a fixed overlay
// Shows rain overlay
function showRainOverlay() {
var rainfallLayer = new
google.maps.KmlLayer('http://sites.google.com/site/eaoverlays/home/kenya_rainfall_distribution.kml');
rainfallLayer.setMap(map);
kmlArray.push(rainfallLayer);
}
Overlay case 2: Custom overlay
// Shows Custom overlay
function showCustomOverlay(form) {
var layer = form.url.value;
var customLayer = new google.maps.KmlLayer(layer);
customLayer.setMap(map);
kmlArray.push(customLayer); }
GIS support for emerging infectious diseases in East Africa 73
Figure 3.4: Overlay choices
Custom overlays must be in the form http://www.foo.com/bar.kml . The domain name must
be fully qualified due to the way in which the Google Maps API processes overlays.
Overlays are first retrieved by the Google Maps Server for pre-processing before the data
is sent back to the calling page for display. As a result, the overlays must be accessible
publicly and referenced through fully qualified domain names or public i.p. addresses. The
overlays used in the application have been placed on a public website to facilitate this. The
firewall configuration of the University network does not allow the Google Maps service
to access the files in the manner required and so this is a workaround to remedy the
situation.
Overlays can also be used in tandem. This is useful to compare two or more related or
contrasting datasets. There are however, practical limitations in what a user may be
visually able to distinguish when too much information is added to a map. The following
screen captures show a single overlay and the combination of two overlays on the map.
GIS support for emerging infectious diseases in East Africa 74
Figure 3.5: Single overlay
This is the achievement of our second objective: overlay of additional datasets of
information that are relating to the geographical research area. The ability to overlay
allows for visual comparisons and the ability to zoom to high levels means that visual
analyses can be carried out to a detailed level. We move on to implement our third and
final objective: the representation of the AVID dataset within the bounds of a time period.
Time and animation KML elements are not supported in the Google Maps API at this time,
only in the Google earth plug-in as was discussed earlier in this document. Therefore, we
use standard Javascript and other Google Maps API functions to implement an animation
function. The animation function makes use of a global array that holds all the markers on
the map. The SQL query that generates the dataset from which the points are plotted has an
ORDER BY clause on the “VisitDate” field that causes the results and consequently the
markers to be ordered according to when the samples were collected. The animation is
effected by the “Show sequence” button on the mapping page. This button has an onclick
event associated with it that calls the function executePan(). This function first clears all
the markers on the map by iterating through the array and removing them from the map.
This is done by passing a null value to the marker method setMap().
GIS support for emerging infectious diseases in East Africa 75
Figure 3.6: Combined overlays
The function then calls another function, moveTo(), with a Javascript method
panIntervalId(). This method allows the calling of a function repeatedly at a set interval, in
this case 2 seconds. The moveTo() function restores a market to the map each time it is
called and updates a pointer value. Each time the function is called, the pointer will be
checked against the array length before proceeding to make sure the end has not been
reached. If not, a marker will be restored from the array until the end is reached, after
which it calls the Javascript function clearIntervalId() that stops the repetition.
The code snippet containing the two functions is below.
// function iterates through the different points in the array
function moveTo() {
if (last < pointArray.length)
{
pointArray[last].setMap(map);
last++;
}
else // We have reached the end
{
//Reset value of pointer and stop
last = 0;
clearIntervalId(panIntervalId);
}
}
// Panning function
function executePan() {
var pointer = 0;
// Clear map first
while (pointer < pointArray.length){
pointArray[pointer].setMap(null);
pointer++;
}
// Set zoom and call pan function
map.setZoom(7);
panIntervalId = setInterval("moveTo()",2000);
GIS support for emerging infectious diseases in East Africa 76
}
GIS support for emerging infectious diseases in East Africa 77
The effect is to animate the map by restoring the markers in a time sequence according to
when they the samples were collected. Therefore if a search for a pathogen is carried out,
the result set, when mapped in time sequence, will show the detection of the disease in
samples over a period of time. The more accurate the source data, the more accurate the
animation will be. The following screen captures show an animation being executed.
This forms the implementation of the third objective. Putting it all together we are able
present a typical use case.
GIS support for emerging infectious diseases in East Africa 78
Figure 3.7a: Clear map Figure 3.7b: Animation begins
Figure 3.7c: Animation progressing
3.2 Typical use case
Before we begin, the application must be installed. Installation instructions are contained in
Appendix D. The application provides user access control via a login page requiring a
username and password. The default username and password pair consists of “John” and
“1234”.
The user access mechanism was maintained from the previous application. Correct user
credentials allow us access to the search form.
Figure 3.9 shows a populated search form with dates selected using the calendar control
and a pathogen selected from the drop down list. Clicking the “Go” button submits the
form. The script executes and returns the results. This is shown in figure 3.10 below.
GIS support for emerging infectious diseases in East Africa 79
Figure 3.8: Login screen
Figure 3.9: Populated search form
Mapping the result set produces a map with the 43 markers. Each marker can be clicked
and the information window that pops up displays the sample id, the location and the
organism associated with the sample. The sample id is hyperlinked to a page that displays
the storage information for that sample. Figures 4.11a and 4.11b show the map, with the
information window clicked, and the details page respectively.
This concludes our typical use case and our implementation.
GIS support for emerging infectious diseases in East Africa 80
Figure 3.10: Results
Figure 3.11a: Marker clicked
Figure 3.11b: Sample storage details
Chapter 4 Conclusion
4.1 Review
This project set out to establish a GIS component that would make use of the spatial data
collected in the AVID project samples. Three objectives were identified as follows:
1. Visual representation of sample collection points within the geographical research
area and by extension incidences of any diseases detected.
2. Overlay of additional datasets of information that are relating to the geographical
research area as may be made available, such as weather conditions or livestock
population densities.
3. Representation of the AVID dataset within the bounds of a time period. In order to
represent events occurring over a timespan of selected weeks or months it should
be possible represent the incidences in an animated form showing the occurrence
of disease over the map with time.
These three objectives were achieved with the following levels of success. Objective 1 was
achieved fully with the sample collection locations plotted on the map. Custom icons were
used to differentiate between organisms and additional data relating to the samples
displayed in the information window of the markers.
Objective 2 was achieved fully with the ability to overlay both fixed (hard coded) and
custom (dynamic) overlays implemented. Three overlays were prepared and coded into the
application.
Objective 3 was partly achieved. The animation of the occurrence of disease was
implemented but without indication of any time scale. This was due to the limitation
inherent in the Google Maps API.
GIS support for emerging infectious diseases in East Africa 81
4.2 Challenges
Several challenges were encountered during the design and execution of the project.
1. Non-uniform identifiers for samples. Discrepancies in the sample identifiers for
samples from human sources and all other samples resulted in the data relating to
the those samples being excluded from the dataset during data preparation.
2. Degraded spatial data. Non-disclosure and confidentiality concerns resulted in a
degradation of spatial data by the use of random offsets by AVID before the data
was provided. This caused the locations plotted on the map to appear in illogical
areas such as several miles off the Kenyan coast in the Indian Ocean.
3. Shapefile conversion. The files used to generate the overlays for the application
were in the Shapefile format. The conversion process was not ideal as it was
performed by a third party tool. Colour information as well as shape definition in
some instances suffered.
4. Availability of up to date overlay datasets. Up to date demographic datasets as well
as those relating to wildlife proved difficult to acquire within the time allocated to
the project. Most of the datasets were over a decade old and may not be an accurate
reflection of the current state of the various environments.
5. The Google Maps API was unable to process large numbers of markers. This
restriction placed a limitation on the size of the result set that could be mapped at
any given time.
6. The time data available only represents the sample collection data and time and not
the date of infection. This means that there is always a slight error inherent the
detection of disease occurrence as the time data is not corrected for the phase of the
infection detected.
GIS support for emerging infectious diseases in East Africa 82
These challenges represent real world constraints that would need to be overcome to refine
the application before integration into a wider information management system. The
measures required to overcome them require more time to explore than was available for
his project and that in itself forms the overriding challenge encountered.
4.3 Recommendations
Based on the challenges encountered, the following recommendations are put forward:
1. Sample identifiers for all samples should be harmonized into a single system so
that data from all the samples can be included in the querying.
2. Spatial data will need to be provided without degradation in order to plot markers
that lie within the bounds of the land masses where sampling is taking place.
3. Shapefile conversion should be performed from within the application that
generated them, This will result in high quality KML files that accurately reflect the
original files.
4. Where available, up to date GIS data should always be used for the overlay
datasets. This will give accurate comparisons for trend analyses. In particular,
environmental factors that affect disease prevalence should be matched up with the
time bounds that are being queried to give an accurate picture of any correlation.
5. The Google Maps API support team should be contacted to provide a means to ease
this restriction and allow for the mapping of large result sets.
These recommendations are a minimal set, designed to improve the quality of application
and are by no means exhaustive. Rather, the application would benefit greatly from
integration with a wider information system in order for maximum utility to be realised.
Thus a wider context for recommendations would be available in which this application
would be viewed as a module.
GIS support for emerging infectious diseases in East Africa 83
4.4 Future work
In view of the limited time available for this project and the evolving nature of the user
requirements, the following are suggestions for future work.
1. The Google Earth plug-in should be explored as it matures to provide better
animation features.
2. An import function for the AVID data should be designed and export templates
perhaps supplied so that database extracts from the AVID database can be used
directly, saving data preparation time. Alternatively, database views can be
generated on the AVID database to allow the application to work directly off it.
3. Report generation features should be explored to produce portable document format
maps as well as statistics on the AVID data.
4. User authentication and management remains rudimentary and there is no facility
to manage user access easily. This would be an area to develop a more complete
user management facility.
GIS support for emerging infectious diseases in East Africa 84
References
1. MedicineNet.Com “Definition of Emerging infectious disease”.http://www.medterms.com/script/main/art.asp?articlekey=22801 last accessedFriday 13th August 2010.
2. MedicineNet.Com, “Definition of Emerging infectious disease”.http://www.medterms.com/script/main/art.asp?articlekey=22801 last accessedFriday 13th August 2010.
3. Centre for Disease Control Special Pathogens Branch, Rift Valley Fever Questionsand Answers, http://www.cdc.gov/ncidod/dvrd/spb/mnpages/dispages/rvf.htm lastaccessed Friday 13th August 2010.
4. Leggat P., Goldsmid J., 2001. “Zoonosis”, Dictionary of tropical medicine forHealth professionals, Australia: ACTM.
5. World Health Organization, “Zoonoses and public health”, Veterinary public health(VPH), http://www.who.int/zoonoses/vph/en/ last accessed Friday 13th August2010.
6. World Health Organization, “Emerging Zoonoses”, Zoonoses and veterinary publichealth, http://www.who.int/zoonoses/emerging_zoonoses/en/index.html lastaccessed Friday 13th August 2010.
7. World Health Organization, Avian Influenza,http://www.who.int/topics/avian_influenza/en/ last accessed Friday 13th August2010.
8. World Health Organization, Cumulative Number of Confirmed Human Cases ofAvian Influenza A/(H5N1) Reported to WHO,http://www.who.int/csr/disease/avian_influenza/country/cases_table_2010_08_12/en/index.html last accessed Friday 13th August 2010.
9. Mcleod A. et al, 2005. “Severe localised effects of 2003 – 4 outbreaks”, Economicand social impacts of Avian Influenza, FAO.
10. The World Bank, 2006. Table 1.7 Possible economic impacts of flu pandemic,Global Development Finance 2006, Page 37, USA: World Bank.
11. The World Bank, 2006. Table 1.8 A breakdown of economic impacts of a potentialhuman-to-human pandemic , Global Development Finance 2006, Page 38, USA:World Bank.
12. World Health Organization, 2010, “What is the pandemic (H1N1) 2009 virus?” ,Pandemic (H1N1) 2009: frequently asked questions,http://www.who.int/csr/disease/swineflu/frequently_asked_questions/about_disease
GIS support for emerging infectious diseases in East Africa 85
/en/index.html last accessed Friday 13th August 2010.
13. World Health Organization, 2010, “Laboratory-confirmed cases of pandemic(H1N1) 2009 as officially reported to WHO by States Parties to the IHR (2005) asof 1 August 2010” , Pandemic (H1N1) – Update 112,http://www.who.int/csr/don/2010_08_06/en/index.html last accessed Friday 13th
August 2010.
14. AVID, 2009. “Objectives”, An Integrated Response System for EmergingInfectious Diseases in East Africa .
15. Centre for Disease Control Special Pathogens Branch, Rift Valley Fever Questionsand Answers, http://www.cdc.gov/ncidod/dvrd/spb/mnpages/dispages/rvf.htm lastaccessed Friday 13th August 2010.
16. World Health Organization, “Overview”, Rift Valley Fever,http://www.who.int/mediacentre/factsheets/fs207/en/index.html last accessedFriday 13th August 2010.
17. Centre for Disease Control Special Pathogens Branch, Rift Valley Fever Questionsand Answers, http://www.cdc.gov/ncidod/dvrd/spb/mnpages/dispages/rvf.htm lastaccessed Friday 13th August 2010.
18. Food and Agriculture Market Information System, FAMIS, 2010. “Kenya: PoorLivestock Disease Monitoring Confines Herders to Poverty”,http://famis.comesa.int/com/option.com_news/task.viewarticle/sid.360/Itemid.129/pillar.sps/lang.fr/sectionid./ last accessed Friday 13th August 2010.
19. Global Early Warning and Response System for Major Animal Diseases includingZoonoses, 2010, “Objectives of GLEWS”, http://www.glews.net/index.php?option=com_content&view=article&id=50&Itemid=54 last accessed Friday 13th
August 2010.
20. Global Early Warning and Response System for Major Animal Diseases includingZoonoses, 2010, “Project Background”, http://www.glews.net/index.php?option=com_content&view=article&id=49&Itemid=34 last accessed Friday 13th
August 2010.
21. Leggat P., Goldsmid J., 2001. “Arbovirus”, Dictionary of tropical medicine forHealth professionals, Australia: ACTM.
22. Leggat P., Goldsmid J., 2001. “Arthropod”, Dictionary of tropical medicine forHealth professionals, Australia: ACTM.
23. Leggat P., Goldsmid J., 2001. “Vector”, Dictionary of tropical medicine for Healthprofessionals, Australia: ACTM.
24. World Health Organization Scientific Group, 1967. “Criteria for definition of avirus as an Arbovirus”, W.H.O. Technical Report Series no. 369, Page 9. Geneva.
GIS support for emerging infectious diseases in East Africa 86
25. World Health Organization, Rift Valley Fever: Transmission in Humans,http://www.who.int/mediacentre/factsheets/fs207/en/ last accessed Friday 13th
August 2010
26. AVID, 2010. AVID sample data sets, Organisms worksheet.
27. Centre for Disease Control Special Pathogens Branch, Rift Valley Fever Questionsand Answers, http://www.cdc.gov/ncidod/dvrd/spb/mnpages/dispages/rvf.htm lastaccessed Friday 13th August 2010.
28. Harper T. K., 2004. “Outbreaks and History of Infection”, TKH Virology Notes:Rift Valley Fever http://www.tarakharper.com/v_rift.htm#out last accessed Friday13th August 2010.
29. World Health Organization Global Alert and Response,http://www.who.int/csr/don/archive/disease/rift_valley_fever/en/ last accessedFriday 13th August 2010
30. Centre for Disease Control Special Pathogens Branch, Rift Valley Fever Questionsand Answers, http://www.cdc.gov/ncidod/dvrd/spb/mnpages/dispages/rvf.htm lastaccessed Friday 13th August 2010.
31. "serology". Oxford Dictionaries. April 2010. Oxford Dictionaries. April 2010.Oxford University Press. http://oxforddictionaries.com/definition/serology(accessed August 17, 2010).
32. Enzyme-Linked Immunosorbent Assay (ELISA), Microbial Life, Second Edition.James T. Stanley, Robert P. Gunsalus, Stephen Lory, and Jerome J. Perry.Sunderland, MA: Sinauer Associates, (2007).
33. Linthicum, K., et al. , 1999. Climate and Satellite Indicators to Forecast Rift ValleyFever Epidemics in Kenya, Science 16 Vol. 285, page 397.
34. Low S. P., 2005. “The Impacts of ENSO in Africa”, Climate Change and Africa,Page 221, Cambridge: Cambridge University Press.
35. Linthicum, K., et al. , 1999. Climate and Satellite Indicators to Forecast Rift ValleyFever Epidemics in Kenya , Science 16 Vol. 285, page 398.
36. Ford TE, Colwell RR, Rose JB, Morse SS, Rogers DJ, Yates TL., 2009. “Usingsatellite images of environmental changes to predict infectious disease outbreaks”,Emerging Infectious Diseases, Volume 15, No. 9, Page 1342.
37. Manishika, Jain., 2009. GIS and remote sensing techniques. New Delhi: HimanshuPublications.
38. Wikipedia contributors, "Cartography," Wikipedia, The Free Encyclopaedia,http://en.wikipedia.org/w/index.php?title=Cartography&oldid=360485185(accessed May 12, 2010).
GIS support for emerging infectious diseases in East Africa 87
39. Bixby, R. O., 1996. “The Importance of Undergraduate. Graduate, Technical, andApplied GIS and Remote Sensing Education,” Remote sensing and GIS for sitecharacterization: applications and standards, pp 89 – 92. West Conshohocken, PA:American Society for Testing and Materials.
40. Baumann, Paul R., 2001, History of Remote Sensing, Aerial Photography, Dept. ofGeography, State University of New York, College at Oneonta, Oneonta, NewYork,http://employees.oneonta.edu/baumanpr/geosat2/RSHistory/HistoryRSPart1.htm(accessed May 12, 2010)
41. Easa, S., Chan, Y. & American Society of Civil Engineers, 2000. Urban planningand development applications of GIS, pp 33 – 34. USA: American Society of CivilEngineers.
42. El-Rabbany, A., 2002. “Types of GPS Receivers”, Introduction to GPS: the GlobalPositioning System, pp 16 – 19, Norwood, MA: Artech House, Inc.
43. Kolb, L., 2008, Toys to Tools: Connecting Student Cell Phones to Education, page81, USA: International Society for Technology in Education.
44. Easa, S., Chan, Y. & American Society of Civil Engineers, 2000. “Section II: GISApplications”,Urban planning and development applications of GIS, USA:American Society of Civil Engineers.
45. Netzband, Maik; Stefanov, William L.; Redman, Charles (Eds.), 2007. “Chapter 1 -Remote Sensing as a Tool for Urban Planning and Sustainability ” Applied RemoteSensing for Urban Planning, Governance and Sustainability, pp 1 – 18, Berlin:Springer.
46. Gilbert, E.W., 1958. Pioneer maps and health and disease in England. TheGeographical Journal Vol. 124, No. 2. Blackwell Publishing on behalf of The RoyalGeographical Society (with the Institute of British Geographers)
47. Keithley, C., Renton, F., Echavarria, F. & Cantarero, R., 1994. “Mapping the spatialpatterns of health risks among minority groups in Lincoln, Nebraska”, GIS/LIS(1994), pp 477 - 480. USA: American Congress on Surveying and Mapping,American Society for Photogrammetry and Remote Sensing, AM/FM International,the Association of American Geographers, and the Urban and Regional InformationSystems Association
48. Keithley, C., Renton, F., Echavarria, F. & Cantarero, R., 1994. “Mapping thespatial patterns of health risks among minority groups in Lincoln, Nebraska”,GIS/LIS (1994), page 482. USA: American Congress on Surveying and Mapping,American Society for Photogrammetry and Remote Sensing, AM/FM International,the Association of American Geographers, and the Urban and Regional InformationSystems Association
GIS support for emerging infectious diseases in East Africa 88
49. Keithley, C., Renton, F., Echavarria, F. & Cantarero, R., 1994. “Mapping the spatialpatterns of health risks among minority groups in Lincoln, Nebraska”, GIS/LIS(1994), page 484. USA: American Congress on Surveying and Mapping, AmericanSociety for Photogrammetry and Remote Sensing, AM/FM International, theAssociation of American Geographers, and the Urban and Regional InformationSystems Association
50. Gamma, E. et al, 1995. “Design Patterns in Smalltalk MVC”, Design patterns:elements of resusable object-oriented software. Page 4. USA: Addison-Wesley.
51. Williams H. & Lane D., 2006. “Chapter 1. Database Applications and the Web”,Web Database Applications with PHP, and MySQL, Second Edition, page 4. USA:O'Reilly Media.
52. Infrastructure for Spatial Information in Europe, website, “About INSPIRE”,http://inspire.jrc.ec.europa.eu/index.cfm/pageid/48 , (accessed May 12, 2010).
53. Infrastructure for Spatial Information in Europe, website, “INSPIRE Roadmap”,http://inspire.jrc.ec.europa.eu/index.cfm/pageid/44, (accessed May 12, 2010).
54. Open Source Geospatial Foundation, “OpenLayers: Home”, http://openlayers.org/,(accessed May 12, 2010).
55. Daratech Inc., 2009. GIS/Geospatial Markets & Opportunities report, August 2009,Cambridge, MA: Daratech Incorporated.
56. Google Inc., “Corporate Information: Google milestones”,http://www.google.com/corporate/history.html, (accessed May 12, 2010).
57. Lerdorf R., Tatroe K. & MacIntyre P., 2006. “Chapter 1. Introduction to PHP”,Programming PHP, Second Edition, page 2. USA: O'Reilly Media.
58. Netcraft.com website, “Market Share for Top Servers Across All DomainsAugust 1995 - August 2010”, August 2010 Web Server Survey,http://news.netcraft.com (last accessed August 23, 2010).
59. Udell S., 2009. “Chapter 1. Introduction to the Geoweb”, Beginning Google Mapsmashups with mapplets, KML and GeoRSS: from novice to Professional, page 6.USA: Apress.
60. Google Incorporated, website, “KML – What is KML?”, KML Documentation,http://code.google.com/apis/kml/documentation/whatiskml.html, (last accessedAugust 23, 2010).
61. Environmental Systems Research Institute, 1998, “ESRI Shapefile TechnicalDescription, An ESRI White Paper” , USA , ESRI.
GIS support for emerging infectious diseases in East Africa 89
Appendices
Appendix A: H1N1 Worldwide Incidences
GIS support for emerging infectious diseases in East Africa 90
Appendix B: Global Risk Map for Rift Valley Fever
GIS support for emerging infectious diseases in East Africa 91
Appendix C: WampServer 2.0i Installation Guide
(Source: BulletProof Templates)
Once you have downloaded the latest version of WAMP 2.0, follows these steps to install it
to your local PC:
1. Locate the downloaded set up file and double-click on it. You will be faced with an
alert window warning you not to upgrade from WAMP5 1.x. Click on Yes to
continue
2. The Welcome setup window will load. Click on Next to proceed
GIS support for emerging infectious diseases in East Africa 92
3. On the License Agreement screen select the radio button for I accept the
agreement then click on Next
4. The Select Destination Location screen will load. Change the default location if
you desire then click on Next
5. Now the Select Additional Tasks screen is loaded. Select the checkboxes for any
GIS support for emerging infectious diseases in East Africa 93
icons you want installing then click on Next
6. You will be faced with the Ready to Install screen. Review the settings and use the
Back button to go back and change any of the settings. If the settings are correct,
click on Install to install WAMP 2.0
GIS support for emerging infectious diseases in East Africa 94
7. If you have Mozilla Firefox installed on your PC, you may be faced with the
following window that prompts whether you want FireFox to be your default
browser, so select the appropriate choice
8. The PHP mail parameters screen will load. Review the default settings and
change accordingly then click on Next. The default values can generally be used
when installing WAMP 2.0 to a local PC
9. The final screen to load is the installation completed screen. Click on Finish to
close the window and start WAMP
GIS support for emerging infectious diseases in East Africa 95
10.WAMP 2.0 is started. The WampServer icon is loaded onto the system tray
GIS support for emerging infectious diseases in East Africa 96
Appendix D: Installing the Application
The application is provided in the form of a compressed file named “Avid.zip”. In order to
install the application, the necessary files need to be extracted to an appropriate directory
within the web server root.
The following steps should be followed:
1. Make sure the WampServer software is running by clicking on the WampServer
icon in the system tray.
2. Copy the compressed file to the hard disk of the target computer where the
WampServer software is installed.
3. Double-click on the file uncompress the files and select the target directory as
“c:\wamp\www”.
GIS support for emerging infectious diseases in East Africa 97
4. Open the “c:\wamp\www” directory using Windows Explorer and locate the folder
“avid”. Open it and locate the file “map.sql”. This contains the information that
needs to be imported into the MySQL database. Move the file onto the desktop
from the “c:\wamp\www” directory.
5. Access the phpMyAdmin interface by opening a web browser window and
accessing the location “http://localhost”. This will bring up the WampServer local
home page. Click on the phpMyAdmin link.
6. The default username does not include a password for the MySQL server. This can
be changed by using the MySQL console under the MySQL option in the
WampServer icon. The console accepts text commands and the following should be
executed to change the password; set password=password(“<password>”); ,
where <password> is replaced with the new password.
7. The file, “phpsqlajax_dbinfo.php” should be edited to contain the new password in
the $password variable before running the application. Failure to do this will
prevent the application from running correctly.
8. Create a new database within MySQL using the create database screen and name it
“map”.
GIS support for emerging infectious diseases in East Africa 98
9. Use the MySQL import command to populate the database using the file “map.sql”
that was copied to the desktop.
10. The application can now be run by clicking on the link in the WampServer
homepage or directly by using the URL “http://localhost/avid/”.
GIS support for emerging infectious diseases in East Africa 99
Appendix E: Source Codes
The source code for the main application pages is contained here.
E1: avid_test1.php
<?php include 'login_check.php'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Listing the AVID database</title> <link rel="stylesheet" href="avid.css" type="text/css" />
<script language="JavaScript" src="ts_picker.js">
//Script by Denis Gritcyuk: tspicker@yahoo.com //Submitted to JavaScript Kit (http://javascriptkit.com) //Visit http://javascriptkit.com for this script
</script> </head>
<body bgcolor="white"> <?php include("header.html");?> <?php include("navbar.html");?> <?php // error_reporting(E_ALL); // ini_set('display_errors', true);
include 'phpsqlajax_dbinfo.php';
// Opens a connection to a MySQL server $connection=mysql_connect ($localhost, $username, $password);
// Connect to the MySQL DBMS if (!($connection = @ mysql_connect($localhost, $username, $password))) die("Could not connect");
// Set the active MySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error());
GIS support for emerging infectious diseases in East Africa 100
}
// Show all sample records in a <table> function displayAVIDList($connection, $query, $searchValue) { // Run the query on the DBMS if (!($result = @ mysql_query ($query, $connection))) mysql_error( );
// Find out how many rows are available $rowsFound = @ mysql_num_rows($result);
// If the query has results ... if ($rowsFound > 0) {
// Define $color=1 $color="1";
// ... print out a header echo "<p>Results for $searchValue<br>";
// Map link echo '<p>
<form name="goMap" action="mapthis.php" method="POST"> <input type="hidden" name="filters" value="';
echo rawurlencode($query); echo '"><input type="submit" value="Map this result set">
</form> </p>';
// and start a <table>.
echo '<table width="400" border="0" align="left" cellpadding="2"cellspacing="1">';
//Column titles echo '<tr><td>Sample ID</td><td>Location</td><td>Organism</td></tr>'; while($rows=mysql_fetch_array($result)){
// If $color==1 table row color = #FFC600 if($color==1){ echo "<tr bgcolor='#bfd9ff'> <td>".$rows['SampleID']."</td><td>".$rows['VisitID']."</td><td>".
$rows['type']."</td> </tr>"; // Set $color==2, for switching to other color
GIS support for emerging infectious diseases in East Africa 101
$color="2"; }
// When $color not equal 1, use this table row color else { echo "<tr bgcolor='#e8e8e8'> <td>".$rows['SampleID']."</td><td>".$rows['VisitID']."</td><td>".
$rows['type']."</td> </tr>"; // Set $color back to 1 $color="1"; }
} // end while loop body
// Finish the <table> echo '</table>';
} // end if $rowsFound body else { // Ask user to check selection
echo "<p>No records were found. Please review your search parameters.</p>"; }
// Report how many rows were found echo "$rowsFound records found matching your criteria.</p>"; } // end of function
$scriptName = "avid_test_1.php"; //Assign search value if (!(@$_POST['Value'] == null)||!(@$_POST['Value'] == "")) $searchValue =
@$_POST['Value'];
// Assign time bounds if (!(@$_POST['timestampFrom'] == null)||!(@$_POST['timestampFrom'] == ""))
$fromValue = @$_POST['timestampFrom']; if (!(@$_POST['timestampTo'] == null)||!(@$_POST['timestampTo'] == ""))
$toValue = @$_POST['timestampTo'];
// Assign options for drop down $sql="SELECT id, name FROM pathogens"; $result=mysql_query($sql);
$options="";
while ($row=mysql_fetch_array($result)) {
$id=$row["name"];
GIS support for emerging infectious diseases in East Africa 102
$name=$row["name"]; $options.="<OPTION VALUE=\"$id\">".$name; }
//Assign disease value if (!(@$_POST['pathogens'] == null)||!(@$_POST['pathogens'] == "")) $disease =
@$_POST['pathogens'];
// Create and Display Search form ?> <h2>AVID Sample Collection Results</h2>
<p><form name="Samples" action="<?php $scriptName;?>" method="POST"> <table cellspacing="2" border="1"><tr><TH COLSPAN=2>AVID DatabaseSample Search</TH> </tr>
<tr><td>Enter a search term :<br>(type All to display complete dataset)</td> <td><input type="text" name="Value" value="All" size="10"><br> </td></tr>
<tr><TH COLSPAN=2>Select dates using the calendar icons:</TH> </tr> <tr><td>From: </td><td><input type="Text" name="timestampFrom" value=""
readonly="true"> <a href="javascript:show_calendar('document.Samples.timestampFrom',document.Samples.timestampFrom.value);"><img src="cal.gif" width="16" height="16"border="0" alt="Click Here to Pick up the timestamp"></a></td></tr>
<tr><td>To: </td><td><input type="Text" name="timestampTo" value=""readonly="true"> <a href="javascript:show_calendar('document.Samples.timestampTo',document.Samples.timestampTo.value);"><img src="cal.gif" width="16" height="16"border="0" alt="Click Here to Pick up the timestamp"></a></td></tr>
<tr><td>Please select a pathogen from the list below: <br> <SELECT NAME=pathogens> <OPTION VALUE=0>Choose <?=$options?> </SELECT> </td><td>
<input type="submit" value="Go"></td></tr></table> </form><br></p> <?php // Has the user provided the parameter?
if (empty($searchValue)) { // No, the user hasn't provided a parameter or initial page load
// Do nothing
} // end of if empty($searchValue) body
else
GIS support for emerging infectious diseases in East Africa 103
{ // Start a query ... $query = "Select SampleID,
`VisitID`, `VisitDate`, `Lat`, `Long`, `name` AS 'type'
from `avidresults1`";
// ... then, if the user has specified a search term, // add the searchValue as a WHERE clause ... if ($searchValue != "All") {$query .= " WHERE SampleID Like '$searchValue%'";}
else {$query .= " WHERE 1";}
// ... then, if the user has specified a "From" date term, // add the timestampFrom field as a WHERE clause ... if ($fromValue != "") $query .= " AND VisitDate >= '$fromValue'";
// ... then, if the user has specified a "To" date term, // add the timestampFrom field as a WHERE clause ... if ($toValue != "") $query .= " AND VisitDate <= '$toValue'";
// ... then, if the user has selected a pathogen, // add the selection value as a WHERE clause ... if ($disease != "0") $query .= " AND `$disease` IS TRUE";
// ... and then complete the query. $query .= " ORDER BY VisitDate LIMIT 0, 100";
// run the query and show the results displayAVIDList($connection, $query, $searchValue);
// Close the DBMS connection mysql_close($connection); } // end of else if empty($searchValue) body ?> </body> </html>
GIS support for emerging infectious diseases in East Africa 104
E2: mapthis.php
<?php include 'login_check.php'; ?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <link rel="stylesheet" href="avid.css" type="text/css" /> <title>AVID GIS concept version 1.1</title> <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> <script type="text/javascript"> //<![CDATA[
//Global map variable var map;
//Array that holds overlays var kmlArray = [];
// Array for panning var pointArray = [];
// Panning Control var panIntervalId = 0; var last = 0;
var customIcons = { Sheep: { icon: 'images/symbol_blue_s.png', shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png' }, Goat: { icon: 'images/symbol_red_s.png', shadow: 'http://labs.google.com/ridefinder/images/mm_20_shadow.png' } };
function load() { map = new google.maps.Map(document.getElementById("map"), { center: new google.maps.LatLng(-1.5, 38.12), zoom: 6, mapTypeId: 'terrain' }); var infoWindow = new google.maps.InfoWindow;
// Variable for dynamic querying var postVars = "<?php echo $_POST['filters'];?>;"
GIS support for emerging infectious diseases in East Africa 105
// Change this depending on the name of your PHP file downloadUrl("avid_genxml.php"+"?option="+ postVars, function(data) { var xml = data.responseXML; var markers = xml.documentElement.getElementsByTagName("marker"); for (var i = 0; i < markers.length; i++) { var name = markers[i].getAttribute("name"); var address = markers[i].getAttribute("address"); var type = markers[i].getAttribute("type"); var point = new google.maps.LatLng( parseFloat(markers[i].getAttribute("lat")), parseFloat(markers[i].getAttribute("lng"))); var html = '<b><a href="details.php?sample=' + name + '">' + name +'</a></b><br>' + address + "<br>" + type; var icon = customIcons[type] || {}; var marker = new google.maps.Marker({ map: map, position: point, icon: icon.icon,
shadow: icon.shadow }); bindInfoWindow(marker, map, infoWindow, html);
pointArray.push(marker); } }); }
function bindInfoWindow(marker, map, infoWindow, html) { google.maps.event.addListener(marker, 'click', function() { infoWindow.setContent(html); infoWindow.open(map, marker); }); }
function downloadUrl(url, callback) { var request = window.ActiveXObject ? new ActiveXObject('Microsoft.XMLHTTP') : new XMLHttpRequest;
request.onreadystatechange = function() { if (request.readyState == 4) { request.onreadystatechange = doNothing; callback(request, request.status); } };
request.open('GET', url, true); request.send(null); }
GIS support for emerging infectious diseases in East Africa 106
function doNothing() {}
// Shows rain overlay function showRainOverlay() { var rainfallLayer = newgoogle.maps.KmlLayer('http://sites.google.com/site/eaoverlays/home/kenya_rainfall_distribution.kml'); rainfallLayer.setMap(map);
kmlArray.push(rainfallLayer); }
// Shows tsetse overlay function showTsetseOverlay() { var tsetseLayer = newgoogle.maps.KmlLayer('http://sites.google.com/site/eaoverlays/home/kenya_tsetsedistribn.kml'); tsetseLayer.setMap(map);
kmlArray.push(tsetseLayer); }
// Shows cattle overlay function showCattleOverlay() { var cattleLayer = newgoogle.maps.KmlLayer('http://sites.google.com/site/eaoverlays/home/kenya_cattledensity.kml'); cattleLayer.setMap(map);
kmlArray.push(cattleLayer); }
// Shows Custom overlay function showCustomOverlay(form) {
var layer = form.url.value; var customLayer = new google.maps.KmlLayer(layer);
customLayer.setMap(map); kmlArray.push(customLayer);
}
// Removes the overlays from the map and clears the array function clearOverlays() { if (kmlArray) { for (i in kmlArray) { kmlArray[i].setMap(null); } } kmlArray.length = 0; }
// function iterates through the different points in the array
GIS support for emerging infectious diseases in East Africa 107
function moveTo() { if (last < pointArray.length) {
pointArray[last].setMap(map); last++;
} else // We have reached the end {
//Reset value of pointer and stop last = 0; clearIntervalId(panIntervalId);
} }
// Panning function function executePan() {
var pointer = 0;
// Clear map first while (pointer < pointArray.length){
pointArray[pointer].setMap(null); pointer++;
}
// Set zoom and call pan function map.setZoom(7); panIntervalId = setInterval("moveTo()",2000);
}
//]]> </script> </head>
<body onload="load()"> <?php include("header.html");?> <div id="overlays"> <input onclick="showRainOverlay();" type=button value="Rainfall distribution"/> <input onclick="showTsetseOverlay();" type=button value="Tseste distribution"/> <input onclick="showCattleOverlay();" type=button value="Cattle distribution"/> <input onclick="clearOverlays();" type=button value="Clear Overlays"/> <br/> <form action="#" name="overlay">
<input name="url" type="text"> <input onclick="showCustomOverlay(this.form);" type="button" value="Customoverlay"> </form>
GIS support for emerging infectious diseases in East Africa 108
</div>
<div id="animate"> <input onclick="executePan();" type=button value="Show sequence"/> </div>
<div id="map" style="width: 800px; height: 600px" border="1"></div> </body> </html>
GIS support for emerging infectious diseases in East Africa 109
E3: avid_genxml.php
<?php include 'login_check.php'; require("phpsqlajax_dbinfo.php");
function parseToXML($htmlStr) { $xmlStr=str_replace('<','<',$htmlStr); $xmlStr=str_replace('>','>',$xmlStr); $xmlStr=str_replace('"','"',$xmlStr); $xmlStr=str_replace("'",''',$xmlStr); $xmlStr=str_replace("&",'&',$xmlStr); return $xmlStr; }
// Opens a connection to a MySQL server $connection=mysql_connect ($localhost, $username, $password); if (!$connection) { die('Not connected : ' . mysql_error()); }
// Set the active MySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); }
// Use get value for query $query= rawurldecode($_GET['option']);
// Select the matching rows according to the query $result = mysql_query($query); if (!$result) { die('Invalid query: ' . mysql_error()); }
header("Content-type: text/xml");
// Start XML file, echo parent node echo '<markers>';
// Iterate through the rows, printing XML nodes for each while ($row = @mysql_fetch_assoc($result)){ // ADD TO XML DOCUMENT NODE echo '<marker '; echo 'name="' . parseToXML($row['SampleID']) . '" '; echo 'address="' . parseToXML($row['VisitID']) . '" '; echo 'lat="' . $row['Lat'] . '" '; echo 'lng="' . $row['Long'] . '" ';
GIS support for emerging infectious diseases in East Africa 110
echo 'type="' . $row['type'] . '" '; echo '/>'; }
// End XML file echo '</markers>'; // Close the DBMS connection mysql_close($connection); ?>E4: details.php
<?php include 'login_check.php'; ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>Sample Storage Details</title> <link rel="stylesheet" href="avid.css" type="text/css" /> </head> <?php include("header.html");?> <?php include("navbar.html");?> <body bgcolor="white"> <?php
include 'phpsqlajax_dbinfo.php';
if (!($_GET['sample'] == null)||!($_GET['sample'] == "")){
// Opens a connection to a MySQL server $connection=mysql_connect ($localhost, $username, $password);
// Connect to the MySQL DBMS if (!($connection = @ mysql_connect($localhost, $username, $password))) die("Could not connect");
// Set the active MySQL database $db_selected = mysql_select_db($database, $connection); if (!$db_selected) { die ('Can\'t use db : ' . mysql_error()); } // Start a query ... $searchterm = $_GET['sample'];
$query = "Select `SampleID`, `Origin`, `Animal_ID`, `Sample Type`, `Tray_ID`,`Box_ID`, `Box_Details` from `storage2` where SampleID = \"$searchterm\"";
GIS support for emerging infectious diseases in East Africa 111
// Run the query on the DBMS if (!($result = @ mysql_query ($query, $connection))) mysql_error( );
// Output a heading echo '<h1>Details</h1>'; // and start a <table>. echo '<table width="400" border="1" cellpadding="2" cellspacing="1">'; //Populate it while($rows=mysql_fetch_array($result)){ echo '<tr><TH COLSPAN=2>AVID Sample Storage details</TH> </tr>'; echo '<tr><td>Sample ID</td><td>'.$rows['SampleID'].'</td></tr>'; echo "<tr><td>Project</td><td>".$rows['Origin']."</td></tr>"; echo "<tr><td>Animal ID</td><td>".$rows['Animal_ID']."</td></tr>"; echo "<tr><td>Sample Type</td><td>".$rows['Sample Type']."</td></tr>"; echo "<tr><td>Tray ID</td><td>".$rows['Tray_ID']."</td></tr>"; echo "<tr><td>Box ID</td><td>".$rows['Box_ID']."</td></tr>"; echo "<tr><td>Location in box</td><td>".$rows['Box_Details']."</td></tr>"; }
// Finish the <table> echo '</table>';
// Close the DBMS connection mysql_close($connection);
echo '<p><a href="avid_test_1.php">Click here</a> to perform a new search.</p>'; } else {
// Do nothing echo "<h2>oops ... something went wrong <br> Please check your referring
page.</h2>"; }// end of else
?> </body> </html>
GIS support for emerging infectious diseases in East Africa 112
Recommended