Class MGRSFilter

  • All Implemented Interfaces:

    public class MGRSFilter
    extends java.lang.Object
    implements GeocoordMatchFilter
    MGRS Filters include ignoring these patterns:
    • 1234
    • 123456
    • 12345678
    • 1234567890
    • Recent calendar dates of the form ddMMMyyyy, "14DEC1990" (MGRS: 14D EC 19 90
    • Recent calendar dates with time, ddMMHHmm, "14DEC1200" Noon on 14DEC.
    • Field Summary

      Modifier and Type Field Description
      java.util.Calendar cal
      The cal.
      int CURRENT_YEAR
      The current year.
      int CURRENT_YY
      The current yy.
      java.util.List<java.text.DateFormat> df
      DateFormat used to check for dates that look like MGRS i.e.
      java.util.Set<java.lang.String> IGNORE_SEQ
      The ignore seq.
      static int MAX_YEARS_AGO
      The max years ago.
      java.util.Date today
      The today.
    • Constructor Summary

      Constructor Description
      Instantiates a new MGRS filter.
    • Method Summary

      Modifier and Type Method Description
      boolean pass​(GeocoordMatch m)
      pass a match.
      boolean stop​(GeocoordMatch m)
      TODO: Document rules.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • df

        public java.util.List<java.text.DateFormat> df
        DateFormat used to check for dates that look like MGRS i.e. ddMMMyyyy
      • today

        public java.util.Date today
        The today.

        public static int MAX_YEARS_AGO
        The max years ago.
      • cal

        public java.util.Calendar cal
        The cal.

        public int CURRENT_YEAR
        The current year.
      • CURRENT_YY

        public int CURRENT_YY
        The current yy.
      • IGNORE_SEQ

        public java.util.Set<java.lang.String> IGNORE_SEQ
        The ignore seq.
    • Constructor Detail

      • MGRSFilter

        public MGRSFilter()
        Instantiates a new MGRS filter.
    • Method Detail

      • stop

        public boolean stop​(GeocoordMatch m)
        TODO: Document rules. stop a match Note, use of case sensitivity filter is really limited to MGRS. UTM might have the "m" units designation on matches; MGRS typically does not.
        Specified by:
        stop in interface GeocoordMatchFilter
        m - the m
        true, if successful