using GeoAPI.Geometries;
using GisSharpBlog.NetTopologySuite.GeometriesGraph;
namespace GisSharpBlog.NetTopologySuite.Operation.Relate
{
///
/// A RelateNode is a Node that maintains a list of EdgeStubs
/// for the edges that are incident on it.
///
public class RelateNode : Node
{
///
///
///
///
///
public RelateNode(ICoordinate coord, EdgeEndStar edges) :
base(coord, edges) {}
///
/// Update the IM with the contribution for the EdgeEnds incident on this node.
///
///
public void UpdateIMFromEdges(IntersectionMatrix im)
{
((EdgeEndBundleStar) edges).UpdateIM(im);
}
///
/// Update the IM with the contribution for this component.
/// A component only contributes if it has a labelling for both parent geometries.
///
public override void ComputeIM(IntersectionMatrix im)
{
im.SetAtLeastIfValid(label.GetLocation(0), label.GetLocation(1), Dimensions.Point);
}
}
}