import dascore as dc
empty = dc.AnnotationSet(dims=("time", "distance"))
outer = {"time": [0.0, 10.0, 10.0, 0.0], "distance": [0, 0, 50, 50]}
noisy = empty.add_polygon("noise", rings=[outer], note="traffic")
noisy["noise"].kind'polygon'
| method of dascore.core.annotations.AnnotationSet | source |
add_polygon(
self ,
id: str ,
rings ,
**columns ,
)-> ‘AnnotationSet’
Return a set with one more single-part polygon.
| Parameter | Description |
|---|---|
| id | The new feature’s id. |
| rings |
A sequence of frame-likes, the outer ring first, then holes. Each row is a vertex, in order. A multipart polygon is built with add_feature and part arrays.
|
| **columns | Features columns. |