1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// src/topology/label.rs
//! Topological labeling types: `Location` and `Dimension`.
//!
//! [`Location`] records where a point or region lies relative to one geometry.
//! [`Dimension`] records the maximum dimension of an intersection and is the
//! cell type of [`IntersectionMatrix`](crate::topology::de9im::IntersectionMatrix).
//!
//! Neither type has any connection to a doubly-connected edge list, so they
//! live directly under `topology` rather than in a directory of their own.
/// The topological location of a region relative to one input geometry.
///
/// Returned by point location and used as the cell semantics of the DE-9IM
/// matrix: a cell records which pair of locations the row and column refer to.
/// The maximum dimension of a geometric intersection.
///
/// Values correspond to the DE-9IM specification:
///
/// | Value | Meaning |
/// |-------|---------|
/// | `Empty` (−1) | The intersection is empty. |
/// | `Point` (0) | At least one point, no line or area. |
/// | `Line` (1) | At least one line segment, no area. |
/// | `Area` (2) | The intersection contains area. |
///
/// The numeric discriminant values match the OGC DE-9IM convention; the
/// `PartialOrd`/`Ord` derive is therefore meaningful and returns the
/// expected comparison (e.g., `Area > Line`).