Ejemplo n.º 1
0
/**
 * Updates an IM from the label for an edge.
 * Handles edges from both L and A geometrys.
 */
void
Edge::updateIM(const Label& lbl, IntersectionMatrix& im) 
{
	im.setAtLeastIfValid(lbl.getLocation(0,Position::ON),
	                      lbl.getLocation(1,Position::ON),
	                      1);
	if (lbl.isArea()) {

		im.setAtLeastIfValid(lbl.getLocation(0,Position::LEFT),
		                      lbl.getLocation(1,Position::LEFT),
		                      2);

		im.setAtLeastIfValid(lbl.getLocation(0,Position::RIGHT),
		                      lbl.getLocation(1,Position::RIGHT),
		                      2);
	}
}
Ejemplo n.º 2
0
/**
 * Update the IM with the contribution for this component.
 * A component only contributes if it has a labelling for both parent geometries
 */
void
RelateNode::computeIM(IntersectionMatrix& im)
{
    im.setAtLeastIfValid(label.getLocation(0), label.getLocation(1), 0);
}