I'm guessing (D) as this should be atmost N 'point in polygon' checks. David Zwiers Vivid Solutions Inc.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Michaël Michaud Sent: December 14, 2007 11:30 AM To: JTS Topology Suite Development Subject: Re: [jts-devel] Out of these alternatives what performs faster? Not an easy game... My guess is a) is about two times slower than b, c or d b, c and d are about the same difficult to say more without digging deeply into the code, but let's other jts fan try... Another guess is that differences may depends on the data itself ! Michaël Jody Garnett a écrit : > Here is a skill testing question for the jts-devel list. I think all > of the following alternatives perform the same test .. what do you > think would perform faster? > > a) return geometry.disjoint( geometry2 ) || geometry.touches( > geometry2 ) > > b) IntersectionMatrix matrix = geometry.relate( geometry2 ); > return matrix.isDisjoint() || matrix.isTouches(); > > c) return geometry.relate( geometry2, "F********" ) > > d) return !geometry.overlaps( geometry2 ) > > I will write a test harness for this; but the discussion may be > interesting. > Jody > _______________________________________________ > jts-devel mailing list > jts-devel@lists.jump-project.org > http://lists.refractions.net/mailman/listinfo/jts-devel > > _______________________________________________ jts-devel mailing list jts-devel@lists.jump-project.org http://lists.refractions.net/mailman/listinfo/jts-devel _______________________________________________ jts-devel mailing list jts-devel@lists.jump-project.org http://lists.refractions.net/mailman/listinfo/jts-devel