#seismology #deserialize #read #reference #events #modular #flexible

bin+lib quakeml

Deserialization of QuakeML - a flexible, extensible and modular XML representation of seismological data

9 releases

0.1.8 Jan 9, 2022
0.1.7 Dec 18, 2021

#613 in Games

30 downloads per month

Custom license

15KB
331 lines

QuakeML deserialization in rust

crates.io

This python implementation by Nima Nooshiri has been used as reference.

Usage

use quakeml::read_quakeml;
use std::path::PathBuf;

fn main() {
    let path = PathBuf::from(r"sample/data.quakeml");
    let catalog = read_quakeml(&path);
    println!("catalog data: {}", catalog);
}

Download Events from USGS

After installing the command line tools with

cargo install --path .

you can download events given a certain time range from USGS with e.g.:

usgs --start-time 2021-01-01T00:00:00 --end-time 2021-01-01T01:00:00  --save-as events.quakeml

Dependencies

~12–26MB
~388K SLoC