[postgis-users] Bug? Strange code in lwline_crossing_direction()
Darafei "Komяpa" Praliaskouski
me at komzpa.net
Sun Apr 19 07:30:47 PDT 2020
the link you have is setting variable this_cross, and L526 sets
first_cross from it if it was not set and there is LEFT or RIGHT cross
(not no-cross and not COLLINEAR). Looks expected to me.
On Sat, Apr 18, 2020 at 6:32 PM Kohei KaiGai <kaigai at heterodb.com> wrote:
> I noticed a strange code at liblwgeom/lwalgorithm.c
> lwline_crossing_direction() is the main logic of ST_LineCrossingDirection.
> It walks on all the edges of the supplied geometry (line), and calls
> lw_segment_intersects to check intersections.
> It looks to me the local variable 'first_cross' is used to remember the first
> result from the lw_segment_intersects, however, it saves different value
> on the second if-block at L526.
> Is it expected? Or, just mistake by copy & paste?
> Best regards,
> HeteroDB, Inc / The PG-Strom Project
> KaiGai Kohei <kaigai at heterodb.com>
> postgis-users mailing list
> postgis-users at lists.osgeo.org
Support me: http://patreon.com/komzpa
More information about the postgis-users