msClipPolygonRect() / msClipPolylineRect()

Daniel Morissette dmorissette at DMSOLUTIONS.CA
Thu Mar 24 14:45:29 EST 2005


Frank Warmerdam wrote:
>
> Do you mean in the case where a spatial index exists for the file?  Yes,
> that would be true in that case, but even with spatial indexes you
> might still get a significant number of false positives that could be
> filtered out by after reading the actual shape bounds rather than reading
> the whole feature.  It would also help somewhat for folks who don't
> bother building spatial indexes.  Of course, this sort of optimization
> only reduced CPU work.  The feature would already effectively have
> been paged into RAM by the io subsystem so the "bad" part of the
> cost is already paid.
>

Oh, I forgot about the non-indexed case. I just checked the code in
mapshape.c's msSHPWhichShape() and if no shptree index exsits then it
loops and does a call to msSHPReadBounds() on all shapes.

Daniel
--
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------



More information about the mapserver-dev mailing list