From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | emre(at)hasegeli(dot)com |
Cc: | PostgreSQL Bugs <pgsql-bugs(at)postgresql(dot)org> |
Subject: | Re: Line intersection point is wrong |
Date: | 2016-06-19 18:51:59 |
Message-ID: | 11053.1466362319@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
... also, a quick review of all the LINE-related code in geo_ops.c
says that it's just *full* of bugs. Aside from the issues already
mentioned:
line_recv fails to reject A=B=0
line_perp can get division by zero
silly coding in line_eq (A and B can't both be zero, no need to look at C)
line_distance ignores l1->A, suspicious
close_pl busted in same way as line_interpt_internal
close_ps ignores tmp->B, suspicious
I suspect that a lot of this code was originally written on the assumption
that vertical and horizontal lines would have B or A exactly -1
respectively. Somewhere along the line that restriction got dropped,
but the code wasn't improved to cope.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Emre Hasegeli | 2016-06-19 19:19:54 | Re: Line intersection point is wrong |
Previous Message | Tom Lane | 2016-06-19 18:17:31 | Re: Line intersection point is wrong |