Reference · The realistic Earth's pure parts
CountrySpotstype
The countries ready to be named: for each, its code and names, and points spread evenly over its land (longitude, latitude, the area each stands for in square degrees of the sphere, and which of the country's polygons it is in), with the cap of the sphere they all lie in.
Import it
import type { CountrySpots } from "@johnmorrisdotca/chikyu-earth/realistic";
Definition
interface CountrySpots {
countries: {
code: string;
name: {
en: string;
ja?: string;
};
points: Float32Array;
cap: {
lon: number;
lat: number;
reach: number;
};
}[];
}
Members
| Name | Type | Description |
|---|---|---|
countries | { code: string; name: { en: string; ja?: string; }; points: Float32Array; cap: { lon: number; lat: number; reach: number; }; }[] |
Examples
import { countrySpots, type CountrySpots } from "@johnmorrisdotca/chikyu-earth/realistic";
const spots: CountrySpots = countrySpots({ features: [] });
console.log(spots.countries.length);0What it prints (run when this page was built)