0

i have Mssql database i'm storing some geometry in database as sqlgeometry i work in mvc4 project with EF5 i have arcs store in the databse i can get it form database as dbgeometry then convert it to sqlgeometry for some reasons i want to get the centerpoint of this arc ? is there is free geometry .net lib to calculate that for me?

the is my sample code that build the arc geometry from 3 point on arc

            SqlGeometryBuilder geomBuil = new SqlGeometryBuilder();

        geomBuil.SetSrid(32637);
        geomBuil.BeginGeometry(OpenGisGeometryType.CircularString);
        geomBuil.BeginFigure(startPoint.X, startPoint.Y);
        geomBuil.AddCircularArc(PointOnArc.X, PointOnArc.Y, endPoint.X, endPoint.Y);
        geomBuil.EndFigure();
        geomBuil.EndGeometry();

        SqlGeometry arc = geomBuil.ConstructedGeometry;
Khalid Omar
  • 2,353
  • 5
  • 35
  • 46

1 Answers1

0

You have 3 points at circle - startPoint, PointOnArc and endPoint. To find circle center, you can use formulae from Circumcircle equations section here.

MBo
  • 77,366
  • 5
  • 53
  • 86
  • I,m asking for free geometry lib that do that ,, I already did it by solving the circle eqs but the solution isn,t accurate may floating point accuracy – Khalid Omar Aug 05 '13 at 17:14