Message Boards Message Boards

GROUPS:

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

Posted 4 years ago
6779 Views
|
2 Replies
|
10 Total Likes
|

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?

2 Replies

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.

Attachments:

Wow, this question was un-answered for a long time (4.7 years as of now)... In this year Wolfram Summer School 2021 (which I encourage you to apply for the next year), there was a project by Junyao Chen called "Draw a Character on the Street Map", which I think in essence is what OP is asking. Here is a stab at drawing spelling WOLFRAM on a street map:

enter image description here

Not bad, but if room for improvements is needed here are the full library of the functions and code used (you can download the notebook by scrolling to the bottom and clicking "Make Your Own Copy" button):

https://community.wolfram.com/groups/-/m/t/2314450

For fun demo, an interesting problem is a rotation of the shape on the streets grid, and here is the teaser of the result from the above post -- rotating letter "A":

enter image description here

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract