Skip to content

Horse Route Import Guide — Step-by-Step

Complete instructions for importing 2,300+ horse riding routes to Firestore


STEP 1: Backup Current Database (Takes 2 minutes)

python3 scripts/backup_firestore.py

Output:

✅ Backup complete!
   Location: backups/firestore_backup_20260609_150000.json
   Size: 12.50 MB

This creates a timestamped backup you can restore if anything goes wrong.


STEP 2: Preview the Import (Takes 5 minutes)

See how many routes will be imported WITHOUT writing to Firestore:

python3 scripts/import_all_horse_routes.py

Output shows:

[1/7] OSM Horse Routes...
✅ OSM Horse Routes               XXX routes

[2/7] Toerisme Vlaanderen...
✅ Toerisme Vlaanderen            XXX routes

[3/7] FFE France...
✅ FFE France                     XXX routes

[4/7] RouteYou Netherlands...
✅ RouteYou Netherlands           XXX routes

[5/7] RouteYou Belgium...
✅ RouteYou Belgium               XXX routes

[6/7] RouteYou Germany...
✅ RouteYou Germany               XXX routes

[7/7] RouteYou France...
✅ RouteYou France                XXX routes

────────────────────────────────────────────
   TOTAL:                    2,300+ routes

No Firestore writes yet — just a preview!


STEP 3: Run the Full Import (Takes 10-15 minutes)

python3 scripts/import_all_horse_routes.py --firestore

Confirmation prompt:

⚠️  ABOUT TO IMPORT ROUTES TO FIRESTORE
   This will add routes to the community_trails collection.
   All routes are horse-riding-specific (NOT hiking trails).

   Continue? (y/n): y

Then it imports all 7 sources:

[1/7] OSM Horse Routes (horse=designated ONLY)
  ✓ Wrote XXX routes to Firestore

[2/7] Toerisme Vlaanderen (Flanders)
  ✓ Wrote XXX routes to Firestore

[3/7] FFE France (Grand Itinéraires)
  ✓ Wrote XXX routes to Firestore

[4-7/7] RouteYou (NL, BE, DE, FR)
  ✓ Wrote XXX routes to Firestore each

✅ Import complete!
   2,300+ horse riding routes imported to Firestore
   Collection: community_trails


STEP 4: Verify the Import

In Firebase Console: 1. Go to: https://console.firebase.google.com/project/equitrail/firestore 2. Click community_trails collection 3. Should see documents with: - sourceType: osm-horse, routeyou, ffe-geocheval, etc. - name: horse route names - points: GPS coordinates - sourceCountry: nl, be, de, fr

Quick count:

# In Firebase Console, click community_trails
# Bottom right shows: "X documents"
# Should be current count + 2,300+

On the website: - Visit: https://equitrail.horse/routes/nederland/ - Route counts in stats should increase automatically - May take 5-10 seconds for JavaScript cache to refresh


STEP 5: If Something Goes Wrong — Restore

python3 scripts/restore_firestore.py backups/firestore_backup_20260609_150000.json

This restores from your backup.


Complete Checklist

☐ Step 1: python3 scripts/backup_firestore.py
  ✅ Backup created at backups/firestore_backup_YYYYMMDD_HHMMSS.json

☐ Step 2: python3 scripts/import_all_horse_routes.py
  ✅ Preview shows 2,300+ routes ready

☐ Step 3: python3 scripts/import_all_horse_routes.py --firestore
  ✅ Import completes successfully

☐ Step 4: Verify in Firebase Console
  ✅ community_trails has new documents
  ✅ Website stats updated

☐ Optional: python3 scripts/restore_firestore.py [backup]
  (Only if you need to undo the import)

What Gets Imported

Horse-Specific Routes (7 sources):

  1. OSM Horse Routes (horse=designated)
  2. Official horse routes from OpenStreetMap
  3. Excludes general hiking/walking trails
  4. ~300+ routes NL/BE/DE/FR

  5. Toerisme Vlaanderen (Flanders horse network)

  6. Official Flanders tourism board routes
  7. ~50-100 routes

  8. FFE France (French Equestrian Federation)

  9. Official French horse routes
  10. Grand Itinéraires (Route d'Artagnan, Napoléon, Saint-Jacques)
  11. ~500+ routes

  12. RouteYou Netherlands

  13. Filtered: activity=horseback-riding ONLY
  14. ~500+ routes

  15. RouteYou Belgium

  16. Filtered: activity=horseback-riding ONLY
  17. ~300+ routes

  18. RouteYou Germany

  19. Filtered: activity=horseback-riding ONLY
  20. ~300+ routes

  21. RouteYou France

  22. Filtered: activity=horseback-riding ONLY
  23. ~300+ routes

Total: 2,300+ genuine horse riding routes (NOT hiking trails)


Filters Applied

INCLUDED: - way["horse"="designated"] — Official horse routes - way["horse"="yes"] + bridleway — Confirmed horse paths - activity=horseback-riding — RouteYou filtered - FFE/KNHS/Toerisme — Equestrian-specific sources

EXCLUDED: - Walking trails (wandelpaden) - Hiking routes (voetpaden) - Cycling paths (fietspaden) - General bridleways without horse tag


Troubleshooting

Issue Solution
"firebase_service_account.json not found" Check credentials file exists in /Users/nossie/app/equitrail/
"No routes found" for a source That source's API may be down; skip it and retry later
Import stuck for >15 minutes Kill process (Ctrl+C), restore backup, investigate API
Firestore shows 0 new documents Check Firebase Console; may need to refresh; routes have sourceType field
Website stats not updating Browser cache; clear with Ctrl+Shift+R (hard refresh)

After Import

Once complete: 1. ✅ ~2,300 new horse routes live in Firestore 2. ✅ Website route pages automatically show higher counts 3. ✅ App can query and display routes 4. ⏳ Next step: Wait for KNHS + Routedatabank email approvals (+2,650 more routes)


Timeline

Today (30 min):     Backup + Import 2,300+ routes
This week:          Send KNHS + Routedatabank emails
Week 1 (1-3 days):  KNHS approves → +650 routes
Week 2 (1-2 weeks): Routedatabank approves → +2,000 routes
Final:              10,000+ routes across 4 countries

Ready to import? Run this command now:

python3 scripts/backup_firestore.py && echo "✅ Backup created" && python3 scripts/import_all_horse_routes.py

This does both backup + preview in one command!