use of org.openstreetmap.atlas.checks.flag.FlaggedObject in project atlas-checks by osmlab.
the class SignPostCheckTest method primaryLinkTrunkMissingJunctionAndDestinationAtlas.
@Test
public void primaryLinkTrunkMissingJunctionAndDestinationAtlas() {
this.verifier.actual(this.setup.primaryLinkTrunkMissingJunctionAndDestinationAtlas(), CHECK);
this.verifier.verifyExpectedSize(1);
this.verifier.verify(flag -> verify(flag, 2, true, true));
// Verify that we flagged starting node of the ramp (formed by 2 edges)
this.verifier.verify(flag -> {
final FlaggedObject flaggedPoint = flag.getFlaggedObjects().stream().filter(object -> object instanceof FlaggedPoint).findFirst().get();
final Location flaggedLocation = flaggedPoint.getGeometry().iterator().next();
Assert.assertEquals(Location.forString(SignPostCheckTestRule.LINK_1), flaggedLocation);
});
}
use of org.openstreetmap.atlas.checks.flag.FlaggedObject in project atlas-checks by osmlab.
the class SignPostCheckTest method motorwayLinkMotorwayMissingJunctionAndDestinationAtlas.
@Test
public void motorwayLinkMotorwayMissingJunctionAndDestinationAtlas() {
this.verifier.actual(this.setup.motorwayLinkMotorwayMissingJunctionAndDestinationAtlas(), CHECK);
this.verifier.verifyExpectedSize(1);
this.verifier.verify(flag -> verify(flag, 2, true, true));
// Verify that we flagged starting node of the ramp (formed by single edge)
this.verifier.verify(flag -> {
final FlaggedObject flaggedPoint = flag.getFlaggedObjects().stream().filter(object -> object instanceof FlaggedPoint).findFirst().get();
final Location flaggedLocation = flaggedPoint.getGeometry().iterator().next();
Assert.assertEquals(Location.forString(SignPostCheckTestRule.LINK_1), flaggedLocation);
});
}
Aggregations