Class MGRSFilter
java.lang.Object
org.opensextant.extractors.xcoord.MGRSFilter
- All Implemented Interfaces:
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 Summary
Modifier and TypeFieldDescriptionThe cal.int
The current year.int
The current yy.DateFormat used to check for dates that look like MGRS i.e.The ignore seq.static int
The max years ago.The today. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
pass a match.boolean
TODO: Document rules.
-
Field Details
-
df
DateFormat used to check for dates that look like MGRS i.e. ddMMMyyyy -
today
The today. -
MAX_YEARS_AGO
public static int MAX_YEARS_AGOThe max years ago. -
cal
The cal. -
CURRENT_YEAR
public int CURRENT_YEARThe current year. -
CURRENT_YY
public int CURRENT_YYThe current yy. -
IGNORE_SEQ
The ignore seq.
-
-
Constructor Details
-
MGRSFilter
public MGRSFilter()Instantiates a new MGRS filter.
-
-
Method Details
-
pass
pass a match.- Specified by:
pass
in interfaceGeocoordMatchFilter
- Parameters:
m
- the m- Returns:
- true, if successful
-
stop
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 interfaceGeocoordMatchFilter
- Parameters:
m
- the m- Returns:
- true, if successful
-