This project has moved. For the latest updates, please go here.

GetGeometryById(Guid oid) using guid as ID

Topics: SharpMap v0.9 / v1.x, SharpMap v2.0
Nov 4, 2015 at 11:25 AM
Dear devs,
We need to use the function GetGeometryById with uuid /guid. This is not implemented as it seems. How could we do it? I would think I could overwrite the method and implement it somehow. Could you give me any hint where to look?
Nov 4, 2015 at 9:59 PM
Edited Nov 5, 2015 at 8:21 AM
This should actually be doable:
  1. Create a new interface IBaseProvider that contains all elements of IProvider, except for GetObjectIDsInView, GetFeature and GetGeometryByID.
  2. Create a new interface IProvider<TOid> : IBaseProvider, where you insert the methods that are left over from step 1. Don't forget to change oid type to TOid
  3. Refactor IProvider to be IProvider : IProvider<uint> {}
  4. Change DataSource property of VectorLayer, LabelLayer (, HeatLayer) to be IBaseProvider
  5. Create/modify a provider for your datasource
EDIT: we will adopt this enhancement soon.
Nov 6, 2015 at 1:31 PM
Nov 6, 2015 at 2:00 PM

This is very good news - thank you. I will implement it in my Project..

Am 06.11.2015 um 15:31 schrieb FObermaier <[email removed]>:

pre {font-size:1.25em;}