In this paper we introduce a Python package that can generate geospatial networks which we have called PySGN (Python for Synthetic Geospatial Networks). For readers not familiar with geospatial networks, to quote from the online documentation we have put together:
Geospatial networks are a type of network where nodes are associated with specific geographic locations. These networks are used to model and analyze spatial relationships and interactions, such as transportation systems, communication networks, and social interactions within geographic constraints. By incorporating spatial data, geospatial networks provide insights into how location influences connectivity and network dynamics.
PySGN generates synthetic geosocial networks that mimic the spatial relationships observed in real‑world networks as it embeds nodes in geographic coordinate space, modifies connection rules to decay with distance, and allows users to incorporate clustering and preferential attachment while respecting spatial constraints. Online we provide examples of creating Geospatial Erdős-Rényi, Watts-Strogatz & Barabási-Albert Networks along with ways to sample points based on a specified bounding box or specific polygon boundaries (examples of which are shown below).
The package is intended for researchers and practitioners in fields such as urban planning, epidemiology, infrastructure resilience and social science who require robust tools for simulating and analyzing complex geospatial networks. In addition to the paper, we have also made available extensive documentation (along with examples of the various network types) at https://pysgn.readthedocs.io/en/
![]() |
| Examples of Geospatial Erdős-Rényi and Watts-Strogatz Networks. |
![]() |
| Example of Geospatial Barabási-Albert Network based on different ordering strategies for how nodes are added to the network. |
Full Referece:
Wang, B., Crooks, A.T., Anderson, T., and Züfle, A. (2026), PySGN: A Python Package for Constructing Synthetic Geospatial Networks. Journal of Open Source Software, 11(119), 9346, https://doi.org/10.21105/joss.09346 (pdf)















