Skip to content

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

{

<CellBox id_1>: {

    "1": [id_1,...,id_n],

    "2": [id_1,...,id_n],

    "3": [id_1,...,id_n],

    "4": [id_1,...,id_n],

    "-1": [id_1,...,id_n],

    "-2": [id_1,...,id_n],

    "-3": [id_1,...,id_n],

    "-4": [id_1,...,id_n],

},

...,

{

    <CellBox id_n>: {

        ...

    }

}

}

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) ...

"geometry": (string) POLYGON(...),

"cx": (float) ...,

"cy": (float) ...,

"dcx": (float) ...,

"dcy": (float) ...,



"value_1": (float) ...,

...,

"value_n": (float) ...

}