Events (FDSN)¶
ingv_shakemap.events ¶
Earthquakes from the INGV FDSN event service: the query and its GeoJSON answer.
Pure: nothing here does I/O.
https://webservices.ingv.it/fdsnws/event/1/query follows the FDSN event
standard. Three habits of the INGV service matter:
- times go in and come out in UTC without an offset (
2026-10-23T10:19:15); - an empty window answers 204 No Content, not an empty collection;
- the GeoJSON feature has no top-level
id: the event id isproperties.eventId, an integer, and it is the id ShakeMap uses too.
Event
dataclass
¶
One earthquake of the INGV catalogue.
fdsn_time ¶
fdsn_time(at: datetime) -> str
at as the FDSN service wants it: UTC, no offset, whole seconds.
event_query ¶
event_query(start: datetime, end: datetime, *, bbox: BBox = ITALY, min_magnitude: float | None = None, max_depth_km: float | None = None, limit: int | None = None, updated_after: datetime | None = None) -> dict[str, str]
Query parameters for the events in bbox between start and end, newest first.
updated_after keeps only the events created or revised after that
instant (the FDSN updatedafter): a sync that runs every hour asks for
what changed since the last run instead of the whole window again.
shakemap_product_url ¶
shakemap_product_url(event_id: str | int, product: str, *, base: str = SHAKEMAP_BASE) -> str
URL of one product of the current ShakeMap of an event.
product is a file name: grid.xml, uncertainty.xml,
info.json, stationlist.json. The older /shake4/ prefix answers
404 for every event (checked on 19 October 2026).
shakemap_grid_url ¶
shakemap_grid_url(event_id: str | int, *, base: str = SHAKEMAP_BASE) -> str
URL of the current grid.xml of an event.
parse_event ¶
parse_event(feature: dict[str, Any]) -> Event | None
One GeoJSON feature as an :class:Event.
None when it lacks the id, the position, the time or the magnitude.
parse_events ¶
parse_events(payload: dict[str, Any]) -> list[Event]
The events of a GeoJSON answer, skipping features that cannot be read.