docs: function(geometry) {
          var intersect = false;
          var type = geometry.CLASS_NAME;
          if(type == "OpenLayers.Geometry.LineString" ||
             type == "OpenLayers.Geometry.LinearRing" ||
             type == "OpenLayers.Geometry.Point") {
              var segs1 = this.getSortedSegments();
              var segs2;
              if(type == "OpenLayers.Geometry.Point") {
                  segs2 = [{
                      x1: geometry.x, y1: geometry.y,
                      x2: geometry.x, y2: geometry.y
                  }];
              } else {
                  segs2 = geometry.getSortedSegments();
              }
              var seg1, seg1x1, seg1x2, seg1y1, seg1y2,
                  seg2, seg2y1, seg2y2;
              // sweep right
              outer: for(var i=0, len=segs1.length; i<len; ++i) {
                  seg1 = segs1[i];
                  seg1x1 = seg1.x1;
                  seg1x2 = seg1.x2;
                  seg1y1 = seg1.y1;
                  seg1y2 = seg1.y2;
                  inner: for(var j=0, jlen=segs2.length; j<jlen; ++j) {
                      seg2 = segs2[j];
                      if(seg2.x1 > seg1x2) {
                          // seg1 still left of seg2
                          break;
                      }
                      if(seg2.x2 < seg1x1) {
                          // seg2 still left of seg1
                          continue;
                      }
                      seg2y1 = seg2.y1;
                      seg2y2 = seg2.y2;
                      if(Math.min(seg2y1, seg2y2) > Math.max(seg1y1, seg1y2)) {
                          // seg2 above seg1
                          continue;
                      }
                      if(Math.max(seg2y1, seg2y2) < Math.min(seg1y1, seg1y2)) {
                          // seg2 below seg1
                          continue;
                      }
                      if(OpenLayers.Geometry.segmentsIntersect(seg1, seg2)) {
                          intersect = true;
                          break outer;
                      }
                  }
              }
          } else {
              intersect = geometry.intersects(this);
          }
          return intersect;
      }