An open API service indexing awesome lists of open source software.

https://github.com/shreshthmohan/gpx-trail-analyzer


https://github.com/shreshthmohan/gpx-trail-analyzer

Last synced: about 2 months ago
JSON representation

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