Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.5K Views
|
2 Replies
|
1 Total Like
View groups...
Share
Share this post:

Working out the boundary length of mid-size geographical regions

Posted 11 years ago
POSTED BY: r williams
2 Replies
Posted 11 years ago

I will suggest this, thank you.

I have no idea how to use Mathematica, so I'll place faith into the accuracy of your answer and thank you heartily.

POSTED BY: r williams

This would be a great addition to Wolfram|Alpha's dataset. You may want to consider suggesting it in Wolfram|Alpha's feedback form at the bottom of the search results page.

If Wolfram|Alpha doesn't give the solution, you may need to use Mathematica and write out some calculations. This is how I would do that.

(* Get a geographic polygon of Hunan Provence*)
poly = AdministrativeDivisionData[Entity["AdministrativeDivision", {"Hunan", "China"}], "Polygon"]

(*Break the points of the border polygon into pairs*)
Partition[#, 2, 1] &@poly[[1, 1, 1]]

(*Calculate the GeoDistance between the pairs*)
Apply[GeoDistance, #] & /@ Partition[#, 2, 1] &@poly[[1, 1, 1]]]

(*Add then all together with Total*)
Total[
 Apply[GeoDistance, #] & /@ Partition[#, 2, 1] &@poly[[1, 1, 1]]
 ]

The result I get from this is that border is roughly 1909.72 Miles long.

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