Skip to content

chadbeaudin/street-sweep

Repository files navigation

StreetSweep

StreetSweep helps cyclists and runners explore new areas they have not previously ridden. Connect your Strava account to import all your rides which will be displayed on a single map to highlight areas you have not previously ridden. StreetSweep will then help you generate optimized routes, previously untraveled by you, with minimal backtracking. For the nerds out there, StreetSweep effectively solves the Chinese Postman Problem for custom bounding boxes.

Features

  • Interactive Map: Select your target area visually using a dynamic map interface (Leaflet).
  • Optimized Routing: Uses the Chinese Postman Algorithm to calculate the most efficient path to cover all streets.
  • Elevation Profiles: 3D elevation data for every route.
  • GPX Export: Download the generated route as a GPX file to use with Garmin, Wahoo, or other GPS devices.
  • Stack: Built with Next.js 14, TypeScript, and TailwindCSS for a fast, responsive user experience.

Getting Started

Prerequisites

  • Node.js 18+ installed on your machine.

Installation

  1. Clone the repository:

    git clone https://github.com/chadbeaudin/street-sweep.git
    cd street-sweep
  2. Install dependencies:

    npm install

Running Locally

Start the development server:

npm run dev

Open http://localhost:3888 in your browser.

  1. Move the map to center on the neighborhood you want to sweep.
  2. Click Generate Route.
  3. Wait for the graph processing to complete.
  4. View the route on the map and click Download GPX to save it.
npm run build
npm start

Elevation Data

StreetSweep uses a multi-provider fallback system to ensure reliable elevation data fetching:

  • Primary: Open Topo Data - Preferred for its accuracy and robust handling of point queries using various datasets (SRTM, NED).
  • Secondary: Open-Meteo - Acts as a high-capacity fallback. It is optimized with large-batch processing (up to 500 points per request) to minimize API overhead and avoid rate limits.

The system automatically switches providers if the primary is down or rate-limited, ensuring that your route always has accurate altitude information.

Tech Stack

License

This project is open source.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Languages