mesh
Mesh(boundary, cellboxes, neighbour_graph, max_split_depth)
¶
Attributes:
| Name | Type | Description |
|---|---|---|
cellboxes |
list<(CellBox)>
|
A list of CellBox objects forming the Mesh |
neighbour_graph |
NeighbourGraph
|
A graphical representation of the adjacency relationship between CellBoxes in the Mesh. The neighbour_graph object conatin a dict of the form {
} |
Constructs a Mesh object from a given parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
boundary
|
Boundary
|
the geo-spatial/temporal boundaries (longtitude, latitude and time) of the Mesh |
required |
cellboxes
|
list <CellBox>
|
a list of the cellboxes contained in the Mesh |
required |
neghbour_graph
|
NeighbourGraph
|
a graphical representation of the adjacency |
required |
add_data_points(data_points)
¶
takes a dataframe containing geospatial-temporal located values and assigns them to cellboxes within this Mesh.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data_points
|
DataFrame
|
a dataframe of datapoints to be added to the Mesh. data_points is of the form lat | long | (time)* | value_1 | ... | value_n |
required |
get_cellbox(long, lat)
¶
Returns the CellBox which contains a point, given by parameters lat, long
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
long
|
long
|
longitude of a given point |
required |
lat
|
float
|
latitude of given point |
required |
Returns:
| Name | Type | Description |
|---|---|---|
cellbox |
CellBox
|
the cellbox which contains the point given my parameters |
|
(long, lat) |
get_cellboxes()
¶
returns a list of dictionaries containing information about each cellbox in this Mesh. all cellboxes will include id, geometry, cx, cy, dcx, dcy
Returns:
| Name | Type | Description |
|---|---|---|
cellboxes |
list<dict>
|
a list of CellBoxes which form the Mesh. CellBoxes are of the form - { "id": (string) ...
} |