/// <summary> /// Returns true if this linestring is inside the given bounding box. /// </summary> public override bool IsInside(GeoCoordinateBox box) { for (var idx = 0; idx < this.Coordinates.Count - 1; idx++) { if (box.IntersectsPotentially(this.Coordinates[idx], this.Coordinates[idx + 1])) { if (box.Intersects(this.Coordinates[idx], this.Coordinates[idx + 1])) { return(true); } } } return(false); }
public override bool IsInside(GeoCoordinateBox box) { for (int index = 0; index < this.Coordinates.Count - 1; ++index) { if (box.IntersectsPotentially((PointF2D) this.Coordinates[index], (PointF2D) this.Coordinates[index + 1]) && box.Intersects((PointF2D) this.Coordinates[index], (PointF2D) this.Coordinates[index + 1])) return true; } return false; }