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

How to execute selections by attributes

Topics: Data Access, SharpMap v0.9 / v1.x
Jul 7, 2009 at 2:08 PM

Hi everyone, are there any methods can be used to select some features by their specific attributes values in SharpMap v0.9? E.g. I want to find all the road links whose func_class equals to 3, and create a new layer of these selected features.

Actually, I have implemented this function with the help of SharpMap.Data.Providers.ShapeFile.FilterMethod. However, the query execution process is toooooo slow...

Any suggestions or comments are welcome.

Thanks a lot!

Jul 7, 2009 at 2:35 PM

Hi rib06, ShapeFile.Filter is the only way of limiting by attributes on the 0.9 shapefile, some of the DB providers also have a DefinitionQuery property where you can put filter clauses.. hth jd

Jul 7, 2009 at 3:01 PM

Hi johndiss, thank you so much for your rapid reply! So how do you think of the slowness of the query process? Is it caused by the lack of index?

Will this function be provided in v2.0?

Jul 7, 2009 at 3:11 PM

Hi rib06, it is due to a lack of index. It may eventually be provided in v2 though my interests/needs are more db related (but general performance is high priority) ;)

Jul 8, 2009 at 8:40 AM

Hi johndiss, thank you so much again for your information.

I'm looking forward to the v2 of SharpMap