The country borders
RomboRide counts the countries you ride in, for your flags and some of your badges. Here is where those borders come from, exactly how we make them, and where to download them.
Where they come from
The borders are our own copy of the national boundaries in OpenStreetMap, the map its contributors make together. They are © OpenStreetMap contributors and available under the Open Database License (ODbL 1.0). The shapes we make from them are a derivative database under the same licence.
They cover the 202 countries the app has a flag for, Kosovo included. A ride outside them counts for no country.
How we make them
Every step below is in the file too, in a form a computer can read: the relation of each country, the time of the copy, the tolerances, the pairs and the boxes.
- We copy each country's national boundary from OpenStreetMap in one sitting: one relation per country (boundary=administrative, admin_level=2), matched to its country by our own table, never by its tags. Kosovo's is XK. Palestine's is the one disputed boundary OpenStreetMap gives its code (boundary=disputed).
- We simplify each border line once, with the Douglas-Peucker method and its two ends fixed, so that two neighbours share it exactly: to within 25 metres to count a ride, and to within 500 metres to draw the map.
- We draw some ground exactly as we count it, at 25 metres: Kosovo and the smallest countries (Andorra, Gibraltar, Guernsey, the Isle of Man, Jersey, Liechtenstein, Monaco, San Marino and the Vatican), every part of a country smaller than 50 square kilometres, such as Büsingen or Llívia, and all ground two neighbours both claim.
- Where two boundaries claim the same ground, it belongs to neither country, except in Kosovo: its ground is always Kosovo.
- We do not cut the shapes at the coast, so a border runs out to sea. Where a country's border also takes in ground with a flag of its own, that ground counts for no country: France, the Netherlands and Norway count with their European ground only, the United States without Puerto Rico, Guam and its other territories, and Australia without Christmas Island, the Cocos Islands, Norfolk Island and Heard Island.
- A country counts for your flags on a day when your recorded rides that day cover at least 1 km in it, measured along the line you rode. Imported rides add no flag.
Download
The shapes the app draws, exactly as it draws them, are one GeoJSON file in WGS 84, with the version of the borders, the credit and the method inside it. Kosovo is XK in it, as everywhere in RomboRide.
Download the country borders (GeoJSON, about 4.5 MB)The file changes when we copy the borders again or change how we make them. Its version names the day of the copy, followed by a short code for how they were made.