Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Joseph Siddons
GeoSpatialTools
Commits
66b37c82
Commit
66b37c82
authored
1 month ago
by
Joseph Siddons
Browse files
Options
Download
Email Patches
Plain Diff
compat: use typing for 3.9 compatibility
parent
9b70d04f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
GeoSpatialTools/great_circle.py
GeoSpatialTools/great_circle.py
+5
-4
No files found.
GeoSpatialTools/great_circle.py
View file @
66b37c82
...
...
@@ -6,6 +6,7 @@ comparisons between GreatCircle objects.
"""
import
numpy
as
np
from
typing
import
Optional
,
Tuple
from
.distance_metrics
import
bearing
,
gcd_slc
...
...
@@ -15,7 +16,7 @@ def cartesian_to_lonlat(
y
:
float
,
z
:
float
,
to_radians
:
bool
=
False
,
)
->
t
uple
[
float
,
float
]:
)
->
T
uple
[
float
,
float
]:
"""
Get lon, and lat from cartesian coordinates.
...
...
@@ -54,7 +55,7 @@ def polar_to_cartesian(
R
:
float
=
6371
,
to_radians
:
bool
=
True
,
normalised
:
bool
=
True
,
)
->
t
uple
[
float
,
float
,
float
]:
)
->
T
uple
[
float
,
float
,
float
]:
"""
Convert from polars coordinates to cartesian.
...
...
@@ -196,7 +197,7 @@ class GreatCircle:
def
intersection
(
self
,
other
:
object
,
epsilon
:
float
=
0.01
)
->
t
uple
[
float
,
float
]
|
None
:
)
->
Optional
[
T
uple
[
float
,
float
]
]
:
"""
Determine intersection position with another GreatCircle.
...
...
@@ -241,7 +242,7 @@ class GreatCircle:
self
,
other
:
object
,
epsilon
:
float
=
0.01
,
)
->
float
|
None
:
)
->
Optional
[
float
]
:
"""
Get angle of intersection with another GreatCircle.
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment