Next Article in Journal
An Object-Based Image Analysis Workflow for Monitoring Shallow-Water Aquatic Vegetation in Multispectral Drone Imagery
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
Article Menu
Issue 8 (August) cover image

Export Article

Open AccessArticle
ISPRS Int. J. Geo-Inf. 2018, 7(8), 293; https://doi.org/10.3390/ijgi7080293

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.
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)
Full-Text   |   PDF [3452 KB, uploaded 24 July 2018]   |  

Abstract

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
Figures

Figure 1

This is an open access article distributed under the Creative Commons Attribution License which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited (CC BY 4.0).
SciFeed

Share & Cite This Article

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.

Related Articles

Article Metrics

Article Access Statistics

1

Comments

[Return to top]
ISPRS Int. J. Geo-Inf. EISSN 2220-9964 Published by MDPI AG, Basel, Switzerland RSS E-Mail Table of Contents Alert
Back to Top