ChizuPorttype
One airport or harbour: the fields a map needs, with its names in English and Japanese. A list is ordered by importance (an airport by passengers a year, a harbour by Natural Earth's size), the order marks win a crowded place in.
Import it
import type { ChizuPort } from "@johnmorrisdotca/chizu/airports";
Also exported from: @johnmorrisdotca/chizu/harbours, @johnmorrisdotca/chizu
Definition
type ChizuPort = {
id: string;
kind: "airport" | "harbour";
code?: string;
name: {
en: string;
ja?: string;
};
country: string;
lat: number;
lon: number;
tier: 1 | 2 | 3;
passengers?: number;
year?: number;
};
Members
| Name | Type | Description |
|---|---|---|
id | string | Stable and unique within its kind: an airport's lower-case IATA code ( |
kind | "airport" | "harbour" | |
code (optional) | string | undefined | An airport's IATA code ( |
name | { en: string; ja?: string; } | English, and Japanese where Wikidata has a label; a Japanese page prints the English name where there is none. |
country | string | Its country's ISO 3166-1 alpha-2 code, or Natural Earth's |
lat | number | Latitude in degrees, north positive. |
lon | number | Longitude in degrees, east positive. |
tier | 1 | 2 | 3 | 1 the largest. An airport's tiers end at its 150th, 300th and 600th by passengers; a harbour's at Natural Earth's size 4, 5 and the rest. |
passengers (optional) | number | undefined | An airport's passengers a year in |
year (optional) | number | undefined |
Examples
import type { ChizuPort } from "@johnmorrisdotca/chizu";
const haneda: ChizuPort = { id: "hnd", kind: "airport", code: "HND", name: { en: "Tokyo International Airport", ja: "東京国際空港" }, country: "JP", lat: 35.5523, lon: 139.7798, tier: 1 };
console.log(haneda.name.ja);
// 東京国際空港東京国際空港What it prints (run when this page was built)