I have a C# WPF solution that currently uses Microsoft.SqLServer.Types (Geometry). Currently, it does not store anything in the database, but I wish to change that (it is desktop now, I want to add mobile). I do not want to have to connect online to a
database, I am looking to include the database with the app, and so I am looking at SQLite, and I was pointed to SharpMap by someone else.
I take some metes and bounds, draw a polygon, and calculate the acreage, and display it. I need to replace the following SQLGeometry code with the equivalent in SharpMap…
SqlGeometry geom = GetGeometry(segs);
area = geom.STArea().Value;
System.Drawing.Image img = GetImage(geom, "ft");
private static SqlGeometry GetGeometry(SurveySegment segments)
SqlGeometryBuilder builder = new SqlGeometryBuilder();
builder.SetSrid(0); // Don't need an SRID here
// Walk around the segments
PointF p = new PointF(0, 0);
for (int i = 0; i < segments.Length; i++)
p += segments[i].FromOrigin;
// Polygon's end point must be at the origin
if (p.X != 0 || p.Y != 0)
// Return Geometry
PointF ps = new PointF[geom.STNumPoints().Value];
SqlGeometry temp = geom.STPointN(i + 1);
SqlGeometry centroid = geom.STCentroid();
Your “Data provider comparisions”, lists geometrytypes supported = “ALL”, for MSSQL. Where would I find a list of the one to one replacements, for the SQLServer code listed above?
Is there a Visual Studio solution somewhere that can be examined, that shows at least how to get SharpMap set up in the solution? For example, your home page lists four Nuget commands…are they all needed? Is there a working example with SQLite and any SharpMap
Why is 2.0 listed in the choices to post in, if it is obsolete. This is the second time that I am trying to post here, I tried a few days ago, selected 2.0 (not knowing it was obsolete (usually the higher version is the one to use)), and my posting never appeared.
Is this the right tool (SharpMap), that I should be looking at to replace the SQLServer code, or , should I be looking elsewhere?
Does SharpMap with in UWP?