Administrative units/azimuthal equidistant projections datasets

The datasets provided here are collections of OpenStreetMap relations representing administrative units, that is, being tagged with type=boundary, boundary=administrative, adminlevel=*. Each collection divides the earth’s land mass into units of a specific maximum diameter. Here diameter of a unit is the diameter of the unit’s smallest enclosing circle. Next to OSM IDs other information like name, admin_level, center and radius of smallest enclosing circle are included.

The intent of these datasets is to allow for (Euclidean) distance measurements in projected maps of administrative units with uniformly bounded error (compared to real-world distance). The center of the smallest enclosing circle corresponds to the optimal origin for an azimuthal equidistant projection of the unit. Given the radius of the smallest enclosing circle one may estimate the maximum error in distance measurements on such maps (see below for details).

The CSV files provided below also contain parent units, that is, larger administrative units which got further divided into smaller ones. To extract smallest units only, discard all rows with osm_id value not appearing as parent_osm_id in any other row. Following Python code may be used:

import pandas as pd

patches = pd.read_csv('au_aep_2200.csv', index_col=0, keep_default_na=False)

patches['is_parent'] = False
for i in patches.index:
    parent_id = patches.loc[i, 'parent_osm_id']
    if parent_id != 0:
        patches.loc[parent_id, 'is_parent'] = True

leaves = patches.loc[~patches['is_parent'], :]

leaves.to_csv('leaves.csv')

Note the keep_default_na=False in the code. Without that Pandas will interpret Namibia’s country code NA as missing value!

Datasets below have been generated with div4aep Python script. You may use that script to generate customized datasets.

Maximum diameter 2200 km

au_aep_2200.csv

The image shows coverage and division into administrative units. Click the image to get an interactive map (350 MB of HTML/JavaScript, this may crash your browser).

Coverage and administrative units for diameter 2200 km

The relative error in distance measurements w.r.t. great circle distance is 0.5%. The overall relative error is about 1.0% (see below for details).

Number of administrative units is 1220 plus 49 parent units.

5 units exceed the 2200 km bound on the diameter, because further subdivision wasn’t possible from OSM data:

Maximum diameter 3200 km

au_aep_3200.csv

The image shows coverage and division into administrative units. Click the image to get an interactive map (270 MB of HTML/JavaScript, this may crash your browser).

Coverage and administrative units for diameter 3200 km

The relative error in distance measurements w.r.t. great circle distance is 1.0%. The overall relative error is about 1.5% (see below for details).

Number of administrative units is 673 plus 26 parent units.

3 units exceed the 3200 km bound on the diameter, because further subdivision wasn’t possible from OSM data:

Maximum diameter 5000 km

au_aep_5000.csv

The image shows coverage and division into administrative units. Click the image to get an interactive map (200 MB of HTML/JavaScript, this may crash your browser).

Coverage and administrative units for diameter 5000 km

The relative error in distance measurements w.r.t. great circle distance is 2.5%. The overall relative error is about 3.0% (see below for details).

Number of administrative units is 421 plus 13 parent units.

No units exceed the 5000 km bound on the diameter, because further subdivision wasn’t possible from OSM data.

Estimating the distance error

The deviation of real-world distances from Euclidean distances on maps obtained from azimuthal equidistant projections can be decomposed into three components:

OSM coordinates induce a worst case error of about 1 cm, thus can be neglected here.

Replacing the WGS84 ellipsoid by a sphere induces a worst case relative error of about 0.5%. See Sphere to Spheroid Comparisons (Journal of Navigation, 2006, 59(3):491-496) for a derivation of this value.

The worst case relative projection error can be computed from the radius of the smallest enclosing circle of the region of interest by

1-R/r*sin(r/R)

where R=6371009 and r is the enclosing circle’s radius.

plot of relative error vs. circle diameter

The overall error is the product of 1.05 and 1+e with e being the relative projection error.