https://github.com/mohamedelhefni/gpx-parser
library for parsing gpx files
https://github.com/mohamedelhefni/gpx-parser
geojson gpx javascript json
Last synced: 6 months ago
JSON representation
library for parsing gpx files
- Host: GitHub
- URL: https://github.com/mohamedelhefni/gpx-parser
- Owner: mohamedelhefni
- Created: 2022-08-16T14:37:57.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-08-20T10:32:39.000Z (almost 4 years ago)
- Last Synced: 2024-03-27T23:42:44.557Z (over 2 years ago)
- Topics: geojson, gpx, javascript, json
- Language: JavaScript
- Homepage:
- Size: 103 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GPX Parser
a library for parsing gpx files and extract data that provide functionalities
* extract gpx metadata and waypoints
* extract tracks and routes with points and total distance of the route
* convert the gpx to geojson
## Install
`npm i gpxtojs`
## Usage
```js
const gpxtojs = require("gpxtojs")
const gpx = new gpxtojs.GPXParser();
gpx.parse(gpxString)
gpx.getMetadata()
gpx.getWaypoints()
gpx.getTracks()
gpx.getRoutes()
```
### Convert to Geojson
```js
gpx.toGeoJson()
```