@@ -0,0 +1,899 @@
+package au.gov.amsa.detection;%0A%0Aimport java.io.File;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport au.gov.amsa.risky.format.BinaryFixes;%0Aimport au.gov.amsa.risky.format.BinaryFixesFormat;%0Aimport au.gov.amsa.risky.format.Downsample;%0A%0Apublic class AdHocMain %7B%0A    public static void main(String%5B%5D args) %7B%0A        int count = BinaryFixes%0A                .from(new File(%22/media/an/daily-fixes-5-minute/2014/2014-02-01.fix%22), true,%0A                        BinaryFixesFormat.WITH_MMSI)%0A                .filter(f -%3E f.lon() %3E 108 && f.lon() %3C 157)%0A                .filter(f -%3E f.lat() %3E -46 && f.lat() %3C -9.3)%0A                // group by mmsi in memory%0A                .groupBy(fix -%3E fix.mmsi())%0A                // downsample%0A                .flatMap(g -%3E g.compose(Downsample.minTimeStep(120, TimeUnit.MINUTES))).count()%0A                .toBlocking().single();%0A        System.out.println(count);%0A    %7D%0A%7D%0A

add AdHocMain