npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

merge-gpx-files-delf01

v1.1.3

Published

This package merges multiple gpx files into a single gpx file.

Downloads

3

Readme

image

Node version GNU License Documentation Test

Node module that merges multiple gpx files into a single gpx file.

Video installation

Demo video

Installation

  1. Install the module by typing the following command in the terminal console: npm install merge-gpx-files-delf01 --save

  2. Create a folder, in the root folder of the application, in which the multiple gpx files will be placed. The folder name must be configured in the settings object (step 5).

  3. Place multiple gpx files in the set directory. Here is a lot of gpx files routes examples: gpx files list

  4. Get the code in the example section and follow the next steps.

  5. Configure the name of the folder that will contain the multiple gpx files. Set the property called nameDirectoryGpxFiles of the settings object called paramsObj.

  6. Configure the name of the folder that will contain the merged single gpx file. Set the property called nameDirectorySingleGpxFiles of the settings object called paramsObj.

  7. Configures the merged gpx file name prefix. Set the property called nameSingleGpxFile of the settings object called paramsObj. The merge creates two files. A minified file whose name is formatted as follows: 'filename_UID.min.gpx' (ex: singleFile_972e9e14-f48e-4d63-abc7-5db6c99d2570.min.gpx) and an indented file whose name is formatted as follows: 'filename_UID. gpx' (ex: singleFile_972e9e14-f48e-4d63-abc7-5db6c99d2570.gpx).

  8. Configure file character encoding type (UCS Transformation Format). Set the property called 'encodageGpxFile' of the settings object called 'paramsObj'. By default leave utf8.

  9. Configure metadata settings object. Metadata is added to the merged gpx file. Set the property called 'encodageGpxFile' of the settings object called 'paramsObj'. Property: nameCreatorGpxFile => name of gpx file creator name, nameTrackGpxFile => track name, descriptionTrackGpxFile => description of the route, authorTrackGpxFile => track creator name, licenseTrackGpxFile => license, timeTrackGpxFile => date and time the file was created, keywordsTrackGpxFile => keywords, each keyword must be separated by a comma,

  10. Import the module const mergeGpxFilesDelf01 = require('merge-gpx-files-delf01');

  11. Pass the two parameter objects to the function and run the function let mergeSingleFile = await mergeGpxFilesDelf01.mergeGpxFiles(paramsObj, metaDataObj);

  12. The asynchronous function returns on a success an object containing the gpx file and the minified gpx file, both formatted as a string and on an error, a boolean false. Output -> On success => object => {minFile: minFileContentString, file: fileContentString}, On error => boolean => false

  13. The two merged files (indented and minified) is now in the results folder configured in step 6.

Use

Example 1

// NPM
const mergeGpxFilesDelf01 = require('merge-gpx-files-delf01');

// Params object
const paramsObj = {
    nameSingleGpxFile: `singleFile`,
    nameDirectoryGpxFiles: `gpx_files`,
    nameDirectorySingleGpxFiles: `single_files`,
    encodageGpxFile: `utf8`
}

// Metadata object
const metaDataObj = {
    nameCreatorGpxFile: `delf01`,
    nameTrackGpxFile: `Santiago to Nordkapp`,
    descriptionTrackGpxFile: `Pilgrims Route gpx file`,
    authorTrackGpxFile: `delf01`,
    licenseTrackGpxFile: `GNU General Public License`,
    timeTrackGpxFile: new Intl.DateTimeFormat('en-US', { dateStyle: 'full', timeStyle: 'long' }).format(new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738))),
    keywordsTrackGpxFile: `pilgrims, gpx, route, spain`
}

// Run function
mergeGpxFilesDelf01.mergeGpxFiles(paramsObj, metaDataObj);

Example 2

// NPM
const mergeGpxFilesDelf01 = require('merge-gpx-files-delf01');

// Params object
const paramsObj = {
    nameSingleGpxFile: `singleFile`,
    nameDirectoryGpxFiles: `gpx_files`,
    nameDirectorySingleGpxFiles: `single_files`,
    encodageGpxFile: `utf8`
}

// Metadata object
const metaDataObj = {
    nameCreatorGpxFile: `delf01`,
    nameTrackGpxFile: `Santiago to Nordkapp`,
    descriptionTrackGpxFile: `Pilgrims Route gpx file`,
    authorTrackGpxFile: `delf01`,
    licenseTrackGpxFile: `GNU General Public License`,
    timeTrackGpxFile: new Intl.DateTimeFormat('en-US', { dateStyle: 'full', timeStyle: 'long' }).format(new Date(Date.UTC(2020, 11, 20, 3, 23, 16, 738))),
    keywordsTrackGpxFile: `pilgrims, gpx, route, spain`
}

// Run async function
const runFunction = async () => {

    let mergeSingleFile = await mergeGpxFilesDelf01.mergeGpxFiles(paramsObj, metaDataObj);

    // Output
    // On success => object => {minFile: minFileContentString, file: fileContentString}
    // On error => boolean => false


    return mergeSingleFile;
}

runFunction();