I am trying to calculate an area of ββa polyline similar to the one
string poly = "POLYGON ((637604.918432772 2230520.64934531, 637622.257266129 2230419.44632915, 637279.107128549 2230192.04910755, 636765.470527745 2230179.6468564, 636778.005055813 2229861.77192838, 636529.81646905 2229464.29327025, 635813.486592791 2229523.30345774, 636017.385069448 2229974.32341381, 636267.323659164 2230070.32127916, 637035.026966561 2230404.70764784, 637275.265066307 2230401.13408429, 637604.918432772 2230520.64934531, 637604.918432772 2230520.64934531))"; DbGeometry gm = DbGeometry.FromText(poly, 32637); double area= gm.Area.Value;
I noticed later that the error of the error is that dbgeometry is not valid. I try the code in ms sql 2012, also give me an error, but when I tried it that way
SELECT @gm.MakeValid().STArea()
thats worked in sql my question is to make geometry valid in .net thanks
source share