inline bool apply(Turn const& turn) const
    {
        linestring_type const& ls1 =
            range::at(m_multilinestring, turn.operations[0].seg_id.multi_index);

        linestring_type const& ls2 =
            range::at(m_multilinestring, turn.operations[1].seg_id.multi_index);

        if (turn.operations[0].seg_id.multi_index
            == turn.operations[1].seg_id.multi_index)
        {
            return is_closing_point_of(turn, ls1);
        }

        return
            is_boundary_point_of(turn.point, ls1)
            && is_boundary_point_of(turn.point, ls2)
            &&
            ( boost::size(ls1) != 2
              || boost::size(ls2) != 2
              || ! have_same_boundary_points(ls1, ls2) );
    }
Exemplo n.º 2
0
        inline bool apply(Turn const& turn) const
        {
            typedef typename boost::range_value
                <
                    MultiLinestring
                >::type linestring;

            linestring const& ls1 =
                range::at(m_multilinestring,
                          turn.operations[0].seg_id.multi_index);

            linestring const& ls2 =
                range::at(m_multilinestring,
                          turn.operations[0].other_id.multi_index);

            return
                is_boundary_point_of(turn.point, ls1)
                && is_boundary_point_of(turn.point, ls2)
                &&
                ( boost::size(ls1) != 2
                  || boost::size(ls2) != 2
                  || !have_same_boundary_points(ls1, ls2) );
        }