Next Article in Journal
An Object-Based Image Analysis Workflow for Monitoring Shallow-Water Aquatic Vegetation in Multispectral Drone Imagery
Next Article in Special Issue
An Analysis of the Evolution, Completeness and Spatial Patterns of OpenStreetMap Building Data in China
Previous Article in Journal
Optimized Location-Allocation of Earthquake Relief Centers Using PSO and ACO, Complemented by GIS, Clustering, and TOPSIS
Previous Article in Special Issue
HidroMap: A New Tool for Irrigation Monitoring and Management Using Free Satellite Imagery
Open AccessArticle

Shp2graph: Tools to Convert a Spatial Network into an Igraph Graph in R

1
School of Remote Sensing and Information Engineering, Wuhan University, 129 Luoyu Road, Wuhan 430079, China
2
State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University, 129 Luoyu Road, Wuhan 430079, China
3
Institute of Aviation Safety, China Academy of Civil Aviation Science and Technology, Beijing 100028, China
4
Sustainable Agricultural Sciences, Rothamsted Research, North Wyke, Okehampton, Devon EX20 2SB, UK
5
National Centre for Geocomputation, Maynooth University, Maynooth, County Kildare, Ireland
*
Authors to whom correspondence should be addressed.
ISPRS Int. J. Geo-Inf. 2018, 7(8), 293; https://doi.org/10.3390/ijgi7080293
Received: 4 June 2018 / Revised: 29 June 2018 / Accepted: 19 July 2018 / Published: 24 July 2018
(This article belongs to the Special Issue Free and Open Source Tools for Geospatial Analysis and Mapping)
In this study, we introduce the R package shp2graph, which provides tools to convert a spatial network into an ‘igraph’ graph of the igraphR package. This conversion greatly empowers a spatial network study, as the vast array of graph analytical tools provided in igraph are then readily available to the network analysis, together with the inherent advantages of being within the R statistical computing environment and its vast array of statistical functions. Through three urban road network case studies, the calculation of road network distances with shp2graph and with igraph is demonstrated through four key stages: (i) confirming the connectivity of a spatial network; (ii) integrating points/locations with a network; (iii) converting a network into a graph; and (iv) calculating network distances (and travel times). Throughout, the required R commands are given to provide a useful tutorial on the use of shp2graph. View Full-Text
Keywords: R software; igraph; graph data model; network distance; network analysis R software; igraph; graph data model; network distance; network analysis
Show Figures

Figure 1

MDPI and ACS Style

Lu, B.; Sun, H.; Harris, P.; Xu, M.; Charlton, M. Shp2graph: Tools to Convert a Spatial Network into an Igraph Graph in R. ISPRS Int. J. Geo-Inf. 2018, 7, 293.

Show more citation formats Show less citations formats
Note that from the first issue of 2016, MDPI journals use article numbers instead of page numbers. See further details here.

Article Access Map by Country/Region

1
Back to TopTop