gpx.studio

repository·main·Indexed 21 days ago

https://github.com/gpxstudio/gpx.studio

An online tool for creating and editing GPX files, consisting of a SvelteKit-based web application and a specialized TypeScript library for GPX manipulation. The library provides classes for managing GPX files, tracks, and segments, with capabilities for GeoJSON conversion, Ramer-Douglas-Peucker simplification, and calculating global and local statistics including elevation gain/loss, distance, and speed.

Tokens
26K
Snippets
63
Records
149
Agent score
77%

What's inside gpx.studio

  1. Overview of the gpx.studio interface

    main

    The gpx.studio interface is organized into four main sections surrounding the map:

    1. Menu: Located at the top, containing common actions like opening, closing, and exporting files, undo/redo operations, and application settings.
    2. Files and Statistics: Located at the bottom, displaying a list of opened files. Clicking a file displays its specific statistics below the list.
    3. Toolbar: Located on the left side, containing all the tools available for editing your GPX files.
    4. Map Controls: Located on the right side, allowing for map navigation, zooming, and switching between different map styles.
  2. Understand the gpx.studio interface layout

    main

    The gpx.studio interface is organized into four main functional areas surrounding the central map:

    1. Main Menu (Top): Access common actions like opening, closing, and exporting files, undoing/redoing actions, and application settings.
    2. Files and Statistics (Bottom): Displays the list of currently open files. Selecting a file shows its specific statistics. Supports multiple file selection and tree layout for management.
    3. Toolbar (Left): Contains all the editing tools used to modify your GPX files.
    4. Map Controls (Right): Provides tools to navigate the map, zoom in/out, and switch between different map styles.
  3. Understand the GPX file format structure

    main

    The GPX (GPS Exchange Format) is an open standard for exchanging GPS data. It uses a hierarchical structure to organize spatial data, which can include multiple traces and points of interest.

    Data Hierarchy

    • Track: The top-level container for a GPS trace. It can contain metadata like name, description, and appearance properties. A track is composed of one or more segments.
    • Segment: A continuous sequence of GPS points that form a single path. A track can consist of multiple disconnected segments (e.g., to represent different stages of a trip).
    • GPS Point: The fundamental unit, containing latitude and longitude. It may optionally include timestamp, altitude, and sensor data such as heart rate, cadence, temperature, or power.

    Points of Interest (Waypoints)

    Waypoints represent specific locations of interest. They include latitude and longitude coordinates and can optionally include a name and a description.

  4. Understand Edit actions and file items

    main

    Edit actions in gpx.studio can modify the content of currently selected files. When the tree layout of the files list is enabled, these actions can also be applied to more granular elements like tracks, segments, and points of interest.

    In the context of these actions, these elements (files, tracks, segments, and POIs) are collectively referred to as file items.

    Most edit actions (except Undo and Redo) are accessible via the main interface buttons or through the context menu (right-click) on the specific file items.

  5. Understand Edit Actions and File Elements

    main

    Unlike file-level actions, edit actions modify the actual content of selected files. These actions apply to what are called file elements (such as tracks, segments, or waypoints).

    Key behaviors:

    • Edit actions can be applied to tracks, segments, and waypoints when the file tree design is enabled.
    • Most edit actions (except Undo/Redo) can also be accessed via the context menu (right-click) on the specific file element.
    • Undo and Redo apply to all interface actions, but do not affect visibility options, application settings, or map navigation.
  6. How to contribute data to OpenStreetMap

    main

    gpx.studio uses OpenStreetMap data. If you notice errors or missing information on the map, you can propose changes directly to OpenStreetMap by following these steps:

    1. Navigate to the specific location on the OpenStreetMap map where you want to add or edit data.
    2. Use the Query features tool (on the right side) to inspect existing data.
    3. Click on the location using the right mouse button and select Add note here.
    4. Describe what is incorrect or missing in the note and click Add note to submit it.

    Your note will be reviewed by an experienced OpenStreetMap contributor who will perform the necessary updates. For more detailed information, visit the OpenStreetMap Wiki.

  7. Use the Minify tool to reduce GPS trace size

    main

    The Minify tool reduces the number of GPS points in a trace to decrease file size. It uses the Ramer–Douglas–Peucker algorithm to simplify the path.

    To use this tool:

    1. Access the Minify tool in the toolbar.
    2. Adjust the tolerance slider. This value represents the maximum distance allowed between the original trace and the simplified trace.
    3. Monitor the real-time feedback: the tool displays the number of points that will be kept and shows the simplified trace on the map as you adjust the slider.
  8. Extract tracks or segments from GPX files

    main

    The Extract tool allows you to split a GPX file containing multiple tracks into individual files, or split a single track containing multiple segments into a single file where each segment is its own track.

    Behavioral details:

    • File with multiple tracks: Applying the tool creates a separate new file for every track found in the source.
    • Track with multiple segments: Applying the tool creates a new track for each segment within the same file.
    • Points of Interest (POI): When extracting tracks from a file that also contains points of interest, the tool automatically assigns each POI to the track it is geographically closest to.
  9. Embed gpx.studio maps into your website

    main

    You can use gpx.studio to create interactive maps that display your GPX files and embed them directly into your own website.

    Requirements

    1. GPX files: These must be hosted on your server, on Google Drive, or accessible via a public URL.
    2. MapTiler key (Optional): You may need a MapTiler key to load MapTiler maps.

    Important: CORS Configuration

    To allow gpx.studio to fetch and load your GPX files from your server, you must configure Cross-Origin Resource Sharing (CORS) headers on your server to permit requests from the gpx.studio domain.