-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
I'd like to suggest expanding the accepted coordinate formats. The goal would be able to parse these:
-
1°1′1(minute symbol made with\prime + TAB) -
1°1'(no seconds) -
1°(no minutes) -
1°1'1W(North/South/West/East direction at the end)
Here is a little snippet to test these:
julia> strings_to_test = Dict(
"expected" => "1°1'1",
"\\prime" => "1°1′1",
"no seconds" => "1°1'",
"no minutes" => "1°",
"NSEWdirection" => "1°1'1W"
) ;
julia> function myparse(str)
try
parse_dms(str)
catch e
"does not parse"
end
end
myparse (generic function with 1 method)
julia> vcat(([k v myparse(v)] for (k,v) in strings_to_test)...)
5×3 Matrix{Any}:
"expected" "1°1'1" (1.0, 1.0, 1.0)
"no minutes" "1°" "does not parse"
"NSEWdirection" "1°1′1W" "does not parse"
"no seconds" "1°1'" "does not parse"
"\\prime" "1°1'1" "does not parse"Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels