UNPKG

@seismo/core

Version:

This is the package for the core library of Seismo, a JavaScript library for seismic data processing and visualization. It provides utilities for handling seismic data, including FDSN web services, waveform processing, and event handling. The library is d

71 lines (70 loc) 1.75 kB
"use strict"; /** * commonalities with all types of FDSN Web Services */ Object.defineProperty(exports, "__esModule", { value: true }); exports.LatLonRadius = exports.LatLonBox = exports.LatLonRegion = exports.FDSNCommon = exports.IRIS_HOST = void 0; const utils_1 = require("../utils"); exports.IRIS_HOST = "service.iris.edu"; class FDSNCommon { /** @private */ _specVersion; /** @private */ _protocol; /** @private */ _host; /** @private */ _port; /** @private */ _nodata; /** @private */ _timeoutSec; constructor(host) { this._specVersion = "1"; this._host = exports.IRIS_HOST; this._protocol = (0, utils_1.checkProtocol)(); if ((0, utils_1.isNonEmptyStringArg)(host)) { this._host = host; } this._port = 80; this._timeoutSec = 30; } } exports.FDSNCommon = FDSNCommon; class LatLonRegion { } exports.LatLonRegion = LatLonRegion; class LatLonBox extends LatLonRegion { west; east; south; north; constructor(west, east, south, north) { super(); this.west = west; this.east = east; this.south = south; this.north = north; } asLeafletBounds() { return [ [this.south, this.west], [this.north, this.east], ]; } } exports.LatLonBox = LatLonBox; class LatLonRadius extends LatLonRegion { latitude; longitude; minRadius; maxRadius; constructor(latitude, longitude, minRadius, maxRadius) { super(); this.latitude = latitude; this.longitude = longitude; this.minRadius = minRadius; this.maxRadius = maxRadius; } } exports.LatLonRadius = LatLonRadius;