Introduction
The pandemic spread of some viruses depends on the spreading characteristics specific to the disease, the number and structure of the population, its dynamics, the existence of infection furnaces and/or risk factors (ex. animal farms or crowded people places with a high degree of insalubrities), the capacity of isolation for the infested area, the capacity to combat the disease's effects (the existence of well equipped hospitals in the contaminated area), the climate factors. It can be synthesized the fact that disease's spreading is achieved by three ways: proximity (a percentage of nearby population will get sick in time), by common transportation (primary and secondary service transportation on railway, public roads, with plane or ship) or, regarding diseases transmitted from animals, by their migration [12], [15], [16].
A system dedicated to study the current situation of a pandemic disease, and for a simulation of the pandemic spreading in a region needs a map of this region. For this reason the user needs a graphical interface which helps him to communicate with the system. In this direction we will offer a mapping system that allows him:
To observe all the coloured counties such that by indicating with the mouse the colour of a county to obtain its code. Now, through this code one can find the characteristics of this county (see Fig. 2a);
To dispose of the map of a county with all coloured localities such that by indicating with the mouse the colour of a locality its code may be obtained. Now, through this code one can find the characteristics of this locality (see Fig. 2b);
To access a map of the entire country, with all counties and localities, needed in the simulation of spread of the pandemic. It is useful when the pandemic extends over the border of a county (see Fig. 11). The infected localities will be dynamically represented by suitable colours in various moments;
To see some interfaces maps (containing the image of the entire country) with the encoding map superimposed on it (see Figs.1, 5, 6).
Encoding, Representation, and Interpretation of the Maps
The built application must present the results in a natural graphical form on various maps (The counties of Romania, A County with its Localities). For this, an encoding of the mentioned structural elements (Counties and Localities) is needed. Both Counties and Localities will be limited by their borders.
It is difficult to obtain information from a usual geographic map. And for a simplified map, like the one of Fig. 1, it is difficult to represent (codify) and to recognize the corresponding area of a county (or a locality). That is why, in what follows, to make possible the recognition of a county or of a locality from its colour in the map, two modalities for representation are proposed. It is important that for a point (or a county) on the map of Romania indicated by a user to obtain the corresponding county (or locality). In this way we may select a concrete county to obtain information about one of its locality. For the selected county we can choose a locality with the same procedure.
It is possible to represent a colour by three coordinates (natural numbers) which are the quantities of the basic colours, for example red, green and blue (Red, Green, Blue), i.e. in the RGB space, or the complementary one (Cyan, Yellow, Magenta). Using eight bits to represent each coordinates (the value of the components red, green and blue) a colours space with values from the field [0..255]3 will be obtained (224 distinct values are in this field, therefore over 16 millions of nuances).
In encodings of the colours in the representation of counties and localities, we will take in account the followings:
The codes must be unique (different for each county and for each locality of the same county);
The colours must be similar, such that the eye cannot differentiate the nuances (in the images corresponding to the posted maps).
A morphological encoding is proposed for the counties encoding. The encoding is done by regions (geographical areas, as in the map of Fig. 2a), which allows us to identify the elements of this region. Certainly, the codes are different and correspond to the basic colours of the region.
The representation colour Cr on the map is:
{\rm Cr} =White-({\rm r},{\rm g},{\rm b}),
\eqno {\hbox{(1)}}
Therefore, for a county with the code (r,g,b) the components (R,G,B) of the colours for drawing on the screen will be computed as follows:
{\rm R}=255-{\rm r};\ {\rm G}=255-{\rm g};\ {\rm B}=255-{\rm b};
\eqno {\hbox{(2)}}
Since the values of the code components are small, it seems that all counties are drawn in white, but in reality there are small differences of different nuances.
Conversely, at usage, for a colour of a pixel Cr(R,G,B) one can determine the code of the county by formula:
({\rm r},{\rm g},{\rm b}) =White-({\rm R},{\rm G},{\rm B})
\eqno {\hbox{(3)}}
We must add that the borders must be represented through a colour 'far a way” White (i.e. far a way from (255,255,255)). For example Blue(0,0,255), and the area outside the country with any code different of those used inside the map.
If we wish the counties to be coloured by some “important colours” (Red, Yellow, Green,…) to represent, for example, the risk level, then the above formulas must be modified (generalized) through the distances to the closest “important colours” (instead of White, we can use Red, Yellow, Green,…), as is described in the next encoding (for localities).
If on the map there are some unwished points or small lines from the encoding point of view, they may be eliminated by modifying the colour of the point c_{i,j }= \cases{
x_{(n+1)/2} &$for\ any\ odd\ n$\cr\ \cr
(x_{n/2}+x_{n/2+1})/2 &$for\ any\ even\ n$
}\eqno {\hbox{(4)}}
For the encoding the colours of localities we propose an encoding depending on the order number of a locality of a county.
The risk codes and the associated “important” colours are given in the Table I.
Risk codes | Colour | r | g | b |
---|---|---|---|---|
0 | White | 255 | 255 | 255 |
1 | Green | 0 | 128 | 0 |
2 | Lime | 0 | 255 | 0 |
3 | Navy | 0 | 0 | 128 |
4 | Yellow | 255 | 255 | 0 |
5 | Maroon | 128 | 128 | 0 |
6 | Red | 255 | 0 | 0 |
Each locality that has a strictly positive risk level is represented on the map (see the Fig. 3) using the colour:
{\rm Cdes} =\vert {\rm ColRisc}-{\rm NrLoc} \vert,
\eqno {\hbox{(5)}}
{\rm Cdes} =(255,255,0)-(0,1,4)=(255,254,4)
\eqno {\hbox{(6)}}
Conversely, the recognition of a locality knowing the colour of a pixel on the map Cdes(r,g,b) is obtained by the concatenation:
NrLoc =Inv({\rm r})Inv({\rm g})Inv({\rm b})_{6}
\eqno {\hbox{(7)}}
Inv(c)=\cases{
c &${\rm if}\ c<10$\cr
128-c &${\rm if}\ 10\ \leq c\leq 128$\cr
255-c &${\rm if}\ 128\ <c\leq 255$
} \eqno {\hbox{(8)}}
For our example we obtain:
{\rm NrLoc} ={\rm Inv}(255) {\rm Inv}(254) {\rm Inv}(4)_{6}=014_{6}=10.
The application needs some transformations that allow:
Determination of the coordinates of a pixel from the screen (from an image representing a map), if the geographical coordinates are known, (needed to represent the objects, such as localities, on the map);
Determination of the geographical coordinates of a specified object (for example, by mouse), i.e. knowing the coordinates of the specified pixel.
A pixel from the screen may be referred through its position, defined through its coordinates
a) The transforms u, {\rm v}:{\rm R}^{2}\rightarrow {\rm ViewPort}
If we wish to draw a point \cases{u(x)=[(x-a)^{\ast}(u_{2}-u_{1})/(b-a)]+u_{1}\cr \ \cr
v(y)=[(y-d)^{\ast}(v_{2}-v_{1})/(c-d)]+v_{1}}
\eqno {\hbox{(9)}}
b) The inverse transforms u^{-1},v^{-1}: ViewPort\rightarrow {\rm R}^{2}
In what follows we will show how we can determine the real coordinates of a point corresponding to a screen pixel, i.e. the transformation from the screen window to the real window. This transformation is needed if we have a map represented on the screen and we are interested of the geographical coordinates. The screen point is indicated with the mouse. This transform, which may be obtained from the above relations, is given by the formulas:
\cases{u^{-1}(u)=x(u)=(u-u_{1})/(u_{2}-u_{1})^{\ast}(b-a)+a\cr\ \cr
v^{-1}(y)=y(v)=(v-v_{1})/(v_{2}-v_{1})^{\ast}(c-d)+d
}\eqno {\hbox{(10)}}
If the user wishes an interface for the computation of the geographical coordinates (degrees, minutes, seconds), then those two conversions may be done as follows:
from coordinates (coord) given as a real number for degrees (for example for Braşov we have latitude = 25.61° and longitude = 45.66°), the transformation in (degrees, minutes, seconds) is:
\eqalignno{& degrees=[coord];\cr &coord=(coord-degrees)^{\ast}60;\cr &minutes=[coord];\cr &seconds=[(coord-minute)^{\ast}60];} View Source\eqalignno{& degrees=[coord];\cr &coord=(coord-degrees)^{\ast}60;\cr &minutes=[coord];\cr &seconds=[(coord-minute)^{\ast}60];}
conversely, from geographical coordinates given in (degrees, minute, seconds), (for example 25°36'36”, 45°39'36”), in coordinates given in degrees as a real number, the conversion is as follows:
coord=degrees+(minutes+seconds/60)/60; View Sourcecoord=degrees+(minutes+seconds/60)/60;
The Usage of the maps of interface
For giving the possibility to operate on an available map we need the transforms of the type ViewPort from an image to the other as follows:
From the encoding image (Irnag2) in the interface image
(Imag2) X,Y: Imag1 →Imag2)
From the interface image (Imag2) in the codified image
(Imag1) U,V: Imag2 → Imag1
The points which define the windows may be determined finding the extreme points: at vest, east, north, and south respectively.
Determination of neighbour relation
In the simulation and prediction of the evolution of pandemic, the neighbour relation between various geographical points (localities, counties) plays an important role. To determinate the neighbour counties (or localities) we can proceed as follows.
For each county
Similarly, on a map with localities one may determine the neighbour localities.
The approximation of areas
On the same principle (using an algorithm similar to the previous one, or just simultaneously with finding the neighbours), this area of a county or of a locality may be computed (as the sum of areas of zones delimited through points of the network interior to the county or locality (see Fig. 7). Certainly, the scale of the interface map, or at least the distance between two points is needed. A greater density of the network will cause a better approximation of the surface (in the example of Fig. 7 a distance of 10 pixels between two points is used). The computed area is needed to calculate the population density in a given surface (locality, county, …).
Determination of geographical centres
The geographical centres of the counties or of the localities usually do not correspond with their residences. These geographical centres may be easily calculated as the weighted centres \eqalignno{{\rm G}_{\rm i}=&\quad \sum \ {\rm P}_{\rm k}\quad /\ {\rm N}_{\rm i}\cr
&\ \ {\rm P}_{\rm k}\in {\rm Int} ({\rm Jud}_{\rm i})
&{\hbox{(11)}}}
Maps Concatenation (Sticking)
A difficult problem that appears in the map generation for the entire country with all its localities is that of sticking the neighbour counties. The problem is difficult since two neighbour counties are represented by two different images which do not have the same common borders (see Fig. 8). For their concatenation, these images must be transformed (not only a translation, sometimes a rotation and a scaling are needed). More, even after these transformations their common borders are not the same, therefore their sticking is needed.
To solve this problem we propose an algorithm that computes the parameters of the transformations needed for concatenation, then the proper sticking is done by the mediation of the corresponding friendly points (those two points will be replaced by the middle of the segment determined by these points). We consider the left image
The sticking algorithm of those two images consists of:
find the extreme points
and({\rm P}_{1},{\rm Q}_{1}) of those two images, using (by superposing) the country map with its counties (See Fig. 8).({\rm P}_{2},{\rm Q}_{2}) translate
with{\rm I}_{2} such that(\Delta {\rm x}, \Delta {\rm y}) superpose on (coincide with){\rm P}_{2} (Fig. 9a).{\rm p}_{1} rotate the right image
with the angle({\rm I}_{2}) around the point\alpha such that{\rm p}_{1} arrive on the segment{\rm Q}_{2} (Fig. 9b).{\rm P}_{1}{\rm Q}_{1} scale
with{\rm I}_{2} such thatfs={\rm P}_{1}{\rm Q}_{1}/{\rm P}_{2}{\rm Q}_{2} coincide with{\rm Q}_{2} (Fig. 9c).{\rm Q}_{1} determine the new border as the average of those two curves
, andP_{1}Q_{1} respectively (modified by translation, rotation and scaling) (Fig. 9d).P_{2}Q_{2}
The result of gluing those two images of Fig. 8 may be seen in Fig. 12.
If this algorithm is successively applied starting from a county and adding one neighbour county, it is possible to obtain a bad image of the entire country. This happens due to propagation of the computations errors. The result of these operations is much better if the points
The Simulation of thePandemic Evolution
Simulation is a very important method for solving many real problems [2], [3], [6], [8], [10], [14], [20],[28]. It is possible to model and study the pandemic influenza in a given territory [1], [13], [16], [24]. A system to build the map of actual situation of pandemic is described here.
For storing and processing the information, an oriented graph G=(V,A) will be used [5], [7], [11], [18], [20], [27]. Here V (the set of vertexes) represents the locations (for example, localities) taken in account, and A (the set of arcs of the graph,
At a given moment g_{v}=g_{i}\times p_{i,v} \quad (\forall v\in\Gamma_{j}, \forall t\in {\rm L}_{t})
\eqno {\hbox{(11)}}
If at the moment
This graph will be continuously updated, and the prediction will be done based on the known probabilities. The prediction can be done for some steps using the model presented here. Also, many variants obtained trough the development of many graphs may be studied, and an optimistic variant and a pessimistic variant may be chosen, or a general conclusion may be extracted from all graphs obtained by simulation. The results may be interpreted by the expert doctor, who can conclude on the probable evolution of the virus in the near future.
For the simulation on the map with localities, at two different moments, the risk level will be represented in various nuances (see Fig. 12).
On the same model we can work with other scale (with other level), when a vertex represents a locality and this may be represented by a graph of the same type, the nodes of the last one representing streets, districts, economical unities, and so on. At a higher level, from more graphs of this type we can construct a graph of superior order with the vertexes representing counties, countries, etc.
The system is based on the current real data and offers the actual situation of the presence of disease. The simulation allows the generation of many variances of pandemic spreading, and the expert doctor may choose the most suitable one.
The final validation of the system can be done by comparing the predicted system with the real evolution of the disease.
Conclusions andFurther Work
The paper presents some problems concerning the processing of images that contain maps. Some methods of encoding the regions by colours, of building maps and determination of relationship between localities are also presented with the purpose of the simulation of pandemic spreading. The elements presented in this paper will be integrated in a complex system that uses a data base containing information about localities, counties, viruses, and so on.
By the conceived map visualization system a couple of objectives have been regarded:
the visualization of viruses spreading process history which offers the possibility of monitoring the disease from initiation to extinction;
the visualization of some risk scenarios based on furnaces apparition and spreading patterns;
the visualization of areas with potential spreading risk and area that have been artificial immunized (by vaccination) or naturally immunized (due to previous contact with the virus);
the possibility of map tracking for each human establishment in order to facilitate the display of specific data.