
Show HN: QuadTree model for generating random road networks - am3141
https://github.com/arun1729/road-network
======
willvarfar
Are there really towns and cities that look like the generated maps in the
readme? As a European, the maps look completely alien; but perhaps this looks
like a US city?

~~~
theandrewbailey
Sorta. There are places that are almost completely on a grid, like Salt Lake
City[0]. Even then, there is a dense downtown core, and sparser suburbs with
more organic neighborhood streets further out (if not blocked by mountains),
as opposed to random clusters dense roads that aren't anywhere near each
other. Then there's Pittsburgh[1], whose topography prevents a large grid, and
there are several colliding grids at different orientations, and the suburbs
gave up.

[0]
[https://www.google.com/maps/place/Salt+Lake+City,+UT/@40.737...](https://www.google.com/maps/place/Salt+Lake+City,+UT/@40.7376725,-111.9051077,13.33z/data=!4m5!3m4!1s0x87523d9488d131ed:0x5b53b7a0484d31ca!8m2!3d40.7607808!4d-111.8910313)

[1]
[https://www.google.com/maps/place/Pittsburgh,+PA/@40.4424429...](https://www.google.com/maps/place/Pittsburgh,+PA/@40.4424429,-79.9691014,14.04z/data=!4m5!3m4!1s0x8834f16f48068503:0x8df915a15aa21b34!8m2!3d40.4406248!4d-79.9958864)

------
KineticLensman
> For a given number n of nodes, the squares are randomly divided into four
> quadrants, i.e. add four children to leaf nodes in the QuadTree. Each edge
> of the square forms a road connecting two points.

If I understand this correctly, then the edges of every final quadtree node
are assumed to be roads. As a result, if a given quadtree node isn't
subdivided, its edges form a large square road 'box'. I think this makes the
resultant road grids look artificial, at least for viewers who are used to
twiddly networks that have developed organically over decades/centuries.

