This project is read-only.

Added Spatial Indexing for Shapefile Feature Source

Apr 8, 2011 at 11:48 PM

I just posted some changes to Shapefile Feature Source implementation of IFeatureSource and Shapefile Shape Source implementation of IShapeSource.  These changes give the option to use spatial indexing via the DotSpatial Quadtree.  It increases the memory footprint of the FeatureSource slightly if the option is chosen.  What I'm seeing is about 9MB added when indexing a shapefile with 100,000 shapes.  It only stores the shape index (int32) in the tree which is just about the minimum.  I don't think anyone else is using the IFeatureSource and IShapeSource interfaces, so I doubt anyone is impacted if I messed something up.  But, thought it best to let everyone know what changed.  It took about 5 seconds to build the index for the 100,000 shape file, which would occur in the constructor if the option is chosen.  Didn't have to alter the interfaces any.

Thanks,

Kyle

Apr 9, 2011 at 12:40 AM

Sounds like a good change

- Dan
--------
Daniel P. Ames Ph.D.
Idaho State University Dept. of Geosciences
dan.ames@isu.edu
--------
Sent from my Droid

On Apr 8, 2011 4:48 PM, "kellison" <notifications@codeplex.com> wrote:
> From: kellison
>
> I just posted some changes to Shapefile Feature Source implementation of IFeatureSource and Shapefile Shape Source implementation of IShapeSource. These changes give the option to use spatial indexing via the DotSpatial Quadtree. It increases the memory footprint of the FeatureSource slightly if the option is chosen. What I'm seeing is about 9MB added when indexing a shapefile with 100,000 shapes. It only stores the shape index (int32) in the tree which is just about the minimum. I don't think anyone else is using the IFeatureSource and IShapeSource interfaces, so I doubt anyone is impacted if I messed something up. But, thought it best to let everyone know what changed. It took about 5 seconds to build the index for the 100,000 shape file, which would occur in the constructor if the option is chosen. Didn't have to alter the interfaces any.Thanks,Kyle
>
>