Accessing a VectorLayer’s data

Topics: SharpMap v0.9 / v1.x
May 10, 2013 at 1:13 PM
Hi,

I was wondering if it’s possible to access the geometry data for a layer so that I can process it in some way? What I want to do is loop through the polygons in a layer and check whether they are contained within other polygons in the same layer, and if so give them a different style.

The datasource for my layer is SqlServer2008, if that makes any difference.

Thanks,

Dylan
Coordinator
May 13, 2013 at 8:24 AM
Create a view in your SqlServer database that yields the information you require and set that as TableName.
Other than that, you can load your data into a FeatureDataTable and then you can add a column and write some evaluation routine to get the value you need.

Hth FObermaier