Ticket #314 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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) (diff)

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

Changed 5 years ago by pramsey

  • description modified (diff)

Changed 5 years ago by pramsey

  • status changed from new to closed
  • resolution set to fixed
  • milestone changed from PostGIS 2.0.0 to PostGIS 1.5.0

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.