https://github.com/shreshthmohan/gpx-trail-analyzer
https://github.com/shreshthmohan/gpx-trail-analyzer
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/shreshthmohan/gpx-trail-analyzer
- Owner: shreshthmohan
- Created: 2025-03-14T13:01:33.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-14T14:12:13.000Z (over 1 year ago)
- Last Synced: 2026-04-15T20:08:28.656Z (2 months ago)
- Language: TypeScript
- Homepage: https://gpx-trail-analyzer.vercel.app
- Size: 74.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# GPX Trail Analyzer
A web application that lets you upload GPX files and analyzes them to calculate distance, elevation gain, and other metrics.
## Features
- Upload GPX files through a user-friendly interface
- Interactive map display of the trail using Mapbox
- Calculate accurate trail distance using the Turf.js geospatial library
- Measure elevation gain and other elevation statistics
- Display results in both metric and imperial units
- Fast processing using Vercel Edge Functions
- Fully responsive design
## Tech Stack
- **Frontend**: Next.js, React, Tailwind CSS
- **Backend**: Vercel Edge Functions
- **Libraries**: gpxparser, @turf/turf, Mapbox GL JS
## Local Development
1. Clone the repository
2. Install dependencies:
```bash
npm install
```
3. Set up environment variables:
- Copy `.env.example` to `.env.local`
- Get a Mapbox access token from [Mapbox](https://account.mapbox.com/)
- Add your token to `.env.local`
4. Run the development server:
```bash
npm run dev
```
5. Open [http://localhost:3000](http://localhost:3000) in your browser
## Deployment
This application is ready to deploy on Vercel. See the [deployment instructions](./DEPLOYMENT.md) for detailed steps.
## Optional Enhancements
- **Elevation Chart**: Add visualization of the elevation profile using a chart library
- **Multiple File Support**: Extend the application to compare multiple GPX files
- **Custom Map Styles**: Add support for different Mapbox map styles (satellite, terrain, etc.)
## Credits
- [gpxparser](https://github.com/Luuka/GPXParser.js) - For GPX file parsing
- [Turf.js](https://turfjs.org/) - For geospatial calculations
## License
MIT