@@ -0,0 +1,1538 @@
+package au.gov.amsa.geo.adhoc;%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.concurrent.atomic.AtomicInteger;%0Aimport java.util.regex.Pattern;%0A%0Aimport au.gov.amsa.risky.format.BinaryFixes;%0Aimport au.gov.amsa.risky.format.Fix;%0Aimport au.gov.amsa.util.Files;%0Aimport rx.Observable;%0A%0Apublic class VesselsInGbrMain %7B%0A%0A    public static void main(String%5B%5D args) %7B%0A        Pattern pattern = Pattern.compile(%22.*%5C%5C.track%22);%0A        List%3CFile%3E list = new ArrayList%3CFile%3E();%0A        list.addAll(Files.find(new File(%22/media/an/binary-fixes-5-minute/2014%22), pattern));%0A        list.addAll(Files.find(new File(%22/media/an/binary-fixes-5-minute/2015%22), pattern));%0A        list.addAll(Files.find(new File(%22/media/an/binary-fixes-5-minute/2016%22), pattern));%0A        AtomicInteger count = new AtomicInteger();%0A        Observable.from(list) //%0A                .groupBy(f -%3E count.getAndIncrement() %25 Runtime.getRuntime().availableProcessors()) //%0A                .flatMap(files -%3E files.doOnNext(System.out::println) //%0A                        .flatMap(f -%3E BinaryFixes.from(f) //%0A                                .filter(fix -%3E inGbr(fix)) //%0A                                .map(fix -%3E fix.mmsi()) //%0A                                .distinct()))%0A                .distinct() //%0A                .toBlocking() //%0A                .forEach(System.out::println);%0A    %7D%0A%0A    private static boolean inGbr(Fix fix) %7B%0A        return fix.lat() %3E= -27.8 && fix.lat() %3C= -8.4 && fix.lon() %3E= 142 && fix.lon() %3C= 162;%0A    %7D%0A%0A%7D%0A

add VesselsInGbrMain