Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

given latitude and longitude points, find edge points and polygon area

from the title you can read that I'm given latitude and longitude points. They are stored in csv file. There are up to 40k rows.

"45.01234","9.12345"
"46.11111","9.12345"
"47.22222","9.98765"
...

My first question how can i find the edge coordinates and after it's done, it rolls into my second question that i need to calculate from these edge points polygon area. Below is the picture how these points could look like and the edge points are connected with blue lines.

coordinates

I searched google and on SO and found these kind of questions: this, this, this and this.

Firstly I would store all the latitude and longitude points into arraylist from csv file. I don't have any good idea how to find the edge points. But after the edge points are found, then one approach to find the polygon area is to divide it into triangles and then compute triangles areas by Heron's formula. The earth is spherical so to compute the area I need to use the advises in the links I gave above.

Are there frameworks for my problem that solve my questions? What are the approaches to do it myself? Of course the code should be memory and CPU efficient.

like image 748
Skyzer Avatar asked Mar 03 '12 16:03

Skyzer


1 Answers

You are looking for the convex hull of your points. This is actally a duplicate question: Draw a convex hull using the given points in java/android

like image 151
Diego Avatar answered Oct 10 '22 02:10

Diego