logo-header

 
 

syntax

  • connect_eq(arc_geom, arc_match_att,  point_geom, point_match_att)

definition

The connect_eq works in a similar way as the second variant of the connect function, only with the extra condition that the values of the arc_match_att attribute need to match with the values of the point_match_att attribute. The arc_geom and arc_match_att attributes need to have the same domain unit, which also applies to the point_geom and point_match_att attributes.

description

The next figure shows an example of how this connect_eq function can be used.
connect eq

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 matching attribute for both the arcset as the pointset needs to be of value type uint32. This means streetnames (as in the example) first need to be converted to streetcodes/indices, see the example.

Points with null values for the point_match_att will always be connected to the nearest road (even if the road has a null value in the arc_match_att attribute).

To roads with null values for the arc_match_att attribute no points will be connected (except for points that are nearest to these roads and have a null value as point_match_att). 

applies to

Data item arc_geom with composition type arc or polygon

Data items point_geom with fpoint or dpoint value type

Data items arc_match_att and point_match_att with uint32 value type

conditions

The value type of the arc and pointset arguments must match.

since version

7.131

example

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(roadarcs/street);

unit<uint32> connect_eq :=
connect_eq(
road/line , road/street_rel,
location/point, locatioen/street_rel
);

see also


OBJECT VISION BV
Vrije Universiteit
De Boelelaan 1085
1081 HV Amsterdam
The Netherlands

tel: +31 (0)20 598 9083
fax:+31 (0)20 598 9904