Skip to the content

Chikyu Earth地球

A line-drawn globe of the world's countries that turns at the Earth's own rate, with an optional realistic Earth from space and markers for any place.

Chikyu is the Japanese word 地球 for the Earth. About the name

Contents

Reference · Printable sheets: the globe and a world map to colour, my country, day and night, the seasons

thickPathfunction

A d3-geo path made fit for a thick line: simpler to within toleranceMm, loops whose longest side is under minLoopMm left out, corners rounded.

Import it

import { thickPath } from "@johnmorrisdotca/chikyu-earth/sheets";

Definition

function thickPath(d: string, toleranceMm: number, minLoopMm: number): string

Parameters

NameTypeDescription
dstring

The path as d3-geo's geoPath writes it, in millimetres.

toleranceMmnumber

How far the simpler line may stray from the real one.

minLoopMmnumber

The smallest island, by its longest side, that is kept.

Returns

string

The path.

Examples

import { thickPath } from "@johnmorrisdotca/chikyu-earth/sheets";

console.log(thickPath("M0,0L5,0.1L10,0L20,0", 0.5, 0));
M0 0L20 0

What it prints (run when this page was built)

View sourceEdit on GitHubMade from the source of @johnmorrisdotca/chikyu-earth 0.51.1.