connect_eq - ObjectVision/GeoDMS GitHub Wiki
Network functions connect_eq

- connect_eq(arc_polygon_dataitem, arc_polygon_match_dataitem, point_dataitem, point_match_dataitem, [optional] maxSqrDist)
- connect_eq(point_dataitem, point_match_dataitem, arc_polygon_dataitem, arc_polygon_match_dataitem, [optional] maxSqrDist)
The connect_eq function works in a similar way as the second variant of the connect function, with the extra condition that the values of the arc_polygon_match_dataitem need to match with the values of the point_match_dataitem.
The figure shows an example of how this connect_eq function can be used.
With the connect function the blue star location would be connected to the BRoad. But assume the actual address of the star location is AStreet. The connect_eq can be used to connect the blue star to the ARoad according to the blue dashed line.
The value type of matching arguments: arc_polygon_match_dataitem and point_match_dataitem need to be uint32. This means street names (as in the example) first need to be converted to street index numbers, see the example.
Points with null values for the point_match_dataitem will always be connected to the nearest road (even if the road has a null value in the arc_polygon_match_dataitem).
To arcs/polygons with null values for the arc_polygon_match_dataitem, no points will be connected (except for points that are nearest to these roads and have a null value as point_match_dataitem).
Since GeoDMS 20.19.2 the geometry arguments may be given in the other order, each with its own match data item: the points come first and become a choice set, so that one connection is made per arc, to the nearest qualifying point. It is then the arc whose null match value waives the comparison, mirroring the rule above. See connect_info for what the reversed order means, and for the domain unit of the optional maxSqrDist, which this function accepts since the same version.
- data item arc_polygon_dataitem with composition type type arc or polygon. Be aware, if you connect points to polygons, always use a split_polygon first of the polygon geometry to get rid of the connection lines in polygons between islands and lakes.
- data item point_dataitem with fpoint or dpoint value type
- data items arc_polygon_match_dataitem and point_match_dataitem with uint32 value type.
- The value type of the arc_polygon_dataitem and point_dataitem arguments must match.
- The arc_polygon_dataitem and arc_polygon_match_dataitem arguments need to have the same domain unit.
- The point_dataitem and point_match_dataitem arguments need to have the same domain unit.
7.131
unit<uint32> location : nrofrows = 5
{
attribute<point_rd> point := src/location/point;
attribute<string> streetname : ['Astreet','CRoad','BStreet','DSquare','BStreet'];
attribute<street> street_rel := rlookup(streetname, street/values);
}
unit<uint32> road : nrofrows = 4
{
attribute<point_rd> line (arc) := src/road/line;
attribute<string> streetname : ['Astreet','BStreet','CRoad','DSquare'];
attribute<street> street_rel := rlookup(streetname, street/values);
}
unit<uint32> street := unique(road/streetname);
unit<uint32> connect_eq := connect_eq(road/line, road/street_rel, location/point, location/street_rel);