import { type Arena, type ArenaSource } from "./arenas.core.ts"; import { type Box, type Pt, type RealBowl } from "./crowd.ts"; /** The credit the ODbL asks for, wherever a drawing made from OpenStreetMap's data is shown. */ export declare const VENUE_ATTRIBUTION = "(c) OpenStreetMap contributors, ODbL 1.0, openstreetmap.org/copyright"; /** How a fact is known: `documented` is what a source cited with it says; `plausible` is ours, for a bowl no source describes. */ export type VenueBasis = "documented" | "plausible"; /** The kinds of roof the venues have: `fixed` is a lid over the bowl, `saddle` a roof that rises at two opposite points of its rim and falls at the two between (the Scotiabank Saddledome's), `barrel` a barrel vault along the rink, a round arch over its short axis (the American Airlines Center's). */ export type VenueRoof = "fixed" | "saddle" | "barrel"; /** The NHL's divisions, in the order of the league's own listing: the Western Conference's two, then the Eastern's. A division none of whose arenas has a venue yet has no venues in `venuesIn`. */ export declare const VENUE_DIVISIONS: readonly ["pacific", "central", "atlantic", "metropolitan"]; export type VenueDivision = (typeof VENUE_DIVISIONS)[number]; /** The NHL's two conferences, and the divisions of each. */ export declare const VENUE_CONFERENCES: { readonly western: readonly ["pacific", "central"]; readonly eastern: readonly ["atlantic", "metropolitan"]; }; export type VenueConference = keyof typeof VENUE_CONFERENCES; /** The facts of a venue: the seats and the number of seating levels and the kind of roof, each with what a source says. No text of an article is kept. */ export interface RealVenueData { /** The key of the arena in `ARENAS`: `honda-center`. */ id: string; /** The Wikidata item of the arena. */ wikidata: string; division: VenueDivision; /** The English Wikipedia article the facts that are not Wikidata's were read from, at a revision. */ en: ArenaSource; seats: { /** The seats for ice hockey: Wikidata's where its item gives a figure for ice hockey (`wikidata`), else the article's (`wikipedia`). */ hockey: number; source: "wikidata" | "wikipedia"; /** Wikidata's own capacity (P1083), kept beside it: it is often for another event, or an older year; `null` where the item gives none (the Little Caesars Arena's, the UBS Arena's). */ wikidata: number | null; /** What was read, in a few words of ours. */ read: string; }; tiers: { /** The seating levels (bowls), with the suites and the clubs that lie between them counted as walks, not tiers. */ count: 1 | 2 | 3; basis: VenueBasis; /** The share of the seats that are in the lowest tier, where a source gives it. */ lowerShare?: number; read: string; }; /** The building's lower band, a podium under the upper levels: its height in feet and how it is known (ours where the sources do not say). */ facade?: { podium: number; unit: "ft"; basis: VenueBasis; read: string; }; roof: { kind: VenueRoof; basis: VenueBasis; read: string; /** A long skylight over the middle of the roof, closed in round it: drawn where the venue says so (ours). */ skylight?: boolean; /** * A `saddle` roof's measure: the compass bearing of the line through its two high points (degrees clockwise from north, 0 up to 180: a line has two ends), and the height of the high points and of the low rim over the surface, in feet. Measured on * photographs of the building taken from known places, with the outline's own bulge at the end of the line; the heights are ours, as accurate as a photograph allows. `read` says what each was taken from. */ saddle?: { bearing: number; low: number; high: number; read: string; }; }; /** A bowl the sources describe as other than the usual: a round plan (the Saddledome's), and the rise of each tier in feet where it is not the usual (ours, from photographs). */ bowl?: { round?: boolean; rises?: [number, number]; read: string; }; } /** What OpenStreetMap gave of a venue: ODbL 1.0 data, "(c) OpenStreetMap contributors". */ export interface VenueOsm { /** The element the outline is: `way/120623151`. */ source: string; /** The day it was read and the time of the OpenStreetMap data the answer was made from. */ read: string; base: string; licence: "ODbL-1.0"; attribution: string; /** The building's height in metres, where OpenStreetMap maps one. */ height?: number; /** The building's outline as `[longitude, latitude]`, not repeating its first point. */ ring: [number, number][]; /** The ice, where OpenStreetMap maps it inside the building: the element and its outline. */ ice?: { source: string; ring: [number, number][]; }; /** * How the rink lies, worked out when the data was made: the heading of its long side (degrees clockwise from north, 0 to under 180), how that is known (`mapped`: from the ice OpenStreetMap maps; `building`: from the long * axis of the building's main hall, the largest rectangle that fits its outline, which a rink usually follows, an inference; `none`: the building has no direction, 90 is stood in), how much of a direction the building has * (`strength`, 1 for a round one) and how much longer than wide its main hall is (`elongation`), and the middle of the ice or of the main hall as `[longitude, latitude]`. */ axis: { heading: number; basis: "mapped" | "building" | "none"; strength: number; elongation: number; centre: [number, number]; }; } /** A venue: its facts and what OpenStreetMap gave. */ export interface RealVenue extends RealVenueData { osm: VenueOsm; } /** How the rink lies in the building: its long side's heading (degrees clockwise from north, 0 to under 180), how that is known, and the way north points on the page (degrees clockwise from the top). */ export interface VenueOrientation { heading: number; /** `mapped`: from the ice OpenStreetMap maps in the building. `building`: from the building's long axis, which a rink usually follows (an inference). `none`: the building is near round, nothing is known, the plan has north at the top. */ basis: "mapped" | "building" | "none"; north: number; } /** * The real venues held for the drawing, by key: every venue in the entries that have always had them (the full table, `venues.all.ts`, fills it), and in the lean district the venues `loadVenueDataFor` has read. Do not write to it. * @example * ```ts * import { VENUES } from "@johnmorrisdotca/kyogijo-stadiums/venues"; * console.log(VENUES["honda-center"].seats.hockey); * // 17174 * ``` */ export declare const VENUES: Readonly>; /** Hold venues for the drawing, from their facts and what OpenStreetMap gave (the same key in each): a later one with a key replaces the earlier. Returns the venues as held. */ export declare function registerVenues(data: readonly RealVenueData[], osm: Readonly>): RealVenue[]; /** The keys of `VENUES`, in the order of the data. */ export declare const VENUE_IDS: readonly string[]; /** A venue by its key, read from its two files (the facts, and what OpenStreetMap gave) the first time and held for the drawing after: asking again gives the same promise. A key that is not a venue rejects, naming the keys there are. */ export declare function loadVenue(id: string): Promise; /** The venue of an arena (by its key in `ARENAS`), or `undefined` for an arena that has none. A venue that has not been read yet (the lean district reads them with `loadVenueDataFor`) throws, saying so. */ export declare const venueById: (id: string | undefined) => RealVenue | undefined; /** The venue whose arena is the Wikidata item `Q774138`, or `undefined`. */ export declare const venueByWikidata: (wikidata: string | undefined) => RealVenue | undefined; /** The venues of a division of the NHL, in the order of the data. */ export declare const venuesIn: (division: VenueDivision) => RealVenue[]; /** The conference a division of the NHL is in. */ export declare const conferenceOf: (division: VenueDivision) => VenueConference; /** The venues of a conference of the NHL, division by division, in the order of the data. */ export declare const venuesInConference: (conference: VenueConference) => RealVenue[]; /** The arena a venue is of. */ export declare const arenaOfVenue: (venue: RealVenue) => Arena; /** How the rink lies in a venue's building (see `VenueOsm.axis`). */ export declare const venueOrientation: (venue: RealVenue) => VenueOrientation; /** The rink's box as the drawing has it: the arena's own where its sources publish a size, else the NHL's. */ export declare function venueRink(venue: RealVenue): Box; /** The floor a seat takes in plan, in square feet (ours): a bowl of today's arenas is steeper than the usual drawing's, whose seat is 2 by 2.3 feet (4.6), so that a seat takes less of the floor's area. Tried in turn: a building * with room for the seats at the first has the first; one with less has a steeper bowl, to the last, which is the least a seat takes. */ export declare const SEAT_AREAS: readonly number[]; /** How far the bowl's outer edge keeps from the building's wall, in feet (ours: the wall and the walk round the bowl). */ export declare const WALL = 10; /** How far the hall's wall stands beyond the bowl's outer edge, in feet, where the building's outline allows: the concourse and the wall, ours. */ export declare const HALL = 30; /** The walk between two tiers, in feet (ours: a suite level or a club between two bowls). */ export declare const GAP = 10; /** The height of the first row above the ice, in feet, the rise of a tier's rows by the number of tiers (what the lowest, a middle and the upper bowl rise, at most), the rise of the walk between two tiers (a suite level), and the steepest a bowl is raked, in degrees (ours: no source gives them). */ export declare const FIRST_HEIGHT = 4; export declare const RISES: Readonly>; export declare const WALK_RISE = 16; export declare const MAX_RAKE = 36; /** The height a roof's edge stands over the top row, at the least, in feet. */ export declare const CLEARANCE = 22; /** The least a saddle roof's low rim stands over the top row, in feet: the roof is lower over the bowl's sides than a lid is, and falls to the rim over the top row (ours, from photographs). */ export declare const SADDLE_CLEARANCE = 8; /** The plan of a venue: its building in the drawing's frame, the bowl fitted inside, and how it lies. */ export interface VenuePlan { venue: RealVenue; orientation: VenueOrientation; /** The rink, in the drawing's frame. */ box: Box; /** The building's outline in feet, in the drawing's frame (the rink along x, in the middle of the building's box). */ footprint: Pt[]; /** The stands for `layoutOf`: tiers, first row, ground, and the building and roof. */ bowl: RealBowl; /** The seats the bowl's tiers hold, by tier, and in all: equal to the venue's seats where the building has room (`fit` is `fits`) and fewer where it has not (`tight`). */ seats: { tier: string; seats: number; }[]; total: number; /** The floor a seat takes in the plan, in square feet (one of `SEAT_AREAS`). */ seatArea: number; fit: "fits" | "tight"; } /** * The plan of a venue's bowl: the building's outline turned so that the rink lies along x, a first row round the rink as an NHL arena has it, the largest bowl-shaped outline that fits the building round the middle of its main * hall, and between the two the tiers, the outer edge of each placed so that its band holds the share of the venue's seats the sources give it (at `SEAT_AREAS` square feet a seat), with a walk between the tiers. The * bowl is as long and wide as the building lets it be and as round at the corners as a bowl is; the rest is the building's. * @example * ```ts * import { planVenue, venueById } from "@johnmorrisdotca/kyogijo-stadiums/venues"; * const plan = planVenue(venueById("honda-center")!); * console.log(plan.orientation.basis, plan.seats.map((t) => t.tier).join(" "), plan.total); * // building lower upper 17174 * ``` */ export declare function planVenue(venue: RealVenue, rink?: Box): VenuePlan; /** The stands of a venue for `layoutOf` and the 3D view, round a rink: `planVenue`'s bowl. */ export declare const venueBowl: (venue: RealVenue, rink?: Box) => RealBowl; /** Whether the bowl lies inside the building: every corner of every tier's outer edge is inside the footprint. */ export declare function bowlInside(plan: VenuePlan): boolean;