[geos-devel] isOnLine optimizations

strk at refractions.net strk at refractions.net
Fri Jun 24 07:30:10 EDT 2005


On Fri, Jun 24, 2005 at 11:32:20AM +0200, strk at refractions.net wrote:
> On Fri, Jun 24, 2005 at 11:26:52AM +0200, strk at refractions.net wrote:
> > I've been profiling Union operations.
> > It seems the most time-spending function
> > is Envelope::intersects() called by LineIntersector::computeIntersection()
> > called by CGAlgorithms::isOnLine for every segment of a given
> > CoordinateSequence.
> > 
> > I think we can optimize this in two ways:
> > 
> > 	1) easier, quicker: LineIntersector::hasIntersection(p1, p2, q)
> > 	   so to avoid Z computation and properVar.
> 
> Tried this, time for my example union (20 world countries incremental
> union) goes from 1m6sec to 1m0sec (93%, not much).

Ok, I'm fine with this. Linking postgis against JTS makes the
query run in about 1m30sec.

--strk;



More information about the geos-devel mailing list