Skip to content

country-boundaries

Natural Earth's world country borders, which let Navit's address search find towns

What it does

Installs one file, the 1:10m admin-0 countries of Natural Earth v5.1.2 (about 13.3 MB of GeoJSON), under /usr/local/share/hammunition/data/country-boundaries/. It is the outline of every country in the world at a scale of about 1 km. Nothing reads it directly: osm-navit uses it when it converts your map regions for Navit.

Why you would want it

Without it, Navit's address search finds almost nothing on a map of one US state or any other part of a country. maptool, which builds Navit's maps, sorts every town under its country by testing it against the country's border, and a part-of-a-country extract only has part of that border. With this file merged in first, the towns land under their country, with their state and county, and search by town, street and house number works. The alternative is downloading the whole country's map (12.2 GB for the US) for the sake of its border.

Before it will work

Nothing. It is installed as a dependency of osm-navit, in the navigation profile.

How it installs

  • data (Public domain (Natural Earth's terms of use), https://www.naturalearthdata.com/about/terms-of-use/): https://raw.githubusercontent.com/nvkelso/natural-earth-vector/f1890d9f152c896d250a77557a5751a93d494776/geojson/ne_10m_admin_0_countries.geojson (13,287,234 bytes)

Known problems

The borders are coarse, about 1 km at 1:10m, so a few places close to a national border can fall on the wrong side of it. The conversion runs maptool with -U, so those are still found, under the pseudo-country "* Unknown" in Navit's country list. A handful of places at the edges of a state extract, in the neighbouring states, are filed under their country with no state, because those states' own borders are incomplete in the extract. Natural Earth draws de facto borders, which is its own stated policy (https://www.naturalearthdata.com/about/disputed-boundaries-policy/), not Hammunition's judgement. Installed as a plain file, mode 0644, root-owned.

Keeping it current

  • probe: none
  • strategy: reinstall
  • Natural Earth releases rarely (v5.1.2 was 2022). A new release is a new tag on github.com/nvkelso/natural-earth-vector: pin its commit in the URL, download the file, measure its sha256 and size, and bump all three with version. Country borders move seldom, so there is no hurry.

Where to get help with the software itself

Natural Earth's issue tracker on GitHub (https://github.com/nvkelso/natural-earth-vector/issues) for problems in the data itself.

Source: catalog/packages/country-boundaries.yaml