This project has moved and is read-only. For the latest updates, please go here.

MsSqlSpatial provider implemented

Sep 25, 2006 at 8:00 AM
Check out the latest SharpMap check-ins and give it a try, please.

The advantages of this new provider are:
  • Better performance over the PostGIS provider.
  • It has no external dependencies so it could be included in the main release without problem.
  • More power than the old good MsSql provider, since you can exploit the spatial functions provided by MsSqlSpatial using T-SQL expressions. For example:
// Discard all polygons whose area is less than 100000.
datasource.DefinitionQuery = "ST.Area(the_geom) >= 100000";

Also, you can pre-process the geometry to be displayed using a T-SQL expression template. For example, you could simplify those big geometries for better rendering speed.
// Simplify with 100 meters of tolerance.
datasource.GeometryExpression = "ST.Simplify({0}, 100)";
Where "{0}" will be replace by the GeometryColumn property value.

Or you could draw a 20 meters buffer around those little points:
datasource.GeometryExpression = "ST.Buffer({0}, 20)";
Sep 25, 2006 at 12:04 PM
Great work!
Sep 25, 2006 at 10:07 PM
Hi Ricardo.

It's amazing! Your data provider works like a charm.
it perfoms well. Better than the Npgsql based postgis provider.

Keep up your great work!