{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,3,29]],"date-time":"2026-03-29T00:47:38Z","timestamp":1774745258276,"version":"3.50.1"},"reference-count":38,"publisher":"MDPI AG","issue":"8","license":[{"start":{"date-parts":[[2018,7,24]],"date-time":"2018-07-24T00:00:00Z","timestamp":1532390400000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100001809","name":"Natural Science Foundation of China","doi-asserted-by":"publisher","award":["NSFC: U1533102"],"award-info":[{"award-number":["NSFC: U1533102"]}],"id":[{"id":"10.13039\/501100001809","id-type":"DOI","asserted-by":"publisher"}]},{"name":"Shenzhen Key Laboratory of Spatial Smart Sensing and Services (Shenzhen University)","award":["open Research Fund Program"],"award-info":[{"award-number":["open Research Fund Program"]}]}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["IJGI"],"abstract":"<jats:p>In this study, we introduce the R package shp2graph, which provides tools to convert a spatial network into an \u2018igraph\u2019 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.<\/jats:p>","DOI":"10.3390\/ijgi7080293","type":"journal-article","created":{"date-parts":[[2018,7,24]],"date-time":"2018-07-24T11:51:38Z","timestamp":1532433098000},"page":"293","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":36,"title":["Shp2graph: Tools to Convert a Spatial Network into an Igraph Graph in R"],"prefix":"10.3390","volume":"7","author":[{"ORCID":"https:\/\/orcid.org\/0000-0001-7847-7560","authenticated-orcid":false,"given":"Binbin","family":"Lu","sequence":"first","affiliation":[{"name":"School of Remote Sensing and Information Engineering, Wuhan University, 129 Luoyu Road, Wuhan 430079, China"},{"name":"State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University, 129 Luoyu Road, Wuhan 430079, China"}]},{"given":"Huabo","family":"Sun","sequence":"additional","affiliation":[{"name":"Institute of Aviation Safety, China Academy of Civil Aviation Science and Technology, Beijing 100028, China"}]},{"given":"Paul","family":"Harris","sequence":"additional","affiliation":[{"name":"Sustainable Agricultural Sciences, Rothamsted Research, North Wyke, Okehampton, Devon EX20 2SB, UK"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-8434-8009","authenticated-orcid":false,"given":"Miaozhong","family":"Xu","sequence":"additional","affiliation":[{"name":"State Key Laboratory of Information Engineering in Surveying, Mapping and Remote Sensing, Wuhan University, 129 Luoyu Road, Wuhan 430079, China"}]},{"given":"Martin","family":"Charlton","sequence":"additional","affiliation":[{"name":"National Centre for Geocomputation, Maynooth University, Maynooth, County Kildare, Ireland"}]}],"member":"1968","published-online":{"date-parts":[[2018,7,24]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1016\/j.physrep.2010.11.002","article-title":"Spatial networks","volume":"499","year":"2011","journal-title":"Phys. Rep."},{"key":"ref_2","unstructured":"Lu, B., and Charlton, M. (2011, January 16\u201318). Convert a Spatial Network to a Graph in R. Proceedings of the R User Conference, Coventry, UK."},{"key":"ref_3","unstructured":"Shashi, S., and Hui, X. (2008). Road maps, digital. Encyclopedia of GIS, Springer."},{"key":"ref_4","doi-asserted-by":"crossref","first-page":"401","DOI":"10.1016\/0098-3004(92)90069-4","article-title":"Geographical data modeling","volume":"18","author":"Goodchild","year":"1992","journal-title":"Comput. Geosci."},{"key":"ref_5","doi-asserted-by":"crossref","first-page":"247","DOI":"10.1140\/epjb\/e2006-00046-8","article-title":"The spatial structure of networks","volume":"49","author":"Gastner","year":"2006","journal-title":"Eur. Phys. J. B Condens. Matter Complex Syst."},{"key":"ref_6","first-page":"42","article-title":"The k\u00f6nigsberg bridges\u2014250 years later","volume":"95","author":"Fowler","year":"1988","journal-title":"Am. Math. Mon."},{"key":"ref_7","unstructured":"Mathis, P. (2007). The space-time variability of road base accessibility: Application to london. Graphs and Networks, ISTE."},{"key":"ref_8","unstructured":"R Core Team (2017). R: A Language and Environment for Statistical Computing, R Foundation for Statistical Computing."},{"key":"ref_9","doi-asserted-by":"crossref","first-page":"660","DOI":"10.1080\/13658816.2013.865739","article-title":"Geographically weighted regression with a non-euclidean distance metric: A case study using hedonic house price data","volume":"28","author":"Lu","year":"2014","journal-title":"Int. J. Geogr. Inf. Sci."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Van Etten, J. (2017). R package gdistance: Distances and routes on geographical grids. J. Stat. Softw., 1.","DOI":"10.18637\/jss.v076.i13"},{"key":"ref_11","first-page":"9","article-title":"Classes and methods for spatial data in R","volume":"5","author":"Pebesma","year":"2005","journal-title":"R News"},{"key":"ref_12","unstructured":"ESRI Corp (2011). Arcgis Desktop: Release 10, Environmental Systems Research Institute."},{"key":"ref_13","unstructured":"GRASS Development Team (2018). Geographic Resources Analysis Support System (Grass GIS) Software, Open Source Geospatial Foundation."},{"key":"ref_14","unstructured":"pgRouting Community (2018, May 05). Pgrouting 2.3. Available online: https:\/\/pgrouting.org\/index.html."},{"key":"ref_15","doi-asserted-by":"crossref","first-page":"126","DOI":"10.1016\/j.compenvurbsys.2017.05.004","article-title":"Osmnx: New methods for acquiring, constructing, analyzing, and visualizing complex street networks","volume":"65","author":"Boeing","year":"2017","journal-title":"Comput. Environ. Urban Syst."},{"key":"ref_16","doi-asserted-by":"crossref","unstructured":"Boeing, G. (2018). A multi-scale analysis of 27,000 urban street networks. Environ. Plan. B Urban Anal. City Sci., in press.","DOI":"10.2139\/ssrn.2943038"},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Hagberg, A., Swart, P., and S Chult, D. (2008, January 19\u201324). Exploring Network Structure, Dynamics, and Function Using NetworkX. Proceedings of the 7th Python in Science Conference, Pasadena, CA, USA.","DOI":"10.25080\/TCWV9851"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"160046","DOI":"10.1038\/sdata.2016.46","article-title":"A protocol to convert spatial polyline data to network formats and applications to world urban road networks","volume":"3","author":"Karduni","year":"2016","journal-title":"Sci. Data"},{"key":"ref_19","unstructured":"Furieri, A. (2018). Spatialite-Tools, SpatiaLite. [2017-03-03 ed.]."},{"key":"ref_20","unstructured":"Jiang, B. (2015). Axwoman 6.3: An Arcgis Extension for Urban Morphological Analysis, University of G\u00e4vle."},{"key":"ref_21","doi-asserted-by":"crossref","first-page":"1","DOI":"10.18637\/jss.v063.i17","article-title":"Gwmodel: An R package for exploring spatial heterogeneity using geographically weighted models","volume":"63","author":"Gollini","year":"2015","journal-title":"J. Stat. Softw."},{"key":"ref_22","doi-asserted-by":"crossref","first-page":"85","DOI":"10.1080\/10095020.2014.917453","article-title":"The gwmodel r package: Further topics for exploring spatial heterogeneity using geographically weighted models","volume":"17","author":"Lu","year":"2014","journal-title":"Geo-Spat. Inf. Sci."},{"key":"ref_23","first-page":"1","article-title":"The igraph software package for complex network research","volume":"1695","author":"Csardi","year":"2006","journal-title":"InterJournal Complex Syst."},{"key":"ref_24","doi-asserted-by":"crossref","first-page":"269","DOI":"10.1007\/BF01386390","article-title":"A note on two problems in connexion with graphs","volume":"1","author":"Dijkstra","year":"1959","journal-title":"Numer. Math."},{"key":"ref_25","doi-asserted-by":"crossref","first-page":"87","DOI":"10.1090\/qam\/102435","article-title":"On a routing problem","volume":"16","author":"Bellman","year":"1958","journal-title":"Q. Appl. Math."},{"key":"ref_26","unstructured":"Ford, L.R. (1956). Network Flow Theory, RAND Corporation."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"1","DOI":"10.1145\/321992.321993","article-title":"Efficient algorithms for shortest paths in sparse networks","volume":"24","author":"Johnson","year":"1977","journal-title":"J. ACM"},{"key":"ref_28","unstructured":"Mathis, P. (2007). Strengths and deficiencies of graphs for network description and modeling. Graphs and Networks, ISTE."},{"key":"ref_29","unstructured":"Peterborough, O. (2006). Ontario Road Network, Ontario Ministry of Natural Resources."},{"key":"ref_30","doi-asserted-by":"crossref","first-page":"575","DOI":"10.1080\/02693799508902058","article-title":"Modelling the network component of geographical information systems","volume":"9","author":"Mainguenaud","year":"1995","journal-title":"Int. J. Geogr. Inf. Syst."},{"key":"ref_31","doi-asserted-by":"crossref","first-page":"157","DOI":"10.1023\/B:GEIN.0000017746.44824.70","article-title":"A structural approach to the model generalization of an urban street network","volume":"8","author":"Jiang","year":"2004","journal-title":"Geoinformatica"},{"key":"ref_32","doi-asserted-by":"crossref","first-page":"3495","DOI":"10.1038\/srep03495","article-title":"The simplicity of planar networks","volume":"3","author":"Viana","year":"2013","journal-title":"Sci. Rep."},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Boeing, G. (arXiv, 2018). Planarity and street network representation in urban form analysis, arXiv.","DOI":"10.31235\/osf.io\/hma8y"},{"key":"ref_34","doi-asserted-by":"crossref","unstructured":"Abdulganiev, I., and Agafonov, A. (2016, January 25\u201326). Automatic Checking of Road Network Models. Proceedings of the CEUR Workshop Proceedings, Moscow, Russia.","DOI":"10.18287\/1613-0073-2016-1638-249-255"},{"key":"ref_35","unstructured":"OpenStreetMap (2014). Estevan Road Network, OpenStreetMap Community."},{"key":"ref_36","unstructured":"Wade, T., and Sommer, S. (2006). A to Z GIS: An Illustrated Dictionary of Geographic Information Systems, ESRI Press."},{"key":"ref_37","unstructured":"Tchoukanski, I. (2018). Et Geotools, ET SpatialTechniques. 11.5."},{"key":"ref_38","doi-asserted-by":"crossref","first-page":"241","DOI":"10.1080\/17549175.2014.909515","article-title":"The metrics of street network connectivity: Their inconsistencies","volume":"8","author":"Knight","year":"2015","journal-title":"J. Urban. Int. Res. Placemarking Urban Sustain."}],"container-title":["ISPRS International Journal of Geo-Information"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2220-9964\/7\/8\/293\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,11]],"date-time":"2025-10-11T15:14:04Z","timestamp":1760195644000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2220-9964\/7\/8\/293"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2018,7,24]]},"references-count":38,"journal-issue":{"issue":"8","published-online":{"date-parts":[[2018,8]]}},"alternative-id":["ijgi7080293"],"URL":"https:\/\/doi.org\/10.3390\/ijgi7080293","relation":{},"ISSN":["2220-9964"],"issn-type":[{"value":"2220-9964","type":"electronic"}],"subject":[],"published":{"date-parts":[[2018,7,24]]}}}