New in Wolfram
Mathematica
8: Graph & Network Analysis
◄
previous
|
next
►
Application Areas
Study Urban Road Networks
Combine
WolframAlpha
and image processing functionality in
Mathematica
8 to build and analyze a road network. This shows a neighborhood in a city map.
In[1]:=
X
image = WolframAlpha["Champaign IL", {{"Map:CityData", 1}, "Image"}];
In[2]:=
X
graph = MorphologicalGraph[Binarize[ColorNegate[image]], EdgeStyle -> Gray];
In[3]:=
X
Row[{image, Spacer[20], HighlightGraph[graph, NeighborhoodGraph[graph, 1800, 10], ImageSize -> {256, 278}, VertexSize -> {1800 -> 10}]}]
Out[3]=