/// <summary> /// Test the intersection with a shape range. /// </summary> /// <param name="shape">The shape to do intersection calculations with.</param> /// <returns>True, if both intersect.</returns> public bool Intersects(ShapeRange shape) { // Extent check first. If the extents don't intersect, then this doesn't intersect. if (!Extent.Intersects(shape.Extent)) { return(false); } Shape shape0 = new Shape(this); Shape shape1 = new Shape(shape); return(shape0.ToGeometry().Intersects(shape1.ToGeometry())); //switch (FeatureType) //{ // case FeatureType.Polygon: // PolygonShape.Epsilon = Epsilon; // return PolygonShape.Intersects(this, shape); // case FeatureType.Line: // LineShape.Epsilon = Epsilon; // return LineShape.Intersects(this, shape); // case FeatureType.Point: // PointShape.Epsilon = Epsilon; // return PointShape.Intersects(this, shape); // default: return false; //} }
/// <summary> /// Stores the shape into the WKB for storage in a database, overwriting any existing value. /// </summary> public void StoreShape() { this[_featureTable.GeometryColumn] = _shape.ToGeometry(_featureTable.GeometryFactory).AsBinary(); }