Atlas · The Gambia / Methodologies
METHODOLOGIES

How features are assigned to countries

Point-in-polygon on Natural Earth borders, with nearest-country fallback; Global Mangrove Watch v4.1 carries its own labels.

Intermediate 1 min read countriesbordersNatural Earthmethod

Every feature in Atlas has a country so menus, dashboards and reports can be scoped correctly.

Global Mangrove Watch v4.1 polygons come with an ISO country code, which Atlas uses directly.

Everything else (WWF layers, v3 maps) is assigned like this:

  1. Take a representative point inside the feature (ST_PointOnSurface, always inside, even for odd shapes).
  2. If the point lies inside a Natural Earth country polygon, that is its country.
  3. Otherwise, take the nearest country within about 0.6° (roughly 60 km), because coastal mangrove often falls just outside a simplified coastline.
  4. The dataset's country is the majority among its features; datasets spanning several countries also list every country in their metadata.

Known limits

  • Natural Earth borders are generalised (1:50 million scale).
  • Disputed or very small territories can be misassigned. Example: Somaliland is not a separate country in the boundary set, so its mangrove belongs to Somalia (or, in the v3 maps, was attached to the nearest country such as Djibouti).
  • Island states with tiny polygons may fall off the generalised coastline.
Limits. Country labels support reporting, not legal boundaries. Atlas takes no position on borders.

Related reading

Guest preview · 171s left Explore until the timer ends. Then you’ll be asked to log in or create an account (about two minutes) to keep going.
Ask Atlas