Skip to content

Commit 20d5a0b

Browse files
petercorkeclaude
andcommitted
docs: the Queensland figure shows the shortest route, alt text for the figures
The figure was drawn from places.json, whose coordinates are in metres while the road distances are in km, so the A* heuristic was far too large and the route it found, 1,759 km via Rockhampton, was not the shortest. The notebook and the snippet use queensland.json, in km: 1,659 km via Roma. The figure is drawn from that, with the axes in km. The README figures have a description as their alternative text. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent a417479 commit 20d5a0b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ This needs Python 3.9 or later. The dependencies, NumPy, Matplotlib and Spatial
5656

5757
### A small example: routing through towns in Queensland
5858

59-
![road network](https://github.com/petercorke/pgraph-python/raw/main/examples/roads.png)
59+
![Map of 20 towns in Queensland as blue circles joined by roads, with the shortest route from Hughenden to Brisbane, 1,659 km via Barcaldine, Blackall, Charleville and Roma, highlighted in red](https://github.com/petercorke/pgraph-python/raw/main/examples/roads.png)
6060

6161
```python
6262
from pgraph import UGraph
@@ -83,7 +83,7 @@ The data file and the complete example are in the notebook [`examples/roads.ipyn
8383

8484
### A bigger example: routing through central London
8585

86-
![route through central London](https://github.com/petercorke/pgraph-python/raw/main/docs/figs/london_route.png)
86+
![Map of central London as a network of grey streets, with two routes between Buckingham Palace and Tower Bridge: a solid blue route of 5,515 m via Big Ben, and a dashed orange route of 5,948 m back through the north of the area, with five landmarks labelled](https://github.com/petercorke/pgraph-python/raw/main/docs/figs/london_route.png)
8787

8888
A directed graph of the road network of central London, taken from [OpenStreetMap](https://www.openstreetmap.org/copyright), and the shortest drive between Buckingham Palace and Tower Bridge, there (solid) and back (dashed). The two routes differ in length, 5,515 m and 5,948 m, because of the one-way streets. The notebook [`examples/london.ipynb`](https://github.com/petercorke/pgraph-python/blob/main/examples/london.ipynb) builds the graph from the map data, keeps the part of it that can be driven around in, and plans with `A*`.
8989

‎examples/roads.png‎

18.4 KB
Loading

0 commit comments

Comments
 (0)