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
NOCSurfaceProcesses
GeoSpatialTools
Commits
1080246f
Commit
1080246f
authored
5 months ago
by
Joseph Siddons
Browse files
Options
Download
Email Patches
Plain Diff
docs: add docstrings for Ellipse classes
parent
ff50a10e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
14 deletions
+48
-14
GeoSpatialTools/octtree.py
GeoSpatialTools/octtree.py
+24
-5
GeoSpatialTools/quadtree.py
GeoSpatialTools/quadtree.py
+24
-9
No files found.
GeoSpatialTools/octtree.py
View file @
1080246f
...
...
@@ -97,7 +97,7 @@ class SpaceTimeRectangle:
h : float
Height of the rectangle (latitude range).
dt : timedelta
T
ime extent of the rectangle.
t
ime extent of the rectangle.
"""
def
__init__
(
...
...
@@ -218,16 +218,35 @@ class SpaceTimeRectangle:
class
SpaceTimeEllipse
:
"""A simple Ellipse Class for an ellipse on the surface of a sphere."""
"""
A simple Ellipse Class for an ellipse on the surface of a sphere.
Parameters
----------
lon : float
Horizontal centre of the ellipse
lat : float
Vertical centre of the ellipse
datetime : datetime
Datetime centre of the ellipse.
a : float
Length of the semi-major axis
b : float
Length of the semi-minor axis
theta : float
Angle of the semi-major axis from horizontal anti-clockwise in radians
dt : timedelta
(full) time extent of the ellipse.
"""
def
__init__
(
self
,
a
:
float
,
b
:
float
,
lon
:
float
,
lat
:
float
,
theta
:
float
,
datetime
:
datetime
,
a
:
float
,
b
:
float
,
theta
:
float
,
dt
:
timedelta
,
)
->
None
:
self
.
a
=
a
...
...
This diff is collapsed.
Click to expand it.
GeoSpatialTools/quadtree.py
View file @
1080246f
...
...
@@ -14,9 +14,9 @@ class Record:
Parameters
----------
x
: float
lon
: float
Horizontal coordinate
y
: float
lat
: float
Vertical coordinate
datetime : datetime | None
Datetime of the record
...
...
@@ -59,13 +59,13 @@ class Rectangle:
Parameters
----------
x
: float
lon
: float
Horizontal centre of the rectangle
y
: float
lat
: float
Vertical centre of the rectangle
w
: float
lon_range
: float
Width of the rectangle
h
: float
lat_range
: float
Height of the rectangle
"""
...
...
@@ -146,14 +146,29 @@ class Rectangle:
class
Ellipse
:
"""A simple Ellipse Class for an ellipse on the surface of a sphere."""
"""
A simple Ellipse Class for an ellipse on the surface of a sphere.
Parameters
----------
lon : float
Horizontal centre of the ellipse
lat : float
Vertical centre of the ellipse
a : float
Length of the semi-major axis
b : float
Length of the semi-minor axis
theta : float
Angle of the semi-major axis from horizontal anti-clockwise in radians
"""
def
__init__
(
self
,
a
:
float
,
b
:
float
,
lon
:
float
,
lat
:
float
,
a
:
float
,
b
:
float
,
theta
:
float
,
)
->
None
:
self
.
a
=
a
...
...
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