Skip to content

lnk_points_snap() can snap to placeholder (999.*) stream segments #313

Open

Description

@NewGraphEnvironment

lnk_points_snap() excludes placeholder streams with s.wscode_ltree != '999'::ltree (R/lnk_points_snap.R:96). FWA placeholder codes are 999.* (e.g. 999.999999…), and no segment has the bare code 999. So the guard excludes nothing: 37,416 placeholder segments with a non-NULL local code stay snappable.

On PSCIS at 150 m:

  • 11 of 19,905 crossings snap to a placeholder segment.
  • With the descendant test, 8 of those have no real stream within tolerance, and 3 snap to the nearest real stream.
  • At num_features = 5, 19 crossings list a placeholder candidate.

Fix

Use the descendant operator, as fresh does (.frs_stream_guards()):

NOT s.wscode_ltree <@ '999'::ltree

Or move to fresh::frs_point_snap() (#314).

Relates to NewGraphEnvironment/fresh#247.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions