@slackwater/database 1.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,25 @@
1
+ THE FOLLOWING LICENSE INFORMATION COVERS ONLY THE DOCUMENTATION AND ANY CODE
2
+ NOT WITHIN THE "data" DIRECTORY. EACH DATA FILE HAS ITS OWN LICENSE INFORMATION.
3
+
4
+ The MIT License (MIT)
5
+
6
+ Copyright (c) 2019 Kevin Miller
7
+ Copyright (c) 2025 Brandon Keepers
8
+
9
+ Permission is hereby granted, free of charge, to any person obtaining a copy
10
+ of this software and associated documentation files (the "Software"), to deal
11
+ in the Software without restriction, including without limitation the rights
12
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
+ copies of the Software, and to permit persons to whom the Software is
14
+ furnished to do so, subject to the following conditions:
15
+
16
+ The above copyright notice and this permission notice shall be included in all
17
+ copies or substantial portions of the Software.
18
+
19
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
+ SOFTWARE.
package/NOTICE ADDED
@@ -0,0 +1,23 @@
1
+ @slackwater/database
2
+ Copyright (c) Sailing Naturali
3
+ Licensed under the MIT License (see LICENSE).
4
+
5
+ This repository uses GeoNames cities500 data under CC BY 4.0 to derive station
6
+ location fields. This product includes data created by GeoNames
7
+ (www.geonames.org), licensed under CC BY 4.0:
8
+ https://creativecommons.org/licenses/by/4.0/
9
+
10
+ metadata/coastline.geojson is a clipped extract of OpenStreetMap land polygons,
11
+ licensed under ODbL 1.0. Credit: OpenStreetMap contributors.
12
+ https://opendatacommons.org/licenses/odbl/1-0/
13
+
14
+ Station context names the OpenStreetMap bay or strait a station sits in,
15
+ derived from metadata/water-bodies.geojson, an extract of OpenStreetMap
16
+ licensed under ODbL 1.0. Credit: OpenStreetMap contributors.
17
+ https://opendatacommons.org/licenses/odbl/1-0/
18
+
19
+ Station countries for registry records are derived from
20
+ metadata/maritime-zones.geojson, an extract of the Marine Regions Maritime
21
+ Boundaries Geodatabase (Exclusive Economic Zones) by the Flanders Marine
22
+ Institute (marineregions.org), licensed under CC BY 4.0:
23
+ https://creativecommons.org/licenses/by/4.0/
package/README.md ADDED
@@ -0,0 +1,190 @@
1
+ # @slackwater/database
2
+
3
+ > A public database of tide harmonics
4
+
5
+ Harmonic constituents, tidal datums, and station metadata for thousands of tide stations around the world. Feed the constituents to a tide harmonic calculator like [Slackwater](https://github.com/openwatersio/slackwater) to produce astronomical tide predictions.
6
+
7
+ Station data is curated in the [slackwater-database repository](https://github.com/openwatersio/slackwater-database), which documents [where each station comes from](https://github.com/openwatersio/slackwater-database#sources) and how it is quality-checked.
8
+
9
+ ## Install
10
+
11
+ ```sh
12
+ $ npm install @slackwater/database
13
+ ```
14
+
15
+ ## Usage
16
+
17
+ The package exports every tide and current station that passes the database's quality gates:
18
+
19
+ ```typescript
20
+ import { stations, stationsById } from "@slackwater/database";
21
+
22
+ console.log("Total stations:", stations.length);
23
+ console.log(stationsById.get("noaa/9447130"));
24
+ ```
25
+
26
+ `stations` leaves out records the quality evaluation rejected, such as duplicate gauges and implausible datums. `allStations` is the unfiltered catalog, `stationsById` maps an id to its station, and every search function below takes `includeAll: true` to search the full catalog instead of the accepted subset.
27
+
28
+ Each station carries its identity and location eagerly. The heavy prediction fields — `harmonic_constituents`, `datums`, and `epoch` — are decoded from the database file on first access, so importing the module does not pull every station's prediction data onto the heap. [See the format documentation](https://github.com/openwatersio/slackwater-database/blob/main/docs/database-format.md) for how that works.
29
+
30
+ Each station has separate `locality`, `region`, and `country` display fields. `country_code` is an ISO 3166-1 alpha-2 code; `region_code`, when available, is an ISO 3166-2 subdivision code. Consumers can therefore omit country or region text when the surrounding page already supplies it.
31
+
32
+ ### Stable station routes
33
+
34
+ ```typescript
35
+ import { stationRouteBySlug, stationsById } from "@slackwater/database";
36
+
37
+ const route = stationRouteBySlug("tide", "victoria");
38
+ const station = route && stationsById.get(route.stationIds[0]!);
39
+ console.log(station?.locality, station?.region, station?.country_code);
40
+ ```
41
+
42
+ `stationRouteBySlug(kind, slug)` performs a binary lookup without decoding the full route index. `stationRoutes(kind)` decodes that kind's complete route list on demand. Prediction fields such as constituents and datums remain lazy.
43
+
44
+ ### Searching for stations
45
+
46
+ #### Geographic search
47
+
48
+ `near` returns an array of `[station, distanceInKm]` tuples, closest first:
49
+
50
+ ```typescript
51
+ import { near, nearest } from "@slackwater/database";
52
+
53
+ // Find stations within 10 km of a lat/lon
54
+ const nearbyStations = near({
55
+ lon: -122,
56
+ lat: 37,
57
+ maxDistance: 10,
58
+ maxResults: 50,
59
+ });
60
+ console.log("Nearby stations:", nearbyStations.length);
61
+ ```
62
+
63
+ `nearest` returns a single `[station, distanceInKm]` tuple, or `null` when nothing matches:
64
+
65
+ ```typescript
66
+ const result = nearest({ longitude: -75.5, latitude: 22 });
67
+ if (result) {
68
+ const [station, distance] = result;
69
+ console.log("Nearest station:", station.name, "is", distance, "km away");
70
+ }
71
+ ```
72
+
73
+ Both functions take the following parameters:
74
+
75
+ - `latitude` or `lat`: Latitude in decimal degrees.
76
+ - `longitude`, `lon`, or `lng`: Longitude in decimal degrees.
77
+ - `maxDistance`: Maximum distance in kilometers to search for stations (default: unlimited).
78
+ - `filter`: A function that takes a station and returns `true` to include it in results, or `false` to exclude it.
79
+ - `includeAll`: Search the full catalog rather than quality-accepted stations only (default: `false`).
80
+
81
+ `near` also takes:
82
+
83
+ - `maxResults`: Maximum number of results to return (default: `10`).
84
+
85
+ #### Bounding box search
86
+
87
+ `bbox` takes a `[minLon, minLat, maxLon, maxLat]` tuple and returns the stations inside it:
88
+
89
+ ```typescript
90
+ import { bbox } from "@slackwater/database";
91
+
92
+ // Find stations in the Boston area
93
+ const bostonStations = bbox([-71.5, 42, -70.5, 42.8]);
94
+ console.log("Stations in bounds:", bostonStations.length);
95
+
96
+ // With a filter
97
+ const referenceOnly = bbox([-72, 41, -70, 43], {
98
+ filter: (station) => station.type === "reference",
99
+ });
100
+ ```
101
+
102
+ The bounds are `minLon` (west edge), `minLat` (south edge), `maxLon` (east edge), and `maxLat` (north edge), in decimal degrees. The optional second argument takes:
103
+
104
+ - `filter`: A function that takes a station and returns `true` to include it in results, or `false` to exclude it.
105
+ - `includeAll`: Search the full catalog rather than quality-accepted stations only (default: `false`).
106
+
107
+ #### Full-text search
108
+
109
+ You can search for stations by name, region, country, or continent using the `search` function. It supports fuzzy matching and prefix search:
110
+
111
+ ```typescript
112
+ import { search } from "@slackwater/database";
113
+
114
+ // Search for stations by name with fuzzy matching
115
+ const results = search("Boston");
116
+ console.log("Found:", results.length, "stations");
117
+ console.log(results[0].name);
118
+
119
+ // Search with a filter function
120
+ const usStations = search("harbor", {
121
+ filter: (station) => station.country === "United States",
122
+ maxResults: 10,
123
+ });
124
+ console.log("US harbor stations:", usStations);
125
+
126
+ // Combine multiple filters
127
+ const referenceStations = search("island", {
128
+ filter: (station) =>
129
+ station.type === "reference" && station.continent === "Americas",
130
+ maxResults: 20,
131
+ });
132
+ console.log("Reference stations:", referenceStations);
133
+ ```
134
+
135
+ The `search` function takes the following parameters:
136
+
137
+ - `query` (required): Search string. Supports fuzzy matching and prefix search.
138
+ - `options` (optional):
139
+ - `filter`: Function that takes a station and returns `true` to include it in results, or `false` to exclude it.
140
+ - `includeAll`: Search the full catalog rather than quality-accepted stations only (default: `false`).
141
+ - `maxResults`: Maximum number of results to return (default: `20`).
142
+
143
+ ## Station types
144
+
145
+ Stations are either _reference_ or _subordinate_, given by the station's `type` field.
146
+
147
+ Reference stations have their own `harmonic_constituents`, usually derived from a long record of real water level observations. Subordinate stations predict from a nearby reference station's harmonics, adjusted by four `offsets` — two correcting water level and two correcting the time of high and low tide. Reading a subordinate's `harmonic_constituents` or `datums` returns its reference station's values, so both types predict the same way.
148
+
149
+ `astronomical_bounds` is how low and high a prediction for the station can go — `{ lat, hat }` in metres above its chart datum — with the height offsets applied for a subordinate. It sits outside `datums` because the reduced pair is the floor and ceiling of a prediction rather than a hydrographic datum; [see the datum documentation](https://github.com/openwatersio/slackwater-database/blob/main/docs/datums.md).
150
+
151
+ The full field-by-field description lives in [`schemas/station.schema.json`](https://github.com/openwatersio/slackwater-database/blob/main/schemas/station.schema.json).
152
+
153
+ ## The database file
154
+
155
+ The module reads a single [FlatBuffers](https://flatbuffers.dev) file built from [`schemas/database.fbs`](https://github.com/openwatersio/slackwater-database/blob/main/schemas/database.fbs). Every release of this package also attaches that file as `slackwater-<date>.tcdb`, so native apps can bundle and memory-map it and generate a reader in their own language from the schema. [See the format documentation.](https://github.com/openwatersio/slackwater-database/blob/main/docs/database-format.md)
156
+
157
+ ## License
158
+
159
+ - All code in this package is licensed under the [MIT License](./LICENSE).
160
+ - The `license` field of each station specifies the license for that station's data, as a `type`, a `url`, and a `commercial_use` flag you can filter on.
161
+ - Unless otherwise noted, all other data is licensed under the [Creative Commons Attribution 4.0 International (CC BY 4.0)](https://creativecommons.org/licenses/by/4.0/) license. Some stations are CC BY-NC 4.0 and are marked `commercial_use: false`.
162
+
163
+ ## Attribution
164
+
165
+ Most stations are CC BY, so displaying or redistributing them carries an obligation to the original source, not only to this project. Every station carries the notice that satisfies it as `attribution`, already assembled.
166
+
167
+ **Display the station's `attribution`.** That is the whole of the rule. Nothing here needs its own table of sources, or its own reading of what a licence requires.
168
+
169
+ ```typescript
170
+ import { stationsById } from "@slackwater/database";
171
+
172
+ console.log(stationsById.get("ticon/newlyn-new-gbr-bodc")?.attribution);
173
+ // Slackwater database (https://github.com/openwatersio/slackwater-database). Source:
174
+ // Hart-Davis, M., Dettmering, D., Seitz, F. (2025), TICON-4: TIdal CONstants
175
+ // based on GESLA-4 sea-level records, SEANOE, https://doi.org/10.17882/109129.
176
+ // Licensed CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Modified:
177
+ // see https://github.com/openwatersio/slackwater-database#modifications-to-source-data
178
+ ```
179
+
180
+ What the string contains, and why that is sufficient:
181
+
182
+ - **The creator credit.** For TICON-4 stations, the citation its authors ask for; for Kartverket, the publishing agency. A source that requires no credit, such as public-domain NOAA data, contributes nothing here.
183
+ - **The licence and its URI**, taken from the station rather than its source. Licence varies within a single source — the TICON stations relayed from CMEMS are CC BY-NC while the rest are CC BY — so the notice names the one that actually applies to the station in hand.
184
+ - **An indication that the material was modified**, pointing at [what this project changes](https://github.com/openwatersio/slackwater-database#modifications-to-source-data): derived datums, normalized names, geocoded location fields, and re-fit phases for two GESLA sources.
185
+
186
+ Those are the three things [CC BY 4.0 section 3(a)(1)](https://creativecommons.org/licenses/by/4.0/) requires a redistributor to pass on. A station whose licence imposes no notice gets the project credit alone:
187
+
188
+ > Slackwater database (https://github.com/openwatersio/slackwater-database)
189
+
190
+ `attribution` is a display string. It is not a substitute for `license` when you need to make a decision in code — filter on `license.commercial_use` or `license.type` for that.
@@ -0,0 +1,283 @@
1
+ //#region src/attribution.d.ts
2
+ /**
3
+ * The project half of every notice. A station's full notice opens with this,
4
+ * then adds whatever its source and licence require.
5
+ */
6
+ export declare const PROJECT_CREDIT = "Slackwater database (https://github.com/openwatersio/slackwater-database)";
7
+ /** Where a redistributor is pointed to find what this project changed. */
8
+ export declare const MODIFICATIONS_URL = "https://github.com/openwatersio/slackwater-database#modifications-to-source-data";
9
+ /** Whether a source name has a credit decision recorded. */
10
+ export declare function isKnownSource(sourceName: string): boolean;
11
+ /**
12
+ * Assemble a station's complete notice, so displaying it is the whole of a
13
+ * consumer's obligation. Under a Creative Commons licence that means the
14
+ * creator credit, the licence and its URI, and an indication that the material
15
+ * was modified — the three things CC BY 4.0 section 3(a)(1) requires be passed
16
+ * on. Licence is taken per station rather than per source because it varies
17
+ * within one source: TICON stations relayed from CMEMS are CC BY-NC while the
18
+ * rest are CC BY.
19
+ */
20
+ export declare function attributionFor(sourceName: string | undefined, license: {
21
+ type: string;
22
+ url: string;
23
+ } | undefined): string;
24
+ //#endregion
25
+ //#region src/types.d.ts
26
+ interface HarmonicConstituent {
27
+ name: string;
28
+ description?: string;
29
+ amplitude: number;
30
+ phase: number;
31
+ speed?: number;
32
+ }
33
+ interface Constituent {
34
+ name: string;
35
+ description: string | null;
36
+ speed: number;
37
+ }
38
+ interface StationRouteInput {
39
+ slug: string;
40
+ station_ids: string[];
41
+ former_paths?: string[];
42
+ }
43
+ interface StationRoute {
44
+ slug: string;
45
+ stationIds: string[];
46
+ formerPaths: string[];
47
+ }
48
+ interface DatabaseRoutes {
49
+ tide: StationRouteInput[];
50
+ current: StationRouteInput[];
51
+ }
52
+ interface StationData {
53
+ name: string;
54
+ continent: string;
55
+ country: string;
56
+ country_code?: string;
57
+ locality?: string;
58
+ region?: string;
59
+ region_code?: string;
60
+ timezone: string;
61
+ context?: string;
62
+ context_derived?: boolean;
63
+ cities?: string[];
64
+ disclaimers?: string;
65
+ type: "reference" | "subordinate";
66
+ latitude: number;
67
+ longitude: number;
68
+ source: {
69
+ name: string;
70
+ id: string;
71
+ published_harmonics: boolean;
72
+ url: string;
73
+ };
74
+ license: {
75
+ type: string;
76
+ commercial_use: boolean;
77
+ url: string;
78
+ notes?: string;
79
+ };
80
+ harmonic_constituents: HarmonicConstituent[];
81
+ offsets?: {
82
+ reference: string;
83
+ height: {
84
+ high: number;
85
+ low: number;
86
+ type: "ratio" | "fixed";
87
+ };
88
+ time: {
89
+ high: number;
90
+ low: number;
91
+ };
92
+ };
93
+ datums: Record<string, number>;
94
+ datums_source?: "observed" | "harmonic";
95
+ chart_datum?: string;
96
+ epoch?: {
97
+ start: string;
98
+ end: string;
99
+ };
100
+ aliases?: string[];
101
+ }
102
+ interface TideDerivedCurrentData {
103
+ reference: string;
104
+ high_water_lag_minutes: number;
105
+ low_water_lag_minutes: number;
106
+ }
107
+ interface CurrentData {
108
+ /** Degrees true. */
109
+ flood_direction?: number;
110
+ ebb_direction?: number;
111
+ /** Knots; the constant term added to the harmonic sum. */
112
+ mean_flow?: number;
113
+ /** Id of the tide station whose extremes pair with this current, if any. */
114
+ tide_reference?: string;
115
+ magnitude_note?: string;
116
+ derived?: TideDerivedCurrentData;
117
+ /** Subordinate currents only. Times in minutes, ratios dimensionless. */
118
+ offsets?: {
119
+ reference: string;
120
+ slack_before_flood?: number;
121
+ slack_before_ebb?: number;
122
+ flood_time?: number;
123
+ ebb_time?: number;
124
+ flood_speed_ratio?: number;
125
+ ebb_speed_ratio?: number;
126
+ };
127
+ }
128
+ /**
129
+ * What buildDatabase accepts: a station id plus whatever fields the catalog
130
+ * has. Downstream generators can pass filtered stations from this package or
131
+ * records of their own (including current stations).
132
+ */
133
+ type StationInput = {
134
+ id: string;
135
+ kind?: "tide" | "current";
136
+ current?: CurrentData;
137
+ quality?: StationQuality;
138
+ } & Partial<StationData>;
139
+ interface StationQuality {
140
+ /** The station's id — not stored in the database, filled from identity. */
141
+ id: string;
142
+ accepted: boolean;
143
+ score: number;
144
+ /** Scoring factors, each 0-1. */
145
+ factors?: {
146
+ epoch: number;
147
+ recency: number;
148
+ source: number;
149
+ quality: number;
150
+ amplitude: number;
151
+ coverage: number;
152
+ };
153
+ /** Human-readable findings, e.g. "MLW (3.827) < LAT (3.831)". */
154
+ issues?: string[];
155
+ /** Rejection category ("duplicate", "datum", "constituents", ...), if rejected. */
156
+ reason?: string;
157
+ /** Id of the station that makes this one redundant, if any. */
158
+ redundant?: string;
159
+ }
160
+ /** The floor and ceiling of a station's predictions, in metres above its chart datum. */
161
+ interface AstronomicalBounds {
162
+ /** Lowest Astronomical Tide. */
163
+ lat: number;
164
+ /** Highest Astronomical Tide. */
165
+ hat: number;
166
+ }
167
+ interface Station extends StationData {
168
+ id: string;
169
+ country_code: string;
170
+ kind: "tide" | "current";
171
+ current?: CurrentData;
172
+ quality?: StationQuality;
173
+ /**
174
+ * Lowest and highest astronomical tide, in metres above this station's chart
175
+ * datum; absent when the station predicting for this one has no LAT and HAT.
176
+ * A subordinate's is the reference's range reduced through `offsets.height`,
177
+ * the floor of a prediction rather than a hydrographic datum — which is why
178
+ * it is here and not in `datums`. See docs/datums.md.
179
+ */
180
+ astronomical_bounds?: AstronomicalBounds;
181
+ /**
182
+ * The credit to display when showing or redistributing this station, ready
183
+ * to render as-is. Derived from `source`; see src/attribution.ts.
184
+ */
185
+ attribution: string;
186
+ }
187
+ type StationMetaKey = "name" | "latitude" | "longitude" | "locality" | "region" | "region_code" | "country" | "country_code" | "continent" | "context" | "context_derived" | "cities" | "aliases" | "timezone" | "type" | "source";
188
+ type StationMeta = {
189
+ id: string;
190
+ } & Pick<StationData, StationMetaKey>;
191
+ //#endregion
192
+ //#region src/stations.d.ts
193
+ /** All datum keys present across the database (e.g. "MLLW", "MSL", "NAVD88"). */
194
+ export declare const datums: string[];
195
+ export declare const allStations: Station[];
196
+ export declare const stationsById: Map<string, Station>;
197
+ export declare const qualityMap: Map<string, StationQuality>;
198
+ export declare function qualityFilter(station: Station): boolean;
199
+ export declare const stations: Station[];
200
+ //#endregion
201
+ //#region src/routes.d.ts
202
+ export declare function stationRouteBySlug(kind: "tide" | "current", slug: string): StationRoute | undefined;
203
+ export declare function stationRoutes(kind: "tide" | "current"): StationRoute[];
204
+ //#endregion
205
+ //#region src/search/index.d.ts
206
+ export type Position = Latitude & Longitude;
207
+ type Latitude = {
208
+ latitude: number;
209
+ } | {
210
+ lat: number;
211
+ };
212
+ type Longitude = {
213
+ longitude: number;
214
+ } | {
215
+ lon: number;
216
+ } | {
217
+ lng: number;
218
+ };
219
+ export type Filter = (station: Station) => boolean;
220
+ export type NearestOptions = Position & {
221
+ maxDistance?: number;
222
+ /** Include all stations, not just quality-filtered ones. */
223
+ includeAll?: boolean;
224
+ filter?: Filter;
225
+ };
226
+ export type NearOptions = NearestOptions & {
227
+ maxResults?: number;
228
+ };
229
+ export type BboxOptions = {
230
+ /** Include all stations, not just quality-filtered ones. */
231
+ includeAll?: boolean;
232
+ filter?: Filter;
233
+ };
234
+ export type TextSearchOptions = {
235
+ /** Include all stations, not just quality-filtered ones. */
236
+ includeAll?: boolean;
237
+ filter?: Filter;
238
+ maxResults?: number;
239
+ };
240
+ /**
241
+ * A tuple of a station and its distance from a given point, in kilometers.
242
+ */
243
+ export type StationWithDistance = [Station, number];
244
+ /**
245
+ * Find stations near a given position.
246
+ */
247
+ export declare function near({ maxDistance, maxResults, includeAll, filter, ...position }: NearOptions): StationWithDistance[];
248
+ /**
249
+ * Find the single nearest station to a given position.
250
+ */
251
+ export declare function nearest(options: NearestOptions): StationWithDistance | null;
252
+ /**
253
+ * Find stations within a bounding box.
254
+ */
255
+ export declare function bbox([minLon, minLat, maxLon, maxLat]: [number, number, number, number], { includeAll, filter }?: BboxOptions): Station[];
256
+ export declare function positionToPoint(options: Position): [number, number];
257
+ /**
258
+ * Search for stations by text across name, region, country, and continent.
259
+ * Supports fuzzy matching and prefix search.
260
+ */
261
+ export declare function search(query: string, { includeAll, filter, maxResults }?: TextSearchOptions): Station[];
262
+ //#endregion
263
+ //#region src/database/builder.d.ts
264
+ /**
265
+ * Serialize stations into the FlatBuffers database format
266
+ * (schemas/database.fbs). Stations are sorted by id — the vector key — so
267
+ * readers can binary-search the buffer.
268
+ *
269
+ * Build order matters and the schema cannot express it: FlatBuffers writes back
270
+ * to front, so the prediction data (constituents and datums vectors) is written
271
+ * first for every station, landing together at the tail of the file, and the
272
+ * station tables are written together after, landing at the head. A naive
273
+ * per-station loop would interleave ~100 bytes of identity with ~1,300 bytes of
274
+ * constituents, making an identity scan over a memory-mapped file fault in
275
+ * every page. test/database.test.ts asserts the layout.
276
+ */
277
+ export declare function buildDatabase(stations: StationInput[], { version, routes }?: {
278
+ version?: string;
279
+ routes?: DatabaseRoutes;
280
+ }): Uint8Array;
281
+ //#endregion
282
+ export type { AstronomicalBounds, Constituent, CurrentData, DatabaseRoutes, HarmonicConstituent, Station, StationData, StationInput, StationMeta, StationMetaKey, StationQuality, StationRoute, StationRouteInput, TideDerivedCurrentData };
283
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/attribution.ts","../../src/types.ts","../../src/stations.ts","../../src/routes.ts","../../src/search/index.ts","../../src/database/builder.ts"],"mappings":";;;;;qBAIa;;qBAIA;;wBAiCG,cAAc;;;;;;;;;;wBAad,eACd,gCACA;EAAW;EAAc;;;;UCxDV;EACf;EACA;EACA;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf;EACA;EACA;;UAGe;EACf,MAAM;EACN,SAAS;;UAGM;EAEf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EAGA;IACE;IACA;IACA;IACA;;EAIF;IACE;IACA;IACA;IACA;;EAIF,uBAAuB;EAGvB;IACE;IACA;MAAU;MAAc;MAAa;;IACrC;MAAQ;MAAc;;;EAGxB,QAAQ;EAIR;EAGA;EAGA;IACE;IACA;;EAIF;;UAMe;EACf;EACA;EACA;;UAGe;;EAEf;EACA;;EAEA;;EAEA;EACA;EACA,UAAU;;EAEV;IACE;IACA;IACA;IACA;IACA;IACA;IACA;;;;;;;;KASQ;EACV;EACA;EACA,UAAU;EACV,UAAU;IACR,QAAQ;UAIK;;EAEf;EACA;EACA;;EAEA;IACE;IACA;IACA;IACA;IACA;IACA;;;EAGF;;EAEA;;EAEA;;;UAIe;;EAEf;;EAEA;;UAGe,gBAAgB;EAC/B;EACA;EACA;EACA,UAAU;EACV,UAAU;;;;;;;;EAQV,sBAAsB;;;;;EAKtB;;KAMU;KAkBA;EAAgB;IAAe,KAAK,aAAa;;;;qBChLhD;qBA+SA,aAAa;qBAOb,cAAY,YAAA;qBAEZ,YAAU,YAAA;wBAIP,cAAc,SAAS;qBAI1B,UAAU;;;wBClVP,mBACd,0BACA,eACC;wBAkBa,cAAc,2BAA2B;;;YChC7C,WAAW,WAAW;KAC7B;EAAa;;EAAuB;;KACpC;EAAc;;EAAwB;;EAAkB;;YAEjD,UAAU,SAAS;YAEnB,iBAAiB;EAC3B;;EAEA;EACA,SAAS;;YAGC,cAAc;EACxB;;YAGU;;EAEV;EACA,SAAS;;YAGC;;EAEV;EACA,SAAS;EACT;;;;;YAMU,uBAAuB;;;;wBAgCnB,OACd,aACA,YACA,YACA,WACG,YACF,cAAc;;;;wBAqBD,QAAQ,SAAS,iBAAiB;;;;wBAQlC,MACb,QAAQ,QAAQ,QAAQ,6CACvB,YAAoB,WAAU,cAC/B;wBAOa,gBAAgB,SAAS;;;;;wBAezB,OACd,iBACE,YAAY,QAAQ,eAAmB,oBACxC;;;;;;;;;;;;;;;;wBC9Fa,cACd,UAAU,kBAER,SACA;EACG;EAAkB,SAAS;IAC/B"}