Open dtvasquez opened 1 year ago
Possibly related to an issue I encountered with mgrs-android which uses this repo:
https://github.com/ngageoint/mgrs-android/issues/3
It would appear that the polar regions are not being handled correctly by this library, which is unfortunate
These libraries don't currently support polar regions. PRs are welcome if you would like to take a stab at it.
If this is not a bug (i.e. it is expected behaviour), this behaviour should be documented.
Please fill out as much known and relevant information as possible.
Version Information:
Expected Results:
Create an MGRS object near the Poles. Example: AQE 33377 29769
Using the GEOTrans utility/source code, this value can be parsed as valid MGRS
Observed Results:
MGRS.parse() throws a ParseException
Anytime a valid location near the poles is used, it fails the regex in use
^(\\d{1,2})([C-HJ-NP-X])(?:([A-HJ-NP-Z][A-HJ-NP-V])((\\d{2}){0,5}))?$
Output:
ParseException("Invaliid MGRS")
Steps to Reproduce:
Relevant Code:
Test Files:
Additional Information:
MGRS uses UPS project to cover the poles, where A|B cover the South Pole, and Y|Z cover the North Pole. I didn't see references to ups in the source for this project. Are there plans to add support for the poles?