Add hiker facts and elevation to the trail records
Each record gains a [hike] table with what a person choosing a trail wants to know: a one-sentence summary, the official page, where it starts and ends, its shape, how many days it takes, the season, the high point, the terrain, how much is off trail and whether a permit is needed. Every fact names the source it came from, and the validator rejects a fact with no source. 137 of the 138 trails have the table. The 85 trails with a track gain elevation.json: highest and lowest points, total climb and descent, and a profile, computed by tools/elevation.py from the AWS Terrain Tiles. Wording: a hiker-made trail is a "route" and its person the "author"; a trail's geometry is a "track". The README, the contributing guide and the schema now say so, and 71 sentences in the records were rewritten to match. Corrections found while checking sources: - Bartram Trail: the official link now goes to the Forest Service page, because the old domain serves injected spam. - Eastern Continental Trail: ends at Cap Gaspé; Newfoundland removed from its regions. - Wind River High Route (Dixon and Wilson): named for both authors. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
3d88004324
commit
efb6164737
233 files changed
+4811
-113
No files matched your search
@@ -189,7 +189,7 @@ def readme_table(trails):
|
||||
if trail_kind(t) != DESIGNATED:
|
||||
continue
|
||||
src = t.get("source", {})
|
||||
line = "yes" if src.get("line_file") else "no (record only)"
|
||||
line = "yes" if src.get("line_file") else "no"
|
||||
regions = ", ".join(t.get("regions", []))
|
||||
lines.append(
|
||||
f"| {t['id']} | {_cell(t['name'])} | {t['country']} | {regions} | "
|
||||
@@ -234,9 +234,9 @@ def counts_line(trails):
|
||||
routes = [t for t in trails if trail_kind(t) == "route"]
|
||||
routes_with_line = sum(1 for t in routes if t.get("source", {}).get("line_file"))
|
||||
return (
|
||||
f"{total} records, {with_line} with a track, {total - with_line} records only. "
|
||||
f"Of these, {len(routes)} are person-defined routes: {routes_with_line} with a track "
|
||||
f"and {len(routes) - routes_with_line} records only."
|
||||
f"{total} trails, {with_line} with a track and {total - with_line} with no track included. "
|
||||
f"Of these, {len(routes)} are routes: {routes_with_line} with a track "
|
||||
f"and {len(routes) - routes_with_line} without."
|
||||
)
|
||||
|
||||
|
||||
@@ -273,7 +273,7 @@ def main():
|
||||
f.write(readme_data)
|
||||
with_line = sum(1 for t in trails if t.get("source", {}).get("line_file"))
|
||||
print(f"Wrote trails.csv, index.geojson and README table: "
|
||||
f"{len(trails)} trails, {with_line} with a line.")
|
||||
f"{len(trails)} trails, {with_line} with a track.")
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user