Skip to content

Pieohpah/gps-file-converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPS File Converter

About

gps-file-converter is a nodejs module that imports and exports geolocation files and strings. gps-file-converter is asynchronous when needed.

Supported formats are .gpx, .kml and GeoJSON

Installation

With npm do:

$ npm install gps-file-converter

Dependencies

Basic usage

Create an instance

const GFC = require('gps-file-converter')
const gfc = new GFC()

Then give it some input with in.gpx, a file of your choise...

gfc.importGeoFile('in.gpx')
.then(async(fileInfo) => {
    console.log(fileInfo)
    const content = gfc.getContent()
})
.catch(e => {console.log(e)})

Then you can for example export it as a .kml-file, out.kml

gfc.exportKML('out.kml')
.then(async() => {
    console.log('Saved to disk')
})
.catch(e => {console.log(e)})

Documentation

Disclaimer

gps-file-converter only supports waypoints, tracks and metadata concerning that. In kml-files the Placemark has to be directly on the map or in the first Folder.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published