@@ -504,6 +504,30 @@ function consolidate_lua_01_t( passedt )
504504 passedt.trail_visibility = "intermediate"
505505 end
506506
507+ -- ----------------------------------------------------------------------------
508+ -- Core path numbers in Scotland are often stored in "ref" as "Core Path XXX"
509+ -- rather than as prow_ref as elsewhere.
510+ --
511+ -- For a highway with a ref, if designation and prow_ref are unset, and
512+ -- if the ref starts with "Core Path", then set the designation to "core_path"
513+ -- and set prow_ref.
514+ --
515+ -- This lifts the path out of e.g. the low visibility check below.
516+ -- ----------------------------------------------------------------------------
517+ if (( passedt.ref ~= nil ) and
518+ ( passedt.highway ~= nil ) and
519+ ( passedt.highway ~= "" ) and
520+ (( passedt.designation == nil ) or
521+ ( passedt.designation == "" ) or
522+ ( passedt.designation == "core_path" )) and
523+ (( passedt.prow_ref == nil ) or
524+ ( passedt.prow_ref == "" )) and
525+ ( string.find( passedt.ref, "Core Path", 1, true ))) then
526+ passedt.designation = "core_path"
527+ passedt.prow_ref = passedt.ref
528+ passedt.ref = nil
529+ end
530+
507531-- ----------------------------------------------------------------------------
508532-- Suppress non-designated very low-visibility paths
509533-- Various low-visibility trail_visibility values have been set to "bad" above
0 commit comments