Route File Management

The core of the Route Finder plugin is its ability to process route files and turn them into feature-rich, interactive routes on your website. This guide explains the entire workflow.

Uploading a New Route

The process begins on the Routes → Route Management → Add Route page.

Supported File Formats

You can upload files in several common formats. All non-GPX files are automatically converted into the standard GPX format upon upload, which is what the plugin uses internally.

Step-by-Step Upload Guide

  1. Navigate: Go to Routes → Route Management and ensure the "Add Route" tab is selected.
  2. Route Title: Enter a title for the route. If you leave this blank, the title will be generated from the uploaded file's name.
  3. Route File: Click "Choose File" and select the GPX, KML, TCX, or FIT file from your computer.
  4. Processing Options: Select the automated tasks you want to run after the file is uploaded (see details below).
  5. Metadata: Assign an Activity Type, select suitable Club Groups, and optionally add a Strava URL.
  6. Distance/Ascent: You can manually enter these values. If you leave them blank and have checked the auto-calculate option, the plugin will determine them from the file.
  7. Descriptions: Add a detailed description for the main content and a shorter summary for the "Route Description" field (often used for a list of towns).
  8. Upload: Click the "Upload and Process Route" button.

Automated Processing Options

During upload (or when re-processing an existing route), you can select several options to enrich the route data automatically.

Calculate Tea Stop Proximity

This task analyzes the route and finds any of your curated tea stops that are within a specified distance (e.g., 1km) of the track. The results are saved with the route, allowing you to display "nearby stops" on the route page.

Update Route Bearings

Calculates the general compass direction of the route (e.g., NE, SW) based on its start and end points. This is useful for filtering and at-a-glance information.

Auto-Calculate Distance and Elevation

If you haven't entered the distance and ascent manually, this option will parse the GPX file's trackpoints to calculate the total route length and elevation gain.

Auto-Detect Towns/Villages

This powerful feature queries an external service (OpenStreetMap's Nominatim API) to identify towns and points of interest along the route. The results can be used to auto-populate the route description, saving you from having to type it out manually. You can choose a detail level to find more or fewer waypoints.


Ongoing File Management

Once routes are created, the plugin provides tools for managing the associated files.

Replacing a GPX File

When editing an existing route, you have the option to upload a new GPX file to replace the current one. This is useful for correcting or updating a route without having to create an entirely new post.

Automatic File Deletion

To keep your server's Media Library clean, the plugin automatically handles file deletion. When you permanently delete a route from the WordPress trash, its associated GPX file is also permanently deleted.

Orphaned File Cleanup

Sometimes, GPX files can become "orphaned" in the Media Library (i.e., they are not attached to any existing route). On the Routes → Route Management → GPX Management page, the system provides a tool to detect these files and delete them in bulk, freeing up server space.