Skip to content

walidsamir77/Hex-based-Urban-Network-Comparative-Analytics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hex-based Urban Network Comparative Analytics

This repository provides a reproducible Python workflow for hexagonal spatial aggregation of urban network attributes, designed for applications in urban analytics, walkability modelling, and network-based spatial analysis. The script extracts connected network components, generates a regular hex grid, aggregates multiple network layers into hex cells, and exports clean, publication-ready spatial outputs. The main aim is to compare different urban network models across each other; using their attributes (e.g. centarlity measurments, geometric characteristics)

Methodological Overview

The workflow follows these steps:

  1. Network connectivity extraction o Starting from a seed feature ID, all topologically connected network segments are extracted.

  2. Hexagonal tessellation o A regular hex grid is generated over the spatial extent of the connected network.

  3. Spatial aggregation o Multiple network layers are intersected with the hex grid. o Numeric attributes are aggregated per hex cell using:

     Mean

     Maximum

  4. Post-processing o Full hex grid with statistics o Cleaned hex grid excluding cells with NULL values

Input Data

The script expects GeoPackage (GPKG) inputs:

•	M1 — Primary urban network layer
	
•	M2 — Secondary network layer

Each layer must:

• Contain valid geometries

• Use or be reprojectable to EPSG:6312

• Have numeric attributes suitable for aggregation

Output Data

The script generates a single GeoPackage containing two layers:

1.	Full hex grid
	
  o	All hex cells
		
  o	Aggregated statistics (mean + max)
		
2.	Cleaned hex grid
	
  o	Hex cells with no NULL values across aggregated attributes

Configuration Parameters

Key parameters are defined at the top of hex_grid_analysis.py:

•	START_FEATURE_ID — Seed network segment ID
	
•	HEX_SIZE — Hexagon radius (map units)
	
•	TARGET_EPSG — Target CRS
	
•	Input/output file paths and layer names

These can be easily adapted for other cities or scales.

License

This project is released under the MIT License.

Citation

If you use this code in academic work, cite as:

Abdeldayem, W., Geddes, I., Eldesoky, A. H., Stavroulaki, I., Simons, G., Berghauser Pont, M., & Charalambous, N. (2025). Automated versus Hybrid Street Network Modelling for Centrality and Accessibility Analysis. Zenodo. https://doi.org/10.5281/zenodo.16609014

About

Hex-based spatial aggregation of urban network segments using GeoPandas to compare models

Topics

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages