Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incorrect MGRS coordinate extracted #81

Closed
byburakyasar opened this issue Jun 7, 2022 · 3 comments
Closed

incorrect MGRS coordinate extracted #81

byburakyasar opened this issue Jun 7, 2022 · 3 comments
Assignees

Comments

@byburakyasar
Copy link

Hello,
In a text that consists of invalid MGRS coordinate Xcoord returns that invalid coordinate in a TextMatch list

For instance
xcoord.extract("37SCA211914648") returns a list consists of GeoCoordMatch object with coord_text=37SCA2119014648

37SCA211914648 is an invalid coordinate but as it turns out that it is extracted incorrectly. Could you please have a look?

Thanks in advance.

@mubaldino mubaldino self-assigned this Nov 29, 2022
@mubaldino
Copy link
Member

@byburakyasar - My apologies for not seeing this until now.

This was a behavior that was provided to rescue potential MGRs grids with typos. It should throw an Exception or respect a runtime mode to allow such data rescue. Background -- We had lots of customer data with typos in MGRS.... The current "rescue" of the coordinate is:

Grid: 37SCA Northing/Easting: 211914648 => yields two options where the 4 or 5 digit Northin/Easting may have a typo, two new MGRS coordinates are offered as possible interpretations:

  • 21191N, 46480E
  • 21190N, 14648E

A strict interpretation should be in play, I'd say. With N/E offsets mismatched in length, then its possible the MGRS coordinate is not actually a coordinate.

Comment with any thoughts: (a) what is the interpretation here if the MGRS coordinate had some possible typo?, (b) what is the API behavior desired?

thanks,
Marc

@byburakyasar
Copy link
Author

@mubaldino in our case the returned coordinate caused a wrong display on the map since that coordinate was not valid.

I understand the reason behind the rescue mechanism, it is good but it may be better to keep the interpreted coordinates and valid coordinates in separate TextMatch lists. Then we can decide what to do about the interpreted coordinates.

@mubaldino
Copy link
Member

Implementation is in place for Xponents 3.6. I'll add some comments after release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants