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

Quadtree in shapefile.cs

Feb 22, 2007 at 3:25 PM
First Congratulations to the developers on this great product!

I have a hard time digesting the Quadtree used in the GetObjectIDsInView() method, anybody can help me?

Second, I need to render a graph, in algorithm senth, thus this file has two types of geometries, point and line string, anybody did that before?

great thanks
Feb 22, 2007 at 4:41 PM
Edited Feb 22, 2007 at 4:41 PM
The quadtree is a spatial index. In the v0.9 branch it's really an R-Tree, so don't let that confuse you.

A Quadtree is a recursive structure with equal divisions. It's mostly used for raster data.

The R-Tree stores the bounding boxes of the geometries and allows fast searching by intersecting a given bounding box with the R-Tree and seeing if only the intersected bounding boxes of the geometries in the index intersect the given bounding box. This way not all geometries have to be checked for intersection.

As for your second question: all features of the same layer must have the same feature class. This means either they are one geometry type or another, not both. What kind of file do you have?