Opened 8 years ago

Closed 8 years ago

#314 closed defect (fixed)

Geographic point-in-polygon issue: stab line grazes vertex

Reported by: pramsey Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.0
Component: postgis Version: trunk
Keywords: Cc:

Description (last modified by pramsey)

While fixing the co-linear case (#255) I was reminded of another unhandled case. If the stab line grazes a vertex but does not actually cross, a crossing will still be counted.

We could detect the condition and abort by running every test twice, with different stab lines.

Change History (2)

comment:1 Changed 8 years ago by pramsey

Description: modified (diff)

comment:2 Changed 8 years ago by pramsey

Milestone: PostGIS 2.0.0PostGIS 1.5.0
Resolution: fixed
Status: newclosed

Used Nicklas' suggestion to skip past end points on the stab line to fix both co-linear and grazing cases. Added a number more tests to confirm this approach and handled first-point-on-line case also. Code looks much nicer now, thanks Nicklas. r4872

Note: See TracTickets for help on using tickets.