Class DMSFilter

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

public class DMSFilter extends Object implements GeocoordMatchFilter
DMS Filters include ignoring these patterns: dd-dd-dd HH:MM:ss (where dd-dd-dd HH-MM-ss would be a valid coordinate as the field separators for lat/lon are the same). Assumption: Date fields are separated by / and -; Time fields are separated by : So if you have a lat/lon with a [date] [time] pattern it is most likely not a [lat] [lon] pattern. As of 2012 Fall -- DMS-02 is very open ended pattern and matches parts of dates
Author:
ubaldino
  • Field Details

    • general_formats

      public static final String[] general_formats
      Date patterns to test matches; Avoid coordinate interpretation if date parses.
    • general_dates

      public List<DateFormat> general_dates
  • Constructor Details

    • DMSFilter

      public DMSFilter()
  • Method Details

    • pass

      public boolean pass(GeocoordMatch m)
      pass a match
      Specified by:
      pass in interface GeocoordMatchFilter
      Parameters:
      m - coord match
      Returns:
      true if match is not filtered
    • stop

      public boolean stop(GeocoordMatch m)
      stop a match if it is a bad DMS pattern, e.g., date or date/time.
      Specified by:
      stop in interface GeocoordMatchFilter
      Parameters:
      m - coord match
      Returns:
      true if match is filtered out