Class MGRSFilter

java.lang.Object
org.opensextant.extractors.xcoord.MGRSFilter
All Implemented Interfaces:
GeocoordMatchFilter

public class MGRSFilter extends 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.
Author:
ubaldino
  • Field Details

    • df

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

      public Date today
      The today.
    • MAX_YEARS_AGO

      public static int MAX_YEARS_AGO
      The max years ago.
    • cal

      public Calendar cal
      The cal.
    • CURRENT_YEAR

      public int CURRENT_YEAR
      The current year.
    • CURRENT_YY

      public int CURRENT_YY
      The current yy.
    • IGNORE_SEQ

      public Set<String> IGNORE_SEQ
      The ignore seq.
  • Constructor Details

    • MGRSFilter

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

    • pass

      public boolean pass(GeocoordMatch m)
      pass a match.
      Specified by:
      pass in interface GeocoordMatchFilter
      Parameters:
      m - the m
      Returns:
      true, if successful
    • 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
      Parameters:
      m - the m
      Returns:
      true, if successful