More than a month into the full-scale Russian invasion, and hard to imagine how life changed dramatically in one night. It’s hard to believe there was a luxury to do recreational orienteering in the forests. That’s where an idea came to me: why not to record some tracks on mobile phones, take a photo of the map and align the tracks on the map. That’d be a race to explore. Moreover, it turned out that the club shares the maps in good resolution, so no need to take photographs. But the map should still be aligned with the GPS coordinates. That’s how the project gpx-race emerged.
Finally, when the four markers are aligned on both the image and the OSM map, a perspective projection can be calculated to orient the orienteering map properly. The final result can be downloaded as a standalone HTML page.
A lot can be improved in the application both in the functionality and the UX. For instance, some especially older maps aren’t particularly accurate and may need piecewise affine transform to align by more than four points. But that’s low priority now, unfortunately.