From: Sarah Hoffmann Date: Thu, 6 Apr 2023 14:54:00 +0000 (+0200) Subject: fix a number of corner cases with interpolation splitting X-Git-Tag: v4.2.3~1 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/ffe32af5313d483ac1b27b682dcaf04a3196009d?hp=ffe32af5313d483ac1b27b682dcaf04a3196009d fix a number of corner cases with interpolation splitting Snapping a line to a point before splitting was meant to ensure that the split point is really on the line. However, ST_Snap() does not always behave well for this case. It may shorten the interpolation line in some cases with the result that two points housenumbers suddenly fall on the same point. It might also shorten the line down to a single point which then makes ST_Split() crash. Switch to a combination of ST_LineLocatePoint and ST_LineSubString instead, which guarantees to keep the original geometry. Explicitly handle the corner cases, where the split point falls on the beginning or end of the line. ---