Skip to content

Commit 112fb75

Browse files
committed
v4.23.4 Expose Hillier metric for angular closeness, update plugin homepage
1 parent 1d58d83 commit 112fb75

File tree

4 files changed

+22
-7
lines changed

4 files changed

+22
-7
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cityseer"
3-
version = '4.23.3'
3+
version = '4.23.4'
44
description = "Computational tools for network-based pedestrian-scale urban analysis"
55
readme = "README.md"
66
requires-python = ">=3.10, <3.14" # pending fiona support for 3.14

qgis_plugin/cityseer_qgis/algorithms/centrality.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ def _run_metric_batches(
426426
for i, fid in enumerate(r.node_keys_py):
427427
if fid in results and farness[i] > 0:
428428
val = float(density[i] ** 2 / farness[i])
429-
results[fid][f"cc_hillier_{d}"] = val if math.isfinite(val) else None
429+
hcol = f"cc_hillier_{d}_{col_prefix}" if col_prefix else f"cc_hillier_{d}"
430+
results[fid][hcol] = val if math.isfinite(val) else None
430431
batch_idx += 1
431432
for d, p in sampled_distances:
432433
_d, _p = [d], p
@@ -451,7 +452,8 @@ def _run_metric_batches(
451452
for i, fid in enumerate(r.node_keys_py):
452453
if fid in results and farness[i] > 0:
453454
val = float(density[i] ** 2 / farness[i])
454-
results[fid][f"cc_hillier_{dd}"] = val if math.isfinite(val) else None
455+
hcol = f"cc_hillier_{dd}_{col_prefix}" if col_prefix else f"cc_hillier_{dd}"
456+
results[fid][hcol] = val if math.isfinite(val) else None
455457
batch_idx += 1
456458
step += 1
457459

@@ -490,7 +492,7 @@ def _run_metric_batches(
490492
return {}
491493

492494
if do_simplest:
493-
# Build attr list per category — beta, cycles, hillier are shortest-path-only
495+
# Build attr list per category — beta, cycles are shortest-path-only
494496
simplest_attrs = []
495497
if closeness_simplest:
496498
if do_harmonic:
@@ -514,6 +516,7 @@ def _run_metric_batches(
514516
node_count,
515517
simplest_attrs,
516518
"ang",
519+
derive_hillier=do_hillier and closeness_simplest,
517520
compute_closeness=closeness_simplest,
518521
compute_betweenness=betweenness_simplest,
519522
tolerance=tolerance,

qgis_plugin/cityseer_qgis/algorithms/centrality_widget.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,12 @@
4747
False,
4848
),
4949
("METRIC_FARNESS", "Farness", "Sum of distances to all reachable nodes \u2192 cc_farness_<d>_ang", False),
50+
(
51+
"METRIC_HILLIER",
52+
"Hillier (n\u00b2/farness)",
53+
"Derived closeness variant (density\u00b2 / farness) \u2192 cc_hillier_<d>_ang",
54+
False,
55+
),
5056
]
5157

5258
_BETWEENNESS_METRICS_SHORTEST = [

qgis_plugin/cityseer_qgis/metadata.txt

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name=Cityseer
33
qgisMinimumVersion=3.99
44
description=Urban network centrality analysis using the cityseer library
5-
version=4.23.3
5+
version=4.23.4
66
author=Benchmark Urbanism
77
email=gareth.simons@ucl.ac.uk
88

@@ -11,7 +11,13 @@ about=Cityseer computes localised network centrality metrics (closeness and betw
1111
graph representation where each road segment is a node connected to its neighbours.
1212
Requires the cityseer Python library: pip install cityseer
1313

14-
changelog=4.23.2
14+
changelog=4.23.4
15+
- Expose Hillier metric for angular closeness
16+
17+
4.23.3
18+
- Update plugin homepage URL
19+
20+
4.23.2
1521
- Fix betweenness tolerance: always update shortest distance on improvement
1622
- Default tolerance to 0 (exact shortest paths)
1723

@@ -24,7 +30,7 @@ changelog=4.23.2
2430

2531
tracker=https://github.com/benchmark-urbanism/cityseer-api/issues
2632
repository=https://github.com/benchmark-urbanism/cityseer-api
27-
homepage=https://cityseer.benchmarkurbanism.com
33+
homepage=https://cityseer.benchmarkurbanism.com/plugin
2834

2935
hasProcessingProvider=yes
3036
tags=network centrality,urban analysis,closeness,betweenness,street network,graph

0 commit comments

Comments
 (0)