Sequence2points
Geometric functions sequence2points
syntax
- sequence2points(arc_polygon_data_item)
definition
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
- sequence_rel: a relation towards the domain unit of the arc_polygon_data_item. It is not generated when that domain unit is void, as for a Parameter.
- ordinal: a uint32 data item with the order of each point in the arc_polygon_data_item
They are the arguments that Points2sequence takes to build the arcs/polygons again: points2sequence(RoadPointSet/point, RoadPointSet/sequence_rel, RoadPointSet/ordinal) for the example below.
Since GeoDMS 18.0.2 the relation is only available as sequence_rel. Before GeoDMS 8.9.0 it was called SequenceNr, and up to 18.0.1 that name still worked next to sequence_rel. A configuration that refers to .../SequenceNr now fails with Unknown identifier; replace it with sequence_rel.
Names are case insensitive, so Point, Sequence_rel and Ordinal resolve as well, but the engine records these three in lower case, so another spelling is reported as a case mix-up in the event log.
applies to
data item arc_polygon_data_item with fpoint or dpoint Value type and composition type arc or polygon.
performance
O(n) where n = total number of points across all arcs/polygons. Single pass extracting points and building relations.
example
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 | sequence_rel | 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