Skip to the content

Chizu地図

Draw SVG maps of the world, its 253 countries and the regions of 33 of them, frame them, place numbered callouts and build geography quizzes, with names in English and Japanese today (Spanish, German and Chinese are planned).

Chizu is the Japanese word 地図 for map. About the name

Contents

Reference · /airports

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

NameTypeDescription
idstring

Stable and unique within its kind: an airport's lower-case IATA code (hnd), else its ICAO code; a harbour's name as a slug (yokohama). The drawing's data-port.

kind"airport" | "harbour"
code (optional)string | undefined

An airport's IATA code (HND), else its ICAO code; none for a harbour.

name{ en: string; ja?: string; }

English, and Japanese where Wikidata has a label; a Japanese page prints the English name where there is none.

countrystring

Its country's ISO 3166-1 alpha-2 code, or Natural Earth's SOL (Somaliland) or CYN (Northern Cyprus), which have none.

latnumber

Latitude in degrees, north positive.

lonnumber

Longitude in degrees, east positive.

tier1 | 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, where Wikidata has it.

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)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chizu 1.17.0.