I'm trying to create a data provider to FDO
I tried creating one in SharpMap 0.9 as a proof-of-concept with
relative success (it renders the data!) and the interfaces were simple and self explanatory (just implement IProvider).
Now I am trying to do the same thing for 2.0 but I've hit a few stumbling blocks. My questions are:
1) IProvider.Execute() takes an Expression and returns an object, what is this object supposed to be?
2) FDO can support multiple id properties, but the SharpMap interfaces seem to only allow one id property/column. Can SharpMap support multiple id properties/columns?
3) What interfaces do I need to implement for a minimally functioning provider (just IProvider?), what interfaces can I optionally implement for extra features?
4) Are these interfaces stable or are they still subject to change?
Aug 11, 2008 at 10:40 AM
Hi Jackie, you would probably be better implementing IFeatureProvider or IFeatureProvider<TOid>; from these interfaces you will see that ExecuteIntersectionQuery is specialized to return IFeatureDataReader. These are the interfaces
used for rendering. I have done some work with providers for SqlServer2008 and MsSqlSpatial which you can find here http://sharpmapv2aspnet.googlecode.com/svn/trunk/ and may help you
with a starting point.
WRT multiple Id properties i suppose you could create an FDO key class and then implement your class as:
public class FdoProvider<TOid> : IFeatureProvider<TOid> where TOid : FdoKey
other interfaces you may like to implement include IWritableFeatureProvider<TOId> which allows updates and deletes on a datasource.
The interfaces are pretty stable - they haven't changed in quite a long time and if they do change the impact is likely to be minimal...
hth and good luck jd