data.Geometry
self) data.Geometry(
A Geometry
object models geometry of a collection of pixels with topological structure. An edge of Geometry
has no properties, whereas a node of Geometry
has the following properties. Note that this has nothing to do with geometric graphs in graph theory. In general, the edges are crossing and even not line segments.
Properties of Point
id : int >= 0 level : int, float x, y : int, float geotype : int >= 0 order : int, float, optional
Note on the geotype property
The geotype property may have any non-negative integer values. Geotype 0 is reserved for interior points. Geotype 1 is reserved for exterior points. Geotypes 2, 3, and so forth will be used for any other kind of geometric boundary points.
Methods
Name | Description |
---|---|
create_graph | Factory method of Graph. |
create_node | Factory method creating a Point instance. |
modify_incompatible_id | Enforces node ids’ uniqueness and sequential compatibility. |
create_graph
data.Geometry.create_graph()
Factory method of Graph.
create_node
*args, **kwgs) data.Geometry.create_node(
Factory method creating a Point instance.
Parameters
Name | Type | Description | Default |
---|---|---|---|
id | int >= 0 | required | |
level | (int, float) | required | |
x | (int, float) | required | |
y | (int, float) | required | |
geotype | int >= 0 | required | |
order | (int, float) | required |
Returns
Name | Type | Description |
---|---|---|
point | Point | The point with specified properties. |
modify_incompatible_id
data.Geometry.modify_incompatible_id(geometry)
Enforces node ids’ uniqueness and sequential compatibility. The modification applies only to Geometry
instance.
Parameters
Name | Type | Description | Default |
---|---|---|---|
geometry | psiclone.data.Geometry |
A Geometry object |
required |
Returns
Name | Type | Description |
---|---|---|
is_modified | bool | True when incompatible ids are modified |