Expand description
Pure Rust FDSN StationXML and SeisComP SC3ML reader/writer.
stationxml-rs provides a format-agnostic inventory model with pluggable
backends for different XML formats used in seismology.
§Supported Formats
| Format | Read | Write |
|---|---|---|
| FDSN StationXML 1.2 | Yes | Yes |
| SeisComP SC3ML 0.6–0.13 | Yes | Yes |
§Quick Start
use stationxml_rs::{read_from_file, write_to_string, Sc3ml};
// Read any format (auto-detects FDSN or SC3ML)
let inv = read_from_file("station.xml").unwrap();
println!("{} networks", inv.networks.len());
// Write as SC3ML
let xml = write_to_string::<Sc3ml>(&inv).unwrap();§Cross-Format Conversion
use stationxml_rs::{Fdsn, Sc3ml, StationXmlFormat, write_to_string};
// Read FDSN StationXML
let inv = Fdsn::read_from_str("<FDSNStationXML>...</FDSNStationXML>").unwrap();
// Convert to SC3ML
let sc3ml = write_to_string::<Sc3ml>(&inv).unwrap();Re-exports§
pub use builder::InventoryBuilder;pub use conversion::AdcConversion;pub use error::Result;pub use error::StationXmlError;pub use fdsn::Fdsn;pub use format::Format;pub use format::StationXmlFormat;pub use format::detect_format;pub use sc3ml::Sc3ml;pub use sensor::SensorEntry;pub use sensor::find_sensor;pub use sensor::load_sensor_library;pub use inventory::*;
Modules§
- builder
- Builder pattern API for constructing inventories.
- conversion
- ADC conversion helpers.
- error
- Error types for stationxml-rs.
- fdsn
- FDSN StationXML 1.2 format backend.
- format
- Format trait and auto-detection.
- inventory
- Core inventory types — format-agnostic representation of seismic station metadata.
- sc3ml
- SeisComP SC3ML 0.13 format backend.
- sensor
- Built-in sensor library.
Functions§
- read_
from_ file - Read from file with auto-format detection.
- read_
from_ file_ as - Read from file with explicit format.
- read_
from_ str - Read from string with auto-format detection.
- write_
to_ file - Write to file with explicit format.
- write_
to_ string - Write to string with explicit format.