Skip to content

VISIBLE_HIDDEN_COLOC & HIDDEN_JUNCTION w/only devel systems #433

Closed

Description

@yakra

This just randomly occurred to me, not even looking at the code...

  • VISIBLE_HIDDEN_COLOC check is performed in the HGVertex ctor.
  • HIDDEN_JUNCTION check is performed during edge compression.

All of this is after the HighwayGraph ctor has been fed a list of every unique point that is_or_colocated_with_active_or_preview(), meaning these errors won't be flagged when only devel systems are involved.

Activity

  1. yakra commented on Oct 12, 2023

    @yakra
    ContributorAuthor

    HIDDEN_JUNCTION will require some more thought.

    Still not sure what exactly I wanna do here.
    On the forum, @Duke87ofST mentioned "the next point or the preceding point".
    Something that takes this approach may be worth looking into.
    It'll be a lot easier now that TMArray is fully implemented, Waypoints & HighwaySegments are stored sequentially, and pointer arithmetic can be used.

    Edit: Some first thoughts...

    • Iterate through each route's points.
    • For hidden ones, check whether it's colocated and at the front of its colocation list.
    • If so, iterate through all its colocated points.
    • For each one, gather up all the preceding & following points (unless it's a terminus), get their unique locations (possibly represented as a Waypoint* via Waypoint::hashpoint()), and add those to a set.
    • If the set contains more than 2 items, flag an error.

    This can be simplified if we don't care about keeping the number of incident edges in TM master graph in the info field.

  2. yakra commented on Oct 21, 2023

    @yakra
    ContributorAuthor

    To open flagged routes in the HB:

    for line in `grep HIDDEN_JUNCTION logs/datacheck.log | fgrep -v -f <(grep HIDDEN_JUNCTION _f86f/logs/datacheck.log)`; do
      root=`echo $line | cut -f1 -d';'`
      label=`echo $line | cut -f2 -d';'`
      rteinfo=$(grep -h ";$root;" `ls ~/tm/HighwayData/hwy_data/_systems/*.csv | grep -v '_con\.csv$'`)
      sys=`echo $rteinfo | cut -f1 -d';'`
      rg=`echo $rteinfo | cut -f2 -d';'`
      coords=`grep "^$label" ~/tm/HighwayData/hwy_data/$rg/$sys/$root.wpt | sed 's~.*?~~'`
      echo "https://travelmapping.net/hb/showroute.php?r=$root&$coords&zoom=12"
    done | xargs firefox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions