Message Boards Message Boards

GROUPS:

Shortest Route to Multiple Unordered Geographic Coordinates?

Posted 2 months ago
404 Views
|
2 Replies
|
0 Total Likes
|

Hello, I am new to the Wolfram and Mathematica programs and am unfamiliar with the Wolfram language, causing me to have trouble trying to figure out how to use a particular feature. Essentially I am trying to figure out how to do what is done in this link: https://www.wolfram.com/mathematica/new-in-10/entity-based-geocomputation/find-the-shortest-route-through-the-worlds-capital.html, but with my own set of geographic coordinates. I looking everywhere trying to figure out how to do this and I even used the code verbatim from this article and couldn't even get the result from that. I am just trying to figure out how to do that.

Attached below is all I have from my most recent attempt at figuring it out, although despite repeated efforts, I have absolutely no idea what I'm doing so I doubt I'm even in the right ballpark.

2 Replies
Posted 2 months ago

Quinn:

Wolfram's Entity Framework is a vast knowledge-base that provides us with computable data on a wide range of topics. However, it does not turn lat/longs into GeoPoints, which is what you need.

Try this out (I also added some missing commas between options):

positions = 
  Map[GeoPosition, {{-15.707663, -47.911551}, {-25.363882, \
-57.717899}, {-34.921971, -56.046862}}];

GeoGraphics[{GeoPath[positions], Red, Point /@ positions}, 
 GeoRange -> "World", GeoCenter -> 40,
 GeoBackground -> "StreetMapNoLabels"]

So, check out GeoPosition[], used above.

Have a great and safe holiday.

Posted 2 months ago

It worked! Thank you so much for the help, Mike, and happy holidays to you too!

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