Menu

#18 LineString::Touches()

0.9.7.0
closed
7
2014-11-19
2014-11-16
Frederic
No

Thanks for the update 0.9.7.4. I like the new LineString::Touches implementation although it has a critical bug! See below for the missing stuff (I think).


bool LineString::Touches(Point geom, const MapAdapter mapadapter)
{
...
for (int i = 1; i < childPoints.size(); ++i)
{
...
pt1x1 = pt2x1;
pt1x2 = pt2x2;
pt1y1 = pt2y1;
pt1y2 = pt2y2;
}
}

cheers

Discussion

  • Brad Grimmett

    Brad Grimmett - 2014-11-16
    • status: unread --> open-accepted
    • assigned_to: Brad Grimmett
     
  • Brad Grimmett

    Brad Grimmett - 2014-11-16

    is this (attached diff) what you mean? I'll spend some time testing this before merging something (hopefully) tonight.

     
  • Frederic

    Frederic - 2014-11-17

    I don't know diff so well, but it looks correct to me. I attack my correction to be sure.

    The problem occurs when you have a line with more than 2 points.

     

    Last edit: Frederic 2014-11-17
  • Brad Grimmett

    Brad Grimmett - 2014-11-19
    • labels: --> LineString, Point, Touches, Logic Error
    • status: open-accepted --> closed
     
  • Brad Grimmett

    Brad Grimmett - 2014-11-19

    Updated in rev. 58
    QMapControl 0.9.7.5

     

Log in to post a comment.