Skip to content

Commit 2ff0809

Browse files
committed
Merge branch '118-bug-loop-segments-building-mapping' into 'develop'
Resolve "Buildings mapping for disregarded street segments not correct" Closes #118 See merge request need/NEED-infdb!118
2 parents 983917d + 96aea46 commit 2ff0809

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tools/infdb-basedata-ways/sql/04_filter_isolated_loop_short.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ CREATE INDEX ON filtered_ways (old_way_id); -- lookup by deleted way id
2727
DO $$
2828
DECLARE
2929
v_min_length double precision := {min_length_meter}::double precision; -- minimum length threshold (meters)
30-
v_snap_tol double precision := 30.0; -- snap/proximity tolerance for endpoint connections
30+
v_snap_tol double precision := 10.0; -- snap/proximity tolerance for endpoint connections
3131
v_apply_loop boolean := {apply_loop_filter}::boolean; -- enable loop filter
3232
v_apply_isolated boolean := {apply_isolated_filter}::boolean; -- enable isolated filter
3333
v_apply_length boolean := {apply_length_filter}::boolean; -- enable short-way filter
@@ -89,8 +89,8 @@ BEGIN
8989
FROM ways_tem w2
9090
WHERE w2.id::text <> r.way_id
9191
AND w2.geom IS NOT NULL
92-
AND ST_DWithin(w2.geom, r.start_pt, v_snap_tol) -- loop point proximity
93-
ORDER BY ST_Distance(w2.geom, r.start_pt) ASC -- nearest connected geometry first
92+
AND ST_DWithin(w2.geom, r.geom, v_snap_tol) -- loop point proximity
93+
ORDER BY ST_Distance(w2.geom, r.geom) ASC -- nearest connected geometry first
9494
LIMIT 1;
9595
END IF;
9696

0 commit comments

Comments
 (0)