/** * Update the IM with the contribution for this component. * A component only contributes if it has a labelling for both parent geometries */ protected void computeIM(IntersectionMatrix im) { im.setAtLeastIfValid(label.getLocation(0), label.getLocation(1), 0); } /**
/** * Updates an IM from the label for an edge. * Handles edges from both L and A geometries. */ public static void updateIM(Label label, IntersectionMatrix im) { im.setAtLeastIfValid(label.getLocation(0, Position.ON), label.getLocation(1, Position.ON), 1); if (label.isArea()) { im.setAtLeastIfValid(label.getLocation(0, Position.LEFT), label.getLocation(1, Position.LEFT), 2); im.setAtLeastIfValid(label.getLocation(0, Position.RIGHT), label.getLocation(1, Position.RIGHT), 2); } }