I'd like to run complexe SQL Queries (ie usins several tables, several operations on the geometries,...). I'm working here with SQL Server by it's the same problem with another database.
I am using things like that
Dim prov As SharpMap.Data.Providers.SqlServer2008 = New SharpMap.Data.Providers.SqlServer2008(conn, nomTable, "geom", "ID" )
prov.DefinitionQuery = "pop>2000"
Dim layWorld As SharpMap.Layers.VectorLayer = New SharpMap.Layers.VectorLayer (AliasTable, prov)
and so on ....
That works well, but I can retreive only the geometry column (ie "geom"). If I want the get anything else (always geometry objects) like a buffer , that doesn't work.
The same thing if I try request like this : Select region.geom.STDifference((Select geom from...
In fact with DefinitionQuery, I can only define a simple WHERE clause and it is not possible to define the SELECT clause.
So is it possible to open table like this with a complex SQL query ?
Or I must open the table as datatable (With a SELECT ... FROM...WHERE...) and get the geometry objects as feature by looping thru the datatable ?
Thanks in advance for your replies.