msClipPolygonRect() / msClipPolylineRect()

Frank Warmerdam fwarmerdam at GMAIL.COM
Thu Mar 24 14:06:22 EST 2005


On Thu, 24 Mar 2005 13:44:02 -0500, Daniel Morissette
<dmorissette at dmsolutions.ca> wrote:
> I think the prefiltering based on map extents that you suggest is
> already done by msLayerWhichShapes(), prior to reading shapes from the
> file. Steve should be able to comment on that.

Daniel,

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.

What with being in "optimization" mode, I'm considering all sorts of
crazy ideas. :-)

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent



More information about the mapserver-dev mailing list