private static boolean multiPointDisjointEnvelope_ ( MultiPoint multipoint_a , Envelope envelope_b , double tolerance , ProgressTracker progress_tracker ) { Envelope2D env_a = new Envelope2D ( ) , env_b = new Envelope2D ( ) ; multipoint_a . queryEnvelope2D ( env_a ) ; envelope_b . queryEnvelope2D ( env_b ) ; if ( envelopeInfContainsEnvelope_ ( env_b , env_a , tolerance ) ) return false ; Envelope2D env_b_inflated = new Envelope2D ( ) ; env_b_inflated . setCoords ( env_b ) ; env_b_inflated . inflate ( tolerance , tolerance ) ; Point2D pt_a = new Point2D ( ) ; for ( int i = 0 ; i < multipoint_a . getPointCount ( ) ; i ++ ) { multipoint_a . getXY ( i , pt_a ) ; if ( ! env_b_inflated . contains ( pt_a ) ) continue ; return false ; } return true ; }
Returns true if multipoint_a is disjoint from envelope_b .