Skip to content

Latest commit

 

History

History
89 lines (55 loc) · 4.04 KB

README.md

File metadata and controls

89 lines (55 loc) · 4.04 KB

Country masks

Install

pip install https://github.com/ISI-MIP/isipedia-countries/archive/master.tar.gz

World map

Country examples

Which data?

  • "inclusive" binary masks (border cells might belong to several countries). Any grid cell touched by a country polygon is marked as belonging to the country. Grid cells located on a border shared by several countries will be marked as belonging to all bordering countries. File list:

  • "exclusive" binary masks (one country per cell, but some grid cells might be left without country). The grid cell center must be inside the country polygon to be marked as belong to the country. A grid cell can belong to only one country (provided the polygons do not overlap, which, unfortunately, is not guaranteed). Some grid cells on the coastline might be left out (especially tiny islands at coarse resolution, e.g Tuvalu is empty at 0.5 degrees resolution). The source dataset GAUL may present spurious overlaps between countries. To ensure exclusivity, the masks are further edited by removing overlapping pixels, with precedance according to alphabetical order (first country in the list takes the pixel). This amounts to less than 1%, and more generally of the order of 0.01% of all grid cells for a country mask. File list:

  • fractional mask:

  • Country shape files are present as:

    • one world dataset countrymasks.geojson
    • split up for every territory e.g. country_data/AFG/country.geojson

How the country masks were derived?

Vector data

Shape files downloaded from ASAP-GAUL:

The shapefiles were futher processed and corrected thanks to Natural Earth 10m data v5.0.1.

List of changes from ASAP-GAUL:

  • West Bank and Gaza Strip merged into Palestine, State Of (PSE), according to UN, ISO, WB

  • Added missing isocodes based on ISO website:

    • Reunion (REU)
    • Saint Pierre et Miquelon (SPM)
    • Saint Vincent and the Grenadines (VCT)
  • Attach small disputed territories to larger neighbour, consistently with Natural Earth polygons

    • Abyei >>> Sudan
    • Aksai Chin >>> China
    • Arunachal Pradesh >>> India
    • China/India >>> India
    • Hala'ib triangle >>> Egypt
    • Ilemi triangle >>> Kenya
    • Ma'tan al-Sarra >>> Sudan
  • Jammu and Kashmir split and attached to India and Pakistan, according to Natural Earth 10m v5.0.1 polygons

  • Remove obsolete territories:

    • Netherlands Antilles (ANT) -- now partly independent since 2010
  • Deleted smaller territories:

    • Kingman Reef
    • Kuril islands
  • add small island groups from Natural Earth 10m v5.0.1 polygons (many more are provided)

  • West Bank and Gaza Strip merged into Palestine, State Of (PSE), according to UN, ISO, WB

Binary and fractional masks

Both binary and fractional masks were derived from the vector data thanks to rasterio.mask.geometry_mask See the code geojson_to_grid.py for details.