2
$\begingroup$

I was inspired by this blog post visualising street networks and linking that to urban form. I thought I could whip something similar up in Mathematica using GeoGraphics and EdgeDetect.

Considering my skill level I was pleasantly surprised I could whip something up within a few minutes that got me 90% of the way there using some natural language queries for the city list.

I would need to work on the layout of the table and figure out how to make the images bigger but I'd be happy with this as a bit of homework from a high school student who then went on to compare and contrast.

My question is how to get some better graphics - the EdgeDetect is finding the lables of GeoGraphic and the detected lines are a bit rough.

Any ideas?

GraphicsGrid[Table[{city, EdgeDetect[
GeoGraphics[city, GeoRange -> Quantity[1, "Miles"], ImageSize -> Full]]},
{city, {Auckland, Brisbane, Canberra, Hong Kong}]]
$\endgroup$
1
$\begingroup$

There are other edge-detection algorithms. For example:

GradientFilter[GeoGraphics["Canberra", GeoRange -> Quantity[1,"Miles"],
           ImageSize -> Full], 3]// ImageAdjust

makes it single-edged rather than double-edged. Another option is to binarize before taking the gradient.

GradientFilter[Binarize[GeoGraphics["Canberra", GeoRange -> Quantity[1, "Miles"], 
            ImageSize -> Full]], 1] // ImageAdjust
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.