class EventGeometryCheck implements Checker {

    @Override
    public ImportSummary check( ImmutableEvent event, WorkContext ctx )
    {
        IdScheme scheme = ctx.getImportOptions().getIdSchemes().getProgramStageIdScheme();
        ProgramStage programStage = ctx.getProgramStage( scheme, event.getProgramStage() );

        if ( Objects.nonNull( event.getGeometry() )
            && programStageFeatureCompatibleWithEventGeometry( event, programStage ) )
        {
            return new ImportSummary( ImportStatus.ERROR,
                "Geometry (" + event.getGeometry().getGeometryType() + ") does not conform to the feature type ("
                    + programStage.getFeatureType().value() + ") specified for the program stage: "
                    + programStage.getUid() ).setReference( event.getEvent() ).incrementIgnored();
        }

        return success();
    }

}