This project is read-only.

How to calculate area of a polygon if we have lat long of all points?

Oct 2, 2011 at 10:41 AM

How to calculate area of a polygon if we have lat long of all points?

Nov 5, 2013 at 7:13 PM
did you ever gen an answer? i have the same question.
Nov 10, 2013 at 6:17 AM
Hi, You can not calculate area directly from lat/long.. you have to first convert or project the lat/longt to any projected co-ordinate system and get x , y.. Once x & y received use following function to calculate the area -

Private Function GetArea(ByVal x_y_array As ArrayList) As Single
     Try
        Dim area As Single
        Dim TotalItm As Long = x_y_array .Count
        For i As Integer = 0 To TotalItm - 1
            a = x_y_array .Item(i)
            If i = x_y_array - 1 Then b = x_y_array .Item(0) Else b = x_y_array .Item(i + 1)
            area = area + _
                            (b.X - a.X) * _
                            (b.Y + a.Y) / 2
             Next

        GetArea= area
    Catch ex As Exception
        MsgBox("Error occured, Area calculation failed. " & ex.Message, 0 + 16, "Error")
        GetArea= 0
    Finally

    End Try

End Function