I'm aware that Ted is working on some super duper IQueryable database connection
for DotSpatial. For those who do not like to wait, here is a simple, read-only
(that can change) implementation.
It is split up in the following projects
Core interfaces and abstract and/or base classes
PostgreSql/PostGis vector provider
SpatiaLite vector provider, x86 native binaries of rc3 and a small sample
SQLite/Spatialite db file.
Npgsql, Mono.Security, SQLite.Net
Other spatial database stores could be done in a similar way.
I think setup is straighforward, extract the zipfile to your root DotSpatial
folder, add projects to your solution file, add references to your DotSpatial
To load the layers of the sample file you need to call:
var slvp = new DotSpatial.Data.Database.SpatiaLiteVectorProvider();
map.Layers.Add(slvp.Open("DataSource=<PathToYourFile>;", "rivers", "PK_UID",
map.Layers.Add(slvp.Open("DataSource=<PathToYourFile>;", "cities", "PK_UID",
As always, comments are welcome, I'm aware that some of the properties must not
be exposed, but it is late...
One questions at last, where to put stuff like this or the