Porting Visual Studio 2008 C# application to Visual Studio 2013, Windows 8.1 store\phone app (need to include a DB with the application). What DB to use (coding in c#), to replace this code...
private static double GetArea(SurveySegment[] segments)
{
SqlGeometryBuilder builder = new SqlGeometryBuilder();
builder.SetSrid(0); // Don't need an SRID here
builder.BeginGeometry(OpenGisGeometryType.Polygon);
// Walk around the segments
PointF p = new PointF(0, 0);
builder.BeginFigure(p.X, p.Y);
for (int i = 0; i < segments.Length; i++)
{
p += segments[i].FromOrigin;
builder.AddLine(p.X, p.Y);
}
// Polygon's end point must be at the origin
if (p.X != 0 || p.Y != 0)
builder.AddLine(0, 0);
builder.EndFigure();
builder.EndGeometry();
// Return the area in the units used in the segments
return builder.ConstructedGeometry.STArea().Value;
}