The advances in high computing processing and data storage in last decades together with the development of modern statistical physics theory facilitated the arise of Complex Networks approaches to model large scale systems in which it is possible to find relationships among its elements [watts1998collective, barabasi1999emergence, strogatz2001exploring, albert2002statistical]. This concept has been applied to interdisciplinary studies ranging from Ecology[sole2001complexity, pascual2006ecological], Evolution[wagner2001small, andrade2011detecting, wagner2011genotype], Urban Mobility[Barbosa:2017], Epidemiology[pastor2001epidemic], Computer Sciences [barabasi2000scale], Climatic Sciences [donges2009complex, de2009graph] among others.
Spatial dependency and spatial embedding are basic physical properties of many phenomena modeled by networks. The classical approach to deal with spatial information is to use Georeferenced Information System (GIS) and Geographical Database Management Systems (GDBMS) that easily combine different layers of georeferenced data into information retrieval. Several models have been proposed to describe spatial effects in networks [hayashi2006review, barthelemy2011spatial]. However, there is a gap in the literature about generic frameworks for working with Complex Networks in GIS/GDBMS environments.
The G4G tool
From GIS to graphs - the G4G sofware
In terms of geospatial data, GIS4Graph is able to deal with both shapefiles and OpenStreetMap (OSM) files as input. When dealing with a shapefile, it must be a set of linestrings representing the network to be analyzed. Such data are then inserted into a database with geographic support - using PostgreSQL as the Database Management System and PostGIS as its spatial extension. The connections identification between network segments is efficiently performed by an indexed spatial query based on a function that verifies intersections between geometric features. When it comes to an OSM file representing a street network, a PostgreSQL extension named pgRouting is employed. In both cases, the result is a connection list between nodes.
From graphs to GIS - the GeoCNet software
In order to convert spatial networks to GIS environment we propose the following workflow:
To create a shapefile for the nodes using any GIS software. A point type shapefile for the nodes must be created. The shapefile must have a mandatory column of type integer named id, representing the id’s of the nodes. All the characteristics of the polygons/points will be associated to their respective points as attributes, including the geographic locations of the nodes. The resulting nodes shapefile will be used as an input for the GeoCNet software.
To create an adjacency matrix (0s and 1s) representing the connections between these nodes. The matrix will be used as an input for the GeoCNet software as well.
Then, a line type shapefile representing the edges of the network is given as an output of GeoCNet. The point-type-shapefile and the line-type-shapefile will have topological attributes of nodes and edges respectively.
Here we present how (geo)graphs can be used to identify potential main streets used by most of the transports routes in the city of Lorena/SP. The geodata representing the street network of the city of Lorena/SP were acquired through a request on OpenStreetMap Extended API by specifying the bounding box of the city. It delivers an XML response wrapped in an OSM element that includes basically the description of the ways (polylines that represent linear features such as roads) and their relationships (OSM, 2017). More precisely, each line segment between crossroads is a way, and the relationships between ways are indicated by ‘osm_source’ and ‘osm_target’ fields. For the proposed analysis, it is needed to represent every avenue or street as a single node.
By using the G4G, we can extract the network from the GIS data and then represent the betweenness centrality index for the streets network on a map. A case study for the city of Lorena/SP is shown in Figure 1. The streets for which the betweenness centrality index are higher are the potential main streets used by most of the transport routes in the city.
Mobility - flow
We studied the flow of people between each pair of areas (traffic zones) in a city on a typical day using an Origin-Destination survey for the metropolitan region of Rio de Janeiro/RJ [TTC].
By using the GeoCNet, we can represent urban mobility networks on a map. A case study for the metropolitan region of Rio de Janeiro/Brazil is shown in Figure 2. Each node represents a traffic zone. Each pair of nodes is connected if the flow of people between the traffic zones represented by them is greater than a given threshold value. Nodes colors change according to the number of connections of the nodes. And edges colors change according to the total number of people going from one to the other node. In the figure it is shown that many people move between distant traffic zones (red edges between nodes distant from each other) especially if the destination/origin is a very connected traffic zone (a red node).
Weather radar - correlation
Weather radar is one of the most important equipment for monitoring extreme meteorological events. For this brief case study, a dataset of meteorological time series were obtained by a weather radar (temporal resolution of 10 minutes)111sigma.cptec.inpe.br/radar/.
By using the GeoCNet, we can study rainfall temporal correlation networks. A case study for the mountainous region of Rio de Janeiro/Brazil, near the city Nova Friburgo/Brazil, is shown in Figure 3
. Each node represents a grid point of a weather radar (as an interpolated field of rainfall). Each pair of nodes is connected if the Pearson correlation between the rainfall time series associated to each node is greater than a given threshold value. In the Figure, red dots represent the nodes and the blue lines represent the edges. So it is possible to visualize a community-like structure in the network, guided by the mountains of the region (see the satellite image).
Conclusions and Perspectives
In this paper it was introduced the concept of (geo)graphs: graphs in which the nodes have a known geographical location and the edges have spatial dependence. We also presented two open source softwares GIS4GRAPH (G4G) and GeoCNet, two computational frameworks to facilitate the integration of the (geo)graphs in GIS softwares. Datasets about transportation (streets - OSM), urban mobility (flow of people) and meteorological (time series correlation) networks were used as brief case studies.
Using (geo)graphs, as a concept, and G4G and GeoCNet, as tools, you are able to insert and manipulate graphs into GIS, the most appropriate computational environment to handle geographical data. Then, you are able to easily representing graphs and their properties on maps, composing with different layers and allowing several spatial analysis.
Among the perspectives of this research are the improvement of the web interface for the tool, and more detailed case studies, producing thematic maps for the nodes, edges and properties (topological measurements).
Research was partially supported by grant 454267/2014-2 of the Brazilian National Council for Scientific and Technological Development (CNPq) and by the grant 2015/50122-0 São Paulo Research Foundation (FAPESP) and DFG-IRTG 1740/2. C.N.S was partially supported by a PDJ Postdoctoral grant 23038.000776/2017-54 by the Coordination for the Improvement of Higher Education Personnel (CAPES). The authors sincerely thank Dr. Marcos Quiles, Dr. Elbert Macau and Dr. Tristan Pryer for their kind comments during this study.
Author contributions statement
L.B.L. conceived the concept of (geo)graphs, A.A.S.J., M.R. and J.D.S implemented the main computational tools, A.A.S.J., M.R., J.D.S, O.A.C. and W.S. conducted the experiments, L.B.L. and C.N.S. analyzed the results. All author reviewed the manuscript.