Local coordinate are arbitrated. To calculate the area of a property, we use local coordinates because there is no distortion. The georeferencing is given in UTM coordinates or even geographic coordinates. But the area of the property can not be determined with UTM coordinates as there is distortion, so you need to convert
In general, it converts to a geocentric system, obtaining geocentric coordinates for the vertices to then calculate the area.
The GeoLocationData class does the conversion of geographical coordinates for local coordinates (autocad wcs) and vice versa, but does not to UTM coordinates
I implemented a code to do this:
<Extension()>
Function TransformToUTM(gd As GeoLocationData, ByVal local As Point3d) As Point3d
Dim geo As Point3d = gd.TransformToLonLatAlt(local)
Dim latd = geo.Y
Dim lngd = geo.X
Dim drad = Math.PI / 180.0
Dim xDoc As New XmlDocument
xDoc.LoadXml(gd.CoordinateSystem)
Dim SemiMajorAxis As Double = CDbl(xDoc.GetElementsByTagName("SemiMajorAxis").Item(0).InnerText)
Dim b As Double = CDbl(xDoc.GetElementsByTagName("SemiMinorAxis").Item(0).InnerText)
Dim k0 = 0.9996
Dim e = Math.Sqrt(1 - (b / SemiMajorAxis) * (b / SemiMajorAxis))
Dim phi = latd * drad
Dim lng = lngd * drad
Dim utmz = 1 + Math.Floor((lngd + 180) / 6)
Dim zcm = 3 + 6 * (utmz - 1) - 180
Dim e0 = e / Math.Sqrt(1 - e * e) 'Called e prime In reference
Dim esq = (1 - (b / SemiMajorAxis) * (b / SemiMajorAxis)) ' e squared For use In expansions
Dim e0sq = e * e / (1 - e * e) ' e0 squared - always even powers
Dim N = SemiMajorAxis / Math.Sqrt(1 - Math.Pow(e * Math.Sin(phi), 2))
Dim T = Math.Pow(Math.Tan(phi), 2)
Dim C = e0sq * Math.Pow(Math.Cos(phi), 2)
Dim A = (lngd - zcm) * drad * Math.Cos(phi)
Dim M0 = 0
Dim M = phi * (1 - esq * (1 / 4 + esq * (3 / 64 + 5 * esq / 256)))
M = M - Math.Sin(2 * phi) * (esq * (3 / 8 + esq * (3 / 32 + 45 * esq / 1024)))
M = M + Math.Sin(4 * phi) * (esq * esq * (15 / 256 + esq * 45 / 1024))
M = M - Math.Sin(6 * phi) * (esq * esq * esq * (35 / 3072))
M = M * SemiMajorAxis 'Arc length along standard meridian
Dim x = k0 * N * A * (1 + A * A * ((1 - T + C) / 6 + A * A * (5 - 18 * T + T * T + 72 * C - 58 * e0sq) / 120)) 'Easting relative To CM
x = x + 500000 'Easting standard
Dim y = k0 * (M - M0 + N * Math.Tan(phi) * (A * A * (1 / 2 + A * A * ((5 - T + 9 * C + 4 * C * C) / 24 + A * A * (61 - 58 * T + T * T + 600 * C - 330 * e0sq) / 720)))) 'Northing from equator
If (y < 0) Then y = 10000000 + y
Return New Point3d(x, y, local.Z)
End Function