Results 1 to 2 of 2

Thread: Check a point inside or outside a road?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Lightbulb Check a point inside or outside a road?

    Please see my Road picture, I draw it by QCanvas and use canvasview to show it. I have used : DrawLine , drawrect of QCanvas, and drawcubicbezier of QPainter to draw it.
    And now! i have a point. This point can be in anywhere on canvasview. How do i check it inside or outside a road?
    --> I thinked about using color to fill the road. And i will check color at position of point. If color at point same color of road => i will say this point inside the road!!!--> is that OK?if it ok! how can i get color at position of point? how can i fill color for road. It not a polygon.

    --> OR using point matrix, any point inside the road will have value = 1. and outside have value = 0. But ! it hard to create this matrix with the value.

    --> OR using this algorithm : "check a point inside or outside the polygon". This method can use for one part of road. But at confluence or more...It not a polygon.

    >>what else?
    Attached Images Attached Images

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.