View source: R/importConstellations.R
| importConstellations | R Documentation |
Read custom line connections for use in a sky sketch.
importConstellations(file, set = "custom")
file |
Path to a Stellarium legacy constellationship.fab text file. |
set |
Label for this collection, default "custom". |
Each non-comment line contains a unique figure identifier, the number of segments, then two Hipparcos numbers per segment. Endpoints describe separate pairs, not one continuous polygon. Blank lines and comments beginning with a hash are ignored. Non-negative segment counts and positive integer HIP identifiers are validated. Zero-segment records are retained with an empty HIP field and skipped when drawn. Repeated endpoints represent a single-star figure, drawn as a small ring. This supports Stellarium's legacy constellationship.fab format, not the JSON sky-culture format introduced in Stellarium 25.1. Only lines are imported, not artwork, labels, boundaries or star positions. Endpoint stars must be in skyscapeR's stellar catalogue; unavailable stars produce warnings when drawn. The import does not modify the bundled catalogue or register global names. Save the returned object with saveRDS(), or load the file in each script. Respect the source sky culture's attribution and redistribution terms.
A data frame with the same columns as constellations, accepted by
the display$constellations setting of sketchSky or the
constellations argument of planisphere. Subset rows to select individual figures.
Stellarium User Guide, Adding Sky Cultures (legacy editions) and Sky Cultures (current editions): https://stellarium.org/guide/. Legacy example: https://github.com/Stellarium/stellarium/blob/v0.22.2/skycultures/western/constellationship.fab.
sketchSky, constellations
file <- tempfile(fileext=".fab")
writeLines("MyFigure 2 27989 25336 25336 25930", file)
figures <- importConstellations(file)
unlink(file)
figures[, c("name1", "HIP")]
## Not run:
sky <- sketchSky(malta_horizons[[1]], time="2026/12/21 20:00",
timezone="UTC",
display = list(constellations = figures))
plot(malta_horizons[[1]], sky=sky)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.