.. highlightlang:: us .. _poly_poly_intersect: poly_poly_intersect =================== .. index:: poly_poly_intersect .. us.tag poly_poly_intersect NOTREADYENGLISH base_graph New420 :ref:`poly_poly_intersect` returns the intersections of two polylines. .. function:: rmXY_I1I2 = poly_poly_intersect(rmXY1, rmXY2) .. us.return **Return Value** *rmXY_I1I2* is a matrix with 4 columns: .. list-table:: :header-rows: 1 * - Wert - Bedeutung * - rmXY_I1I2[1] - x-coordinates of the intersections. * - rmXY_I1I2[2] - y-coordinates of the intersections. * - rmXY_I1I2[3] - Index of the datapoint in rmXY1 closest to the intersection. * - rmXY_I1I2[4] - Index of the datapoint in rmXY2 closest to the intersection. It the two polylines to not cross the return value is 0. .. us.params **Parameters** .. uparam:: rmXY1 *rmXY1* is a matrix with two columns with data points. ``rmXY1[;1]`` are x-coordinates and ``rmXY1[;2]`` are the y-coordinates. .. uparam:: rmXY2 *rmXY2* is a matrix with two columns with data points. ``rmXY1[;2]`` are x-coordinates and ``rmXY2[;2]`` are the y-coordinates. .. us.example **Example** :: def XYGetIntersection(hData1, hData2) { rmXY1 = XYGetData(hData1); rmXY2 = XYGetData(hData2); rmXY_I1I2 = poly_poly_intersect(rmXY1, rmXY2); if (len(rmXY_I1I2) == 1) { return 0; } return rmXY_I1I2[;1,2]; } .. seealso:: :ref:`poly_poly_clip` :sub:`id-222886`