CountryShapetype
One country as the sheets draw it: its names, its continent, its land as one feature and the names of the countries it touches.
Import it
import type { CountryShape } from "@johnmorrisdotca/chikyu-earth/sheets";
Definition
interface CountryShape {
name: string;
ja: string;
alpha2: string | null;
continent: ContinentId;
feature: Feature<MultiPolygon>;
neighbours: {
name: string;
ja: string;
}[];
}
Members
| Name | Type | Description |
|---|---|---|
name | string | |
ja | string | |
alpha2 | string | null | |
continent | ContinentId | |
feature | Feature<MultiPolygon, GeoJsonProperties> | The main land and the nearby islands as one feature. |
neighbours | { name: string; ja: string; }[] | The names of the countries it shares a border with, English and Japanese. |
Examples
import { countryShape, type CountryShape } from "@johnmorrisdotca/chikyu-earth/sheets";
const spain: CountryShape | undefined = countryShape("ES");
console.log(spain?.neighbours.map((one) => one.name));[ 'France', 'Portugal' ]What it prints (run when this page was built)