Reference
The data door: hand the package your own maps of the Earth or orbit data as a source with its own licence and credit, and see whose data is on the screen
import { … } from "@johnmorrisdotca/chikyu-earth/door";
Exports
| Name | Kind | What it is |
|---|---|---|
BitmapLike | type | What a picture needs of its bitmap: an ImageBitmap fits. |
createSourceBook | function | Makes the sources of one view. |
createTileStore | function | A tile store for a view: loads the tiles of every source by key and keeps them under one budget of bytes (default 48 MB, all sources together). |
Credit | type | One source's part in the last drawn frame. |
creditLine | function | The credit line for what a view drew: each source's credit with its licence name, and "non-commercial" or "share-alike" whenever the source says so, so a page cannot hide the terms of the data it uses. |
creditsOf | function | The credits of a view for the last drawn frame: the package's own first, then the sources a caller added, each with the marks or tiles it gave; a source that gave none is left out. |
DataSource | type | Either kind of source. |
DEFAULT_LEVELS | constant | The levels a source has when it does not say: levels 3 and 4 (8192 and 16384 pixels across), the two the package's cutter makes beyond its own 4096 pixel picture. |
EarthMapPlace | type | The place a map source is asked about: the family's MapPlace in degrees (longitude from lonMin to lonMax, which may pass 180 and is at most a whole turn, latitude from latMin to latMax), and the layer it is for. |
EarthMapSource | type | A source of the Earth's map in tiles for one layer (or every layer of a folder): a TileSource of the family's map shape (the place is a MapPlace, the detail is the pixels across the whole circumference, a tile is an ImageTile) that says which layer it is for. |
earthTiles | function | The package's own finer map tiles as a source: a folder with a manifest.json and a tile for each layer, level and place at <layer>/<level>/<column>/<row>.webp (made by scripts/make-earth-tiles.py). |
EarthTilesOptions | type | What earthTiles takes. |
ElementRecordSource | type | A source of satellites' orbital elements: a list that fits in memory (at most 200,000 sets), read once when the source is added, each an ElementSet. |
ElementSetsRead | type | What readElementSets found: the frozen element sets that can be used, and skipped, the ones left out for a number that is not finite, a name that is not text or an orbit that is not an ellipse. |
elementsFrom | function | A source of element sets read from an address of your choosing, with whose data it is. |
GIBS_CREDIT | constant | The acknowledgement NASA asks a client to show, in their words (English, read 2026-11-13). |
GIBS_ID | constant | The id of the source gibsTiles makes. |
GIBS_SLOW_MS | constant | How long a tile is given to arrive before the coarser picture is left as it is and the tile is not asked for again while it stays in view. |
gibsGrid | function | The Geographic (EPSG:4326) tile matrix NASA's imagery service publishes, read from its capabilities on 2026-11-13. |
gibsTiles | function | A map source that reads NASA's imagery service directly. |
GibsTilesOptions | type | What gibsTiles takes. |
gridKey | function | The key of the tile that holds a point, [<prefix>]level/column/row, or undefined when no tile holds it. |
gridKeys | function | The keys of the tiles that cover a place at a detail. |
gridLevelFor | function | The level of a grid whose width is at least detail pixels across a full turn, or the finest level when none is, or undefined when the grid has no level wider than minWidth. |
gridOnEarth | function | The part of a tile that lies on the Earth, or undefined when the tile misses the Earth entirely. |
gridPastExtent | function | True when the tile runs past the Earth's extent (a coarse level's tile is wider than the Earth). |
gridSpan | function | The longitude and latitude a tile covers, before it is cut to the Earth. |
gridTileAt | function | The column and row of the tile that holds a point, or undefined when the point is off the Earth or the tile that would hold it misses the Earth. |
imageBytes | function | What a decoded picture holds in memory, with its mipmaps (4/3 of its bytes): the bytes of a map source. |
ImageTile | type | A map tile: its size in pixels and its picture. |
Licence | type | A licence: its name and a link are always shown beside the credit. |
loadRecords | function | Reads a record source once, when it is added: the list is frozen, a record with a non-finite number (a NaN or an infinity in any number finite names) is skipped and counted, and a list over MAX_RECORDS is refused whole (bigger data must be tiles). |
MapGrid | type | The grid a map source declares when it is not the package's pyramid: the tile size, the Earth's extent in degrees, and one entry per level. |
MapGridLevel | type | One level of a source's own grid. |
mapKeys | function | The keys of the tiles that cover a place at a detail, on the package's pyramid: the level is the lowest whose width is at least detail pixels round (or the finest there is), and the tiles are every one the place touches. |
MapLayer | type | What a map source draws: day and night are the Earth's pictures, which the realistic Earth lays tiles over; clouds and water are the door's for the whole-Earth layers they are, which the package does not tile or draw yet. |
MapPlace | type | A piece of a map, in degrees: longitude and latitude (right ascension and declination for the sky). |
MAX_IN_FLIGHT | constant | The most loads in flight at once for one source. |
MAX_RECORDS | constant | The most records a record source may hold. |
mergeElementSets | function | The element sets of several lists as one, one set for each satellite: where two lists have the same NORAD number the set with the newer epoch wins, and a tie goes to the list that came first. |
OWN_SOURCES | constant | The package's own data, as sources, written from the rows of NOTICE.md: chikyu-pictures (the whole-Earth pictures of the realistic Earth: day, night, clouds and water) and chikyu-tiles (the finer map tiles cut from NASA's bigger maps). |
ownCredit | function | The credit of one of the package's own sources, for a page that draws something itself: the elements credit their own pictures and tiles in credits(), and a page that draws the Earth from the package's pictures puts ownCredit("chikyu-pictures", 1) in its credit line. |
packedElementsFrom | function | A source of element sets read from a packed catalogue file (packCatalogue, gzipped or not) at an address you choose: up to 200,000 objects, six-digit catalogue numbers included. |
PackedElementsOptions | type | What packedElementsFrom can be told. |
previousUtcDay | function | The UTC day before ms. |
readElementSets | function | Reads a source of element sets once: the list is frozen, a set that cannot be used is left out and counted, and a list of more than 200,000 is refused whole. |
readPackedFrom | function | Ask an address for a packed catalogue file once and read it. |
RecordSource | type | A list that fits in memory (at most MAX_RECORDS records; bigger data must be tiles). |
RecordsRead | type | What loadRecords found. |
samplesAreBlank | function | True when every sampled pixel is black, which is the picture the service returns for a day it has no swath for (a 200, not a 404). |
SourceBook | type | A view's sources, as <chikyu-earth-realistic> and <chikyu-passes> keep them: addSource, removeSource, enableSource and ownOnly are the element's methods of the same names. |
SourceBookOptions | type | Options of a view's source book. |
SourceInfo | type | What a source says about itself. |
SourceStats | type | What a view's sources have done: for each record source how many records it holds and how many were left out. |
TILE_BUDGET_BYTES | constant | The default budget for decoded tiles in a view, all sources together: 48 MB (a picture counts with its mipmaps, 4/3 of its bytes). |
tileKeyParts | function | The level, column and row a tile key ends in, or undefined for a key that does not end in three numbers. |
TileLoader | type | The part of a tile source the store uses. |
tilePlace | function | The place a tile covers, in degrees: what a view asks a source about to get that tile's key. |
TileSource | type | Data cut by place and by detail. |
TileStats | type | What a tile store has done. |
TileStore | type | A tile store: tiles by source and key, under one byte budget. |
TileStoreOptions | type | Options for createTileStore. |
utcDay | function | The UTC day yyyy-mm-dd of a moment. |
validateSource | function | Refuses a source that cannot be shown honestly: it throws a TypeError at once, when a source is added, not at the first draw. |
wrapLon | function | Fold a longitude into the half-open range from -180 up to, but not including, 180. |