Message Boards Message Boards

Find a street pattern that fits a specific edge on a map?

GROUPS:

Another crossed post qeustion here.It is very popular from the situation of vote,but I get none response.

I have such funny pictures:

enter image description here

enter image description here

Very interesting,and you can get all sample image by this code:

Uncompress[FromCharacterCode[Flatten[ImageData[Import[#], 
      "Byte"]]]] & /@ {"http://i.stack.imgur.com/YN3L5.png", 
  "http://i.stack.imgur.com/MVnco.png", 
  "http://i.stack.imgur.com/kzwJ5.png", 
  "http://i.stack.imgur.com/Iderf.png"}

Well,since the Mathematica have all of the map data,I think it can do this,too.Suppose I have such picture:

enter image description here

We can get its edge very easily

img = Import["https://i.stack.imgur.com/aEQWP.jpg"];
Binarize[GradientFilter[img, 2], .5]

enter image description here

But how to hightlight it on map like those sample image?

POSTED BY: Yode Japhe
Answer
2 months ago

Cool idea! This may help: I have an extract of Manhattan saved as a graph (vertices are road intersections, path between them are the edges) which you may find useful. Slight caveat; the vertex coordinates have no relation to their intended geo-coordinates but I'm confident that this could be fixed. If interested, the data on each vertex can be extracted from mapDataset.mx and then used to lookup its geocoordinate from nodeData.mx. The method is described in one of my posts on using open streetmap data.

POSTED BY: Benjamin Goodman
Answer
2 months ago

Group Abstract Group Abstract