#255 closed defect (fixed)
Geodetic point-in-polygon breaking case
Reported by: | pramsey | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 1.5.0 |
Component: | postgis | Version: | master |
Keywords: | Cc: |
Description
If the stab line used for point-in-polygon calculation intersects a parallel edge on the way out of the polygon, it will trigger a double count, and will end up returning the wrong result.
Change History (7)
comment:1 by , 15 years ago
Milestone: | PostGIS 1.5.0 → PostGIS Future |
---|
comment:3 by , 15 years ago
Are you sure that this is low probability? It would be bad for people to blindly receive wrong answers - is there any way you can at least detect this condition and throw a warning/error?
ATB,
Mark.
comment:4 by , 15 years ago
I'm not sure I understand this right but if I do, wouldn't it be a solution to do like this:
detect the fenomena; if this stabline intersects a paralell edge then the start and end of that edge have to be on the stabline too. So if both start and end intersects then the alarm should go.
then when we know it has happened, in't it possible to just give the stabline a new direction and give it a new try?
I haven't studied the code and have just understood the pricip of the process from your comments Paul, so if I missunderstand it all, I hope the world will continue rotating anyway.
/Nicklas
comment:5 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
OK, I've committed a fix for this, but it has raised again for me just how delicate my testing of edge intersection is (I keep jiggling the tolerance for the test tighter and looser around a sweet spot, it is *not* numerically robust, and eventually we'll find a case which doesn't work within the tolerance ranges required by all the other unit tests (thank goodness for unit tests).
comment:6 by , 15 years ago
Milestone: | PostGIS Future → PostGIS 1.5.0 |
---|
This is v. low probability, deferring.