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

V2 Status and some questions

Topics: SharpMap v2.0
Sep 3, 2008 at 7:56 PM
Edited Sep 3, 2008 at 7:58 PM
Hi All,
After quite a long time (partially because of project overflow in my "day time job", and partially just waiting for the SharpMap 2.0 to get stabilized) I'm trying to continue the work on WpfSharpMapControls.
However, nothing in life's so simple, so here are my question, answers to which will hopefully speedup some kind of intermediate release of WpfSharpMapControls.
  1. A general question: when creating a layer using a Provider, whose responsibility is it to call the provider.Open () ? is it done automatically  the presenter (or even not automatically, but the responsibility is on the presenter?). 
  2. More Specifically how it should be done in the case of ShapeFile provider?
  3. Is the ShapeFile provider (in v2, i.e. the one in the separate assembly) stable enough to start experimenting with it?
The questions mainly arise from the following phenomena:
  1. I wasn't able to use the ShapFile provider, since if I open it (synchronously), after the initialization of the layer connected to it, I got exception stating that there cannot be only one DataReader. If I don't open it, and operation on the map (e.g. zoon) throws "an attempt to ... was made on a closed provider".
  2. Is the Close() method on the provider semantically equivalent to Dispose (as it is recomended in numerous guidelines) or is it not? More specifically is a provider remains in functional state after calling close, and is it legal to call on it open() later? (if yes - then it is not very consistent with dispose behavior).
  3. From what I understand from the code - the providers do call dispose on close, and do keep flag indicating that it is disposed, but this flag is being used quite rarely check in other methods, which means I can call close, and then call other methods on the closed object, without any errors thrown. Is it by design?
These are quite important to me, since my "real-life" test scenarios to the WPF control usually use shp files, and I whold like to switch to the mew GeoAPI interfaces ASAP.