-
Notifications
You must be signed in to change notification settings - Fork 1
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
Finish coordinate suite #70
Labels
feature
A new feature
Comments
|
kalisjoshua
added a commit
that referenced
this issue
Nov 5, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 6, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 6, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 6, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 6, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 6, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 6, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 7, 2024
Thinking about edge cases:
There is a difference between the user having missed a keystroke and not being done entering a value. Either way, do we want to return a positive result when there is ambiguity in the input? |
kalisjoshua
added a commit
that referenced
this issue
Nov 13, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 13, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 13, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 14, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 14, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 14, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 14, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 15, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 15, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 19, 2024
kalisjoshua
added a commit
that referenced
this issue
Nov 19, 2024
kalisjoshua
added a commit
that referenced
this issue
Dec 2, 2024
kalisjoshua
added a commit
that referenced
this issue
Dec 2, 2024
kalisjoshua
added a commit
that referenced
this issue
Dec 2, 2024
kalisjoshua
added a commit
that referenced
this issue
Dec 2, 2024
kalisjoshua
added a commit
that referenced
this issue
Dec 2, 2024
kalisjoshua
added a commit
that referenced
this issue
Dec 2, 2024
brandonjpierce
pushed a commit
that referenced
this issue
Dec 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is definitely the most complex part of the suite. The general ethos around the parsing is that we try and make our capture groups as deterministic as humanly possible. Less tricks in the regex the better for simplification sake. E.g. for a coordinate passed to us in DD form we will always capture the following groups, regardless if there is a value there or not:
With this, we can capture either lon or lat independently, or combined by simply concating the regex's. Additionally, we now have more deterministic inputs for our value normalization described further below.
The current Regex partials can be found here:
We currently are testing against a number of variations for each coordinate format as seen here:
This covers the bulk of the edge cases and or use cases that you would see in the wild. We will want to slightly adjust these fixtures potentially just so that the snapshot output is a tad more consistent and or our
expect()
calls can be simplified a bit or in a more generic way.Given that we now have the input, either from a machine or a user, deterministic split into N number of capture groups, we can normalize this input into a common form. Notably, regardless of the input format, we want the normalized format to be a simple float value that can then be used as the input for external formatting outwards. E.g.
N 87.2123
would become87.2123
,87.2123 S
would become-87.2123
etc.We have some initial work started for this for specifically the
DD
format capture groups here:Given our normalized float value for both lon and lat we can take that and format it into the common standards of DD, DMS, DDM. We might be able to actually reuse the regex segments to assist with this but this area is largely tbd. Additionally, we will potentially need to support MGRS, CGRS, and other standard military coordinate formats.
The text was updated successfully, but these errors were encountered: