Releases: NOAA-ORR-ERD/cell_tree2d
Releases · NOAA-ORR-ERD/cell_tree2d
Mixed Polygon Support
cell_tree2d now supports being built over mixed polygons.
Vertices are still defined by a Nx2 numpy array. Faces can now be a NxM array of integer indices into the vertices array, or a length K array of indices accompanied by a separate array of N polygon lengths.
(In the following 'vXY' is the index of the vertex Y of the polygon X)
faces = [v00, v01, v02, v03, v04, v10, v11, v12]
len_arr = [5, 3]
If the Faces array is NxM, it is assumed that there is 1 polygon per row with max number of sides M. 'Masked' indices are indicated with a value of -1. This indicates the polygon has fewer sides than the max. For example, in this 2x5 faces array:
faces = [[v00,v01,v02,v03,v04] (polygon with 5 sides)
[v10,v11,v12, -1, -1]] (polygon with 3 sides)
len_arr = OPTIONAL
If no polygons contain a -1, then all the polygons have the same number of sides.
In the C:
- Construction has been split into a more modular system. It now consists of three distinct functions (add_vertices(), add_polys(), and finalize()) that are used in the Cython to set the cell tree up.
- Field types have been refactored to be more appropriate for their role
v0.2.0
added contiguous array check
v0.1.3
updated version in __init__
0.1.2
Data type more strictly enforced.
CellTree now holds python refs to verts/faces to avoid python dropping them.
multipoint
this version includes multipoint
Initial Release
v0.1.0 Added locate function for a whole array of points