Lue dans les fichiers PHP du paquet au commit 013da77cd517 : ses espaces de noms, classes, interfaces et énumérations, leurs constantes, propriétés et méthodes publiques avec leur PHPDoc, et les options que prennent ses fabriques. Rien n’en est exécuté.
EmscSourceclassThe earthquake catalogue of the European-Mediterranean Seismological Centre (EMSC-CSEM), through the SeismicPortal's FDSN event web service (www.seismicportal.eu/fdsnws/event/1): an event by its SeismicPortal id (20261004_0000156) - its magnitude and type, place, depth, time, the Flinn-Engdahl region, the contributing agency - and, over a box or around a point for a period, the earthquakes as series (their count per step; each one's magnitude or depth, or the step's maximum, mean...) or as occurrences, each an entity with its time and its place, one page at a time.
6 methods · 4 constants
EmscSourceFactoryclassThe EMSC's earthquake catalogue (SeismicPortal): an event by its id, and the earthquakes of a place and a period as series or as occurrences - no key needed.
4 options
Omnilab\Emsc
EmscSource class
final class EmscSource extends HttpSource EmscSource.php:38
The earthquake catalogue of the European-Mediterranean Seismological Centre (EMSC-CSEM), through the SeismicPortal's FDSN event web service (www.seismicportal.eu/fdsnws/event/1): an event by its SeismicPortal id (20261004_0000156) - its magnitude and type, place, depth, time, the Flinn-Engdahl region, the contributing agency - and, over a box or around a point for a period, the earthquakes as series (their count per step; each one's magnitude or depth, or the step's maximum, mean...) or as occurrences, each an entity with its time and its place, one page at a time.
No key. One call per entity, per series query (every variable asked at once), per page of occurrences. The service answers at most 20,000 events a query (a 413 beyond, when no limit is given).
const BASE_URI = 'https://www.seismicportal.eu/fdsnws/event/1/'const MAX_EVENTS = 20000The most events one query answers: more is a 413 from the service, a larger limit is cut to it.
const VARIABLES = ['count' => null, 'magnitude' => null, 'depth' => 'km']The variables series() serves, with their unit.
const SORTS = [OccurrenceQuery::NEWEST => 'time', OccurrenceQuery::OLDEST => 'time-asc', 'magnitude' => 'magnitude', 'magnitude-asc' => 'magnitude-asc']How occurrences() sorts: the query's sort, the service's orderby.
EmscSource::__construct()
public function __construct(HttpClientInterface $http, readonly float $radius = 100.0, readonly ?float $minMagnitude = null, string $baseUri = self::BASE_URI, array $headers = [], float $throttle = 0.0)$radiusthe radius around a Point, in kilometres, for series() and for occurrences() when the query gives none
$minMagnitudethe smallest magnitude series() and occurrences() count when the query says none (null: every event the catalogue has)
EmscSource::getName()
public function getName(): stringEmscSource::capabilities()
public function capabilities(): arrayEmscSource::entity()
public function entity(Identifier|string $id): ?EntityAn event by its SeismicPortal id (20261004_0000156), emsc.event:..., or its SeismicPortal page.
EmscSource::series()
public function series(SeriesQuery $query): arrayThe earthquakes over the place for the period, as series, one per variable asked:
- "count": how many events each step (SeriesQuery::DAILY, HOURLY or another ISO 8601 duration), from the start of the period;
- "magnitude", "depth": each event's value at its time (no aggregation: an irregular series), or the step's MAX, MIN, MEAN or SUM.
A BBox is the box; a Point, the circle of the configured radius around it. The period defaults to the last 30 days; a date without a time is the whole day, in the query's time zone (UTC by default).
EmscSource::occurrences()
public function occurrences(OccurrenceQuery $query): PageThe seismic events over the place for the period, each an entity with its time and its place, one page at a time - what the list gives is what entity() gives.
A BBox is the box (across the antimeridian too); a Point, the circle of the query's radius around it (the configured one by default); no place, the world. A period's end left out is open: from the catalogue's first event (1998), up to now; a date without a time is its whole day, in UTC. Filters: OccurrenceQuery::MIN_MAGNITUDE (the configured one by default), MAX_MAGNITUDE, and "magnitude_type" (the type the bounds apply to: ml, mb, mw...). Sorts: newest (the service's default), oldest, magnitude (the largest first), magnitude-asc. Up to 20,000 a page; no total.
EmscSourceFactory class
final class EmscSourceFactory extends SourceFactory EmscSourceFactory.php:22
The EMSC's earthquake catalogue (SeismicPortal): an event by its id, and the earthquakes of a place and a period as series or as occurrences - no key needed.
options: mailto: 'support@glitchr.io' # in the User-Agent radius_km: 100 # the circle around a Point, for series(), and for occurrences() when a query gives none min_magnitude: null # the smallest magnitude counted when a query says none (null: every event) throttle: 0 # seconds between two calls: the EMSC publishes no figure base_uri: 'https://www.seismicportal.eu/fdsnws/event/1/'
Options
| Option | Default | |
|---|---|---|
radius_km | 100.0 | |
min_magnitude | null | |
throttle | 0.0 | |
base_uri | EmscSource::BASE_URI |