sequence2points - ObjectVision/GeoDMS GitHub Wiki
Geometric functions sequence2points
- sequence2points(arc_polygon_data_item)
sequence2points(arc_polygon_data_item) results in a new domain unit with all points from the arcs/polygons of the arc_polygon_data_item
The function generates three subitems:
- Point: a data item with the points of all arcs/polygons of the arc_polygon_data_item
- SequenceNr: a relation towards the domain unit of the arc_polygon_data_item
- Ordinal: a uint32 data item with the order of each point in the arc_polygon_data_item
data item arc_polygon_data_item with fpoint or dpoint value type and composition type arc or polygon.
O(n) where n = total number of points across all arcs/polygons. Single pass extracting points and building relations.
unit<uint32> RoadPointSet := sequence2points(road/geometry);
| road/geometry |
|---|
| {2: xy(112631; 399246) xy(111866; 398599)} |
| {3: xy(111866; 398599) xy(111924; 399495) xy(111524; 401801)} |
| {2: xy(114921; 401529) xy(114823; 398584)} |
domain Road, nr of rows = 3
| point | SequenceNr | Ordinal |
|---|---|---|
| xy(112631; 399246) | 0 | 0 |
| xy(111866; 398599) | 0 | 1 |
| xy(111866; 398599) | 1 | 0 |
| xy(111924; 399495) | 1 | 1 |
| xy(111524; 401801) | 1 | 2 |
| xy(114921; 401529) | 2 | 0 |
| xy(114823; 398584) | 2 | 1 |
domain RoadPointSet, nr of rows = 7