cuspa.Polygons#
- class cuspa.Polygons(
- part_offsets: Any,
- ring_offsets: Any,
- points_xy: Any,
- aabbs: Any | None = None,
- index: SpatialIndex | None = None,
A batch of polygons in GeoArrow offsets form.
- Parameters:
- part_offsets
int32tensor of lengthnum_polygons + 1.part_offsets[i:i+2]is the half-open range of rings that belong to polygoni.- ring_offsets
int32tensor of lengthnum_rings + 1.ring_offsets[r:r+2]is the half-open range of points that belong to ringr(rings must be explicitly closed: first point == last point).- points_xy
Interleaved coordinate tensor of shape
(num_points, 2)(float32 or float64).- aabbs
Optional precomputed per-polygon AABBs,
(num_polygons, 4).- index
Optional precomputed
SpatialIndex.
Attributes
Methods
Discard derived AABBs and the spatial index after buffer mutation. |
|
|
|
|
Build or return a cached uniform-grid index. |
|
Validate polygon buffers. |
- Polygons.index: SpatialIndex | None#
- Polygons.num_points#
- Polygons.num_polygons#
- Polygons.num_rings#
- Polygons.ensure_index( ) SpatialIndex#
Build or return a cached uniform-grid index.
The default grid dimensions are
ceil(sqrt(num_polygons)).