Inspiration
GPS art generation involves runners/cyclers recording their GPS traces on the map to form artistic patterns and interesting objects.
What it does
GPSR takes in line drawings and provides an OSM interface for the user to select their desired location and zoom level. It will then generate the route superimposed on the map.
How we built it
We integrated folium endpoints containing the chosen route and location to a React.js frontend, where the user can perform all inputs and exports on a single page.
The image processing interface takes the line sketch or image following black/white thresholding to obtain pixel coordinates of the line traces. It uses the Ramer-Douglas-Peucker (RDP) algorithm to simplify the traced lines, reducing the number of points while maintaining the essential shape, and calculates arc lengths for optimization. These are then converted to real-world geographic coordinates based on the bounding box selected by the maps.
The route is then drawn using modified Dijkstra using Hausdorff distance with normalized cost (since node area of the OSM data is non-uniform). C(P,N,S,E) = (αC1 + β + γC3) * C2 where Parameters α, β, γ control the balance between getting closer to the end point, following the desired line segment and managing path length. Distance to end node (C1): Euclidean distance from next node to end Edge weight (C2): Euclidean distance between current and next node Line segment closeness (C3): Hausdorff distance between path segment and target line
After creating .gpx and html maps for the route, it is visualized on the map interface.
What's next for GPSR App
Implementing the means to optimize the coordinates of the route for best aesthetics. Through obtaining multiple routes within a larger area, it will make an estimate of the best visual fit to the submitted path.
Built With
- flask
- folium
- python
- react
- typescript
- vite
Log in or sign up for Devpost to join the conversation.