stationxml

package
v0.0.0-...-f0b4dbc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const DateTimeFormat = "2006-01-02T15:04:05"

only include down to seconds

View Source
const SchemaVersion = 1.1

for use when building the root element

Variables

View Source
var ErrInvalidApproximationType = errors.New("unknown or invalid ApproximationType value")
View Source
var ErrInvalidCfTransferFunctionType = errors.New("unknown or invalid CfTransferFunctionType value")
View Source
var ErrInvalidNominalType = errors.New("unknown or invalid NominalType value")
View Source
var ErrInvalidPzTransferFunctionType = errors.New("unknown or invalid PzTransferFunctionType value")
View Source
var ErrInvalidRestrictedStatusType = errors.New("unknown or invalid RestrictedStatusType value")
View Source
var ErrInvalidSymmetry = errors.New("unknown or invalid Symmetry value")
View Source
var ErrInvalidType = errors.New("unknown or invalid Type value")

Functions

This section is empty.

Types

type AngleType

type AngleType struct {
	FloatType
}

type ApproximationType

type ApproximationType uint32
const (
	MaclaurinApproximation ApproximationType = 1 + iota
)

func ToApproximationType

func ToApproximationType(s string) ApproximationType

func (ApproximationType) MarshalXML

func (v ApproximationType) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (ApproximationType) MarshalXMLAttr

func (v ApproximationType) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (ApproximationType) String

func (v ApproximationType) String() string

func (*ApproximationType) UnmarshalXML

func (v *ApproximationType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*ApproximationType) UnmarshalXMLAttr

func (v *ApproximationType) UnmarshalXMLAttr(attr xml.Attr) error

type AzimuthType

type AzimuthType struct {
	FloatType
}

type BaseFilterType

type BaseFilterType struct {
	ResourceId string `xml:"resourceId,attr,omitempty"`

	Name string `xml:"name,attr,omitempty"`

	Description string `xml:"Description,omitempty"`

	InputUnits UnitsType `xml:"InputUnits"`

	OutputUnits UnitsType `xml:"OutputUnits"`
}

type BaseNodeType

type BaseNodeType struct {
	Code string `xml:"code,attr"`

	StartDate DateTime `xml:"startDate,attr,omitempty"`

	EndDate DateTime `xml:"endDate,attr,omitempty"`

	RestrictedStatus RestrictedStatusType `xml:"restrictedStatus,attr,omitempty"`

	AlternateCode string `xml:"alternateCode,attr,omitempty"`

	HistoricalCode string `xml:"historicalCode,attr,omitempty"`

	Description string `xml:"Description,omitempty"`

	Identifier []IdentifierType `xml:"Identifier,omitempty"`

	Comment []CommentType `xml:"Comment,omitempty"`

	DataAvailability *DataAvailabilityType `xml:"DataAvailability,omitempty"`
}

type CfTransferFunctionType

type CfTransferFunctionType uint32
const (
	AnalogRadiansSecondCfTransferFunction CfTransferFunctionType = 1 + iota
	AnalogHertzCfTransferFunction
	DigitalCfTransferFunction
)

func ToCfTransferFunctionType

func ToCfTransferFunctionType(s string) CfTransferFunctionType

func (CfTransferFunctionType) MarshalXML

func (v CfTransferFunctionType) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (CfTransferFunctionType) MarshalXMLAttr

func (v CfTransferFunctionType) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (CfTransferFunctionType) String

func (v CfTransferFunctionType) String() string

func (*CfTransferFunctionType) UnmarshalXML

func (v *CfTransferFunctionType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*CfTransferFunctionType) UnmarshalXMLAttr

func (v *CfTransferFunctionType) UnmarshalXMLAttr(attr xml.Attr) error

type ChannelType

type ChannelType struct {
	BaseNodeType

	LocationCode string `xml:"locationCode,attr"`

	ExternalReference []ExternalReferenceType `xml:"ExternalReference,omitempty"`

	Latitude LatitudeType `xml:"Latitude"`

	Longitude LongitudeType `xml:"Longitude"`

	Elevation DistanceType `xml:"Elevation"`

	Depth DistanceType `xml:"Depth"`

	Azimuth *AzimuthType `xml:"Azimuth,omitempty"`

	Dip *DipType `xml:"Dip,omitempty"`

	WaterLevel *FloatType `xml:"WaterLevel,omitempty"`

	Type []Type `xml:"Type,omitempty"`

	SampleRate SampleRateType `xml:"SampleRate"`

	SampleRateRatio *SampleRateRatioType `xml:"SampleRateRatio,omitempty"`

	ClockDrift *ClockDrift `xml:"ClockDrift,omitempty"`

	CalibrationUnits *UnitsType `xml:"CalibrationUnits,omitempty"`

	Sensor *EquipmentType `xml:"Sensor,omitempty"`

	PreAmplifier *EquipmentType `xml:"PreAmplifier,omitempty"`

	DataLogger *EquipmentType `xml:"DataLogger,omitempty"`

	Equipment []EquipmentType `xml:"Equipment,omitempty"`

	Response *ResponseType `xml:"Response,omitempty"`
}

type ClockDrift

type ClockDrift struct {
	FloatType
}

type Coefficient

type Coefficient struct {
	FloatNoUnitType

	Number CounterType `xml:"number,attr,omitempty"`
}

type CoefficientsType

type CoefficientsType struct {
	BaseFilterType

	CfTransferFunctionType CfTransferFunctionType `xml:"CfTransferFunctionType"`

	Numerator []Numerator `xml:"Numerator,omitempty"`

	Denominator []Denominator `xml:"Denominator,omitempty"`
}

type CommentType

type CommentType struct {
	Id CounterType `xml:"id,attr,omitempty"`

	Subject string `xml:"subject,attr,omitempty"`

	Value string `xml:"Value"`

	BeginEffectiveTime DateTime `xml:"BeginEffectiveTime,omitempty"`

	EndEffectiveTime DateTime `xml:"EndEffectiveTime,omitempty"`

	Author []PersonType `xml:"Author,omitempty"`
}

type CounterType

type CounterType int

type DataAvailabilityExtentType

type DataAvailabilityExtentType struct {
	Start DateTime `xml:"start,attr"`

	End DateTime `xml:"end,attr"`
}

type DataAvailabilitySpanType

type DataAvailabilitySpanType struct {
	Start DateTime `xml:"start,attr"`

	End DateTime `xml:"end,attr"`

	NumberSegments int `xml:"numberSegments,attr"`

	MaximumTimeTear float64 `xml:"maximumTimeTear,attr,omitempty"`
}

type DataAvailabilityType

type DataAvailabilityType struct {
	Extent *DataAvailabilityExtentType `xml:"Extent,omitempty"`

	Span []DataAvailabilitySpanType `xml:"Span,omitempty"`
}

type DateTime

type DateTime struct {
	time.Time `xml:",chardata"`
}

func MustParseDateTime

func MustParseDateTime(s string) DateTime

func MustParseDateTimePtr

func MustParseDateTimePtr(s string) *DateTime

func NewDateTime

func NewDateTime(t time.Time) DateTime

func Now

func Now() DateTime

func ParseDateTime

func ParseDateTime(s string) (DateTime, error)

func (DateTime) MarshalXML

func (t DateTime) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (DateTime) MarshalXMLAttr

func (t DateTime) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (*DateTime) UnmarshalXML

func (t *DateTime) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*DateTime) UnmarshalXMLAttr

func (t *DateTime) UnmarshalXMLAttr(attr xml.Attr) error

type DecimationType

type DecimationType struct {
	InputSampleRate FrequencyType `xml:"InputSampleRate"`

	Factor int `xml:"Factor"`

	Offset int `xml:"Offset"`

	Delay FloatType `xml:"Delay"`

	Correction FloatType `xml:"Correction"`
}

type Denominator

type Denominator struct {
	FloatNoUnitType

	Number CounterType `xml:"number,attr,omitempty"`
}

type DipType

type DipType struct {
	FloatType
}

type DistanceType

type DistanceType struct {
	FloatType
}

type EmailType

type EmailType string

type EquipmentType

type EquipmentType struct {
	ResourceId string `xml:"resourceId,attr,omitempty"`

	Type string `xml:"Type,omitempty"`

	Description string `xml:"Description,omitempty"`

	Manufacturer string `xml:"Manufacturer,omitempty"`

	Vendor string `xml:"Vendor,omitempty"`

	Model string `xml:"Model,omitempty"`

	SerialNumber string `xml:"SerialNumber,omitempty"`

	InstallationDate DateTime `xml:"InstallationDate,omitempty"`

	RemovalDate DateTime `xml:"RemovalDate,omitempty"`

	CalibrationDate []DateTime `xml:"CalibrationDate,omitempty"`
}

type ExternalReferenceType

type ExternalReferenceType struct {
	Description string `xml:"Description"`
}

type FDSNStationXML

type FDSNStationXML struct {
	XMLName xml.Name `xml:"http://www.fdsn.org/xml/station/1 FDSNStationXML"`

	RootType
}

func (FDSNStationXML) Marshal

func (x FDSNStationXML) Marshal() ([]byte, error)

func (FDSNStationXML) MarshalIndent

func (x FDSNStationXML) MarshalIndent(prefix, indent string) ([]byte, error)

type FIRType

type FIRType struct {
	BaseFilterType

	Symmetry Symmetry `xml:"Symmetry"`

	NumeratorCoefficient []NumeratorCoefficient `xml:"NumeratorCoefficient,omitempty"`
}

type FloatNoUnitType

type FloatNoUnitType struct {
	PlusError float64 `xml:"plusError,attr,omitempty"`

	MinusError float64 `xml:"minusError,attr,omitempty"`

	MeasurementMethod string `xml:"measurementMethod,attr,omitempty"`

	Value float64 `xml:",chardata"`
}

type FloatType

type FloatType struct {
	Unit string `xml:"unit,attr,omitempty"`

	PlusError float64 `xml:"plusError,attr,omitempty"`

	MinusError float64 `xml:"minusError,attr,omitempty"`

	MeasurementMethod string `xml:"measurementMethod,attr,omitempty"`

	Value float64 `xml:",chardata"`
}

type FrequencyType

type FrequencyType struct {
	FloatType
}

type GainType

type GainType struct {
	Value float64 `xml:"Value"`

	Frequency float64 `xml:"Frequency"`
}

type IdentifierType

type IdentifierType struct {
	Type string `xml:"type,attr,omitempty"`

	Value string `xml:",chardata"`
}

type LatitudeBaseType

type LatitudeBaseType struct {
	FloatType
}

type LatitudeType

type LatitudeType struct {
	LatitudeBaseType

	Datum string `xml:"datum,attr,omitempty"`
}

type LongitudeBaseType

type LongitudeBaseType struct {
	FloatType
}

type LongitudeType

type LongitudeType struct {
	LongitudeBaseType

	Datum string `xml:"datum,attr,omitempty"`
}

type NetworkType

type NetworkType struct {
	BaseNodeType

	Operator []OperatorType `xml:"Operator,omitempty"`

	TotalNumberStations *CounterType `xml:"TotalNumberStations,omitempty"`

	SelectedNumberStations *CounterType `xml:"SelectedNumberStations,omitempty"`

	Station []StationType `xml:"Station,omitempty"`
}

type NominalType

type NominalType uint32
const (
	NominalNominal NominalType = 1 + iota
	CalculatedNominal
)

func ToNominalType

func ToNominalType(s string) NominalType

func (NominalType) MarshalXML

func (v NominalType) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (NominalType) MarshalXMLAttr

func (v NominalType) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (NominalType) String

func (v NominalType) String() string

func (*NominalType) UnmarshalXML

func (v *NominalType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*NominalType) UnmarshalXMLAttr

func (v *NominalType) UnmarshalXMLAttr(attr xml.Attr) error

type Numerator

type Numerator struct {
	FloatNoUnitType

	Number CounterType `xml:"number,attr,omitempty"`
}

type NumeratorCoefficient

type NumeratorCoefficient struct {
	I int `xml:"i,attr,omitempty"`

	Value float64 `xml:",chardata"`
}

type OperatorType

type OperatorType struct {
	Agency string `xml:"Agency"`

	Contact []PersonType `xml:"Contact,omitempty"`
}

type PersonType

type PersonType struct {
	Name []string `xml:"Name,omitempty"`

	Agency []string `xml:"Agency,omitempty"`

	Email []EmailType `xml:"Email,omitempty"`

	Phone []PhoneNumberType `xml:"Phone,omitempty"`
}

type PhoneNumber

type PhoneNumber string

type PhoneNumberType

type PhoneNumberType struct {
	Description string `xml:"description,attr,omitempty"`

	CountryCode int `xml:"CountryCode,omitempty"`

	AreaCode int `xml:"AreaCode"`

	PhoneNumber PhoneNumber `xml:"PhoneNumber"`
}

type PoleZeroType

type PoleZeroType struct {
	Number int `xml:"number,attr,omitempty"`

	Real FloatNoUnitType `xml:"Real"`

	Imaginary FloatNoUnitType `xml:"Imaginary"`
}

type PolesZerosType

type PolesZerosType struct {
	BaseFilterType

	PzTransferFunctionType PzTransferFunctionType `xml:"PzTransferFunctionType"`

	NormalizationFactor float64 `xml:"NormalizationFactor,omitempty"`

	NormalizationFrequency FrequencyType `xml:"NormalizationFrequency"`

	Zero []PoleZeroType `xml:"Zero,omitempty"`

	Pole []PoleZeroType `xml:"Pole,omitempty"`
}

type PolynomialType

type PolynomialType struct {
	BaseFilterType

	ApproximationType *ApproximationType `xml:"ApproximationType,omitempty"`

	FrequencyLowerBound FrequencyType `xml:"FrequencyLowerBound"`

	FrequencyUpperBound FrequencyType `xml:"FrequencyUpperBound"`

	ApproximationLowerBound float64 `xml:"ApproximationLowerBound"`

	ApproximationUpperBound float64 `xml:"ApproximationUpperBound"`

	MaximumError float64 `xml:"MaximumError"`

	Coefficient []Coefficient `xml:"Coefficient"`
}

type PzTransferFunctionType

type PzTransferFunctionType uint32
const (
	LaplaceRadiansSecondPzTransferFunction PzTransferFunctionType = 1 + iota
	LaplaceHertzPzTransferFunction
	DigitalZTransformPzTransferFunction
)

func ToPzTransferFunctionType

func ToPzTransferFunctionType(s string) PzTransferFunctionType

func (PzTransferFunctionType) MarshalXML

func (v PzTransferFunctionType) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (PzTransferFunctionType) MarshalXMLAttr

func (v PzTransferFunctionType) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (PzTransferFunctionType) String

func (v PzTransferFunctionType) String() string

func (*PzTransferFunctionType) UnmarshalXML

func (v *PzTransferFunctionType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*PzTransferFunctionType) UnmarshalXMLAttr

func (v *PzTransferFunctionType) UnmarshalXMLAttr(attr xml.Attr) error

type ResponseListElementType

type ResponseListElementType struct {
	Frequency FrequencyType `xml:"Frequency"`

	Amplitude FloatType `xml:"Amplitude"`

	Phase AngleType `xml:"Phase"`
}

type ResponseListType

type ResponseListType struct {
	BaseFilterType

	ResponseListElement []ResponseListElementType `xml:"ResponseListElement,omitempty"`
}

type ResponseStageType

type ResponseStageType struct {
	Number CounterType `xml:"number,attr"`

	ResourceId string `xml:"resourceId,attr,omitempty"`

	PolesZeros *PolesZerosType `xml:"PolesZeros,omitempty"`

	Coefficients *CoefficientsType `xml:"Coefficients,omitempty"`

	ResponseList *ResponseListType `xml:"ResponseList,omitempty"`

	FIR *FIRType `xml:"FIR,omitempty"`

	Decimation *DecimationType `xml:"Decimation,omitempty"`

	StageGain *GainType `xml:"StageGain,omitempty"`

	Polynomial *PolynomialType `xml:"Polynomial,omitempty"`
}

type ResponseType

type ResponseType struct {
	ResourceId string `xml:"resourceId,attr,omitempty"`

	InstrumentSensitivity *SensitivityType `xml:"InstrumentSensitivity,omitempty"`

	InstrumentPolynomial *PolynomialType `xml:"InstrumentPolynomial,omitempty"`

	Stage []ResponseStageType `xml:"Stage,omitempty"`
}

type RestrictedStatusType

type RestrictedStatusType uint32
const (
	OpenRestrictedStatus RestrictedStatusType = 1 + iota
	ClosedRestrictedStatus
	PartialRestrictedStatus
)

func ToRestrictedStatusType

func ToRestrictedStatusType(s string) RestrictedStatusType

func (RestrictedStatusType) MarshalXML

func (v RestrictedStatusType) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (RestrictedStatusType) MarshalXMLAttr

func (v RestrictedStatusType) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (RestrictedStatusType) String

func (v RestrictedStatusType) String() string

func (*RestrictedStatusType) UnmarshalXML

func (v *RestrictedStatusType) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*RestrictedStatusType) UnmarshalXMLAttr

func (v *RestrictedStatusType) UnmarshalXMLAttr(attr xml.Attr) error

type RootType

type RootType struct {
	SchemaVersion float64 `xml:"schemaVersion,attr"`

	Source string `xml:"Source"`

	Sender string `xml:"Sender,omitempty"`

	Module string `xml:"Module,omitempty"`

	Created *DateTime `xml:"Created"`

	Network []NetworkType `xml:"Network"`
}

type SampleRateRatioType

type SampleRateRatioType struct {
	NumberSamples int `xml:"NumberSamples"`

	NumberSeconds int `xml:"NumberSeconds"`
}

type SampleRateType

type SampleRateType struct {
	FloatType
}

type SecondType

type SecondType struct {
	FloatType
}

type SensitivityType

type SensitivityType struct {
	GainType

	InputUnits UnitsType `xml:"InputUnits"`

	OutputUnits UnitsType `xml:"OutputUnits"`

	FrequencyStart *float64 `xml:"FrequencyStart"`

	FrequencyEnd *float64 `xml:"FrequencyEnd"`

	FrequencyDBVariation *float64 `xml:"FrequencyDBVariation"`
}

type SiteType

type SiteType struct {
	Name string `xml:"Name"`

	Description string `xml:"Description,omitempty"`

	Town string `xml:"Town,omitempty"`

	County string `xml:"County,omitempty"`

	Region string `xml:"Region,omitempty"`

	Country string `xml:"Country,omitempty"`
}

type StationType

type StationType struct {
	BaseNodeType

	Latitude LatitudeType `xml:"Latitude"`

	Longitude LongitudeType `xml:"Longitude"`

	Elevation DistanceType `xml:"Elevation"`

	Site SiteType `xml:"Site"`

	WaterLevel *FloatType `xml:"WaterLevel,omitempty"`

	Vault string `xml:"Vault,omitempty"`

	Geology string `xml:"Geology,omitempty"`

	Equipment []EquipmentType `xml:"Equipment,omitempty"`

	Operator []OperatorType `xml:"Operator,omitempty"`

	CreationDate DateTime `xml:"CreationDate,omitempty"`

	TerminationDate DateTime `xml:"TerminationDate,omitempty"`

	TotalNumberChannels *CounterType `xml:"TotalNumberChannels,omitempty"`

	SelectedNumberChannels *CounterType `xml:"SelectedNumberChannels,omitempty"`

	ExternalReference []ExternalReferenceType `xml:"ExternalReference,omitempty"`

	Channel []ChannelType `xml:"Channel,omitempty"`
}

type Symmetry

type Symmetry uint32
const (
	NoneSymmetry Symmetry = 1 + iota
	EvenSymmetry
	OddSymmetry
)

func ToSymmetry

func ToSymmetry(s string) Symmetry

func (Symmetry) MarshalXML

func (v Symmetry) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (Symmetry) MarshalXMLAttr

func (v Symmetry) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (Symmetry) String

func (v Symmetry) String() string

func (*Symmetry) UnmarshalXML

func (v *Symmetry) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*Symmetry) UnmarshalXMLAttr

func (v *Symmetry) UnmarshalXMLAttr(attr xml.Attr) error

type Type

type Type uint32
const (
	Triggered Type = 1 + iota
	Continuous
	Health
	Geophysical
	Weather
	Flag
	Synthesized
	Input
	Experimental
	Maintenance
	Beam
)

func ToType

func ToType(s string) Type

func (Type) MarshalXML

func (v Type) MarshalXML(e *xml.Encoder, start xml.StartElement) error

func (Type) MarshalXMLAttr

func (v Type) MarshalXMLAttr(name xml.Name) (xml.Attr, error)

func (Type) String

func (v Type) String() string

func (*Type) UnmarshalXML

func (v *Type) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

func (*Type) UnmarshalXMLAttr

func (v *Type) UnmarshalXMLAttr(attr xml.Attr) error

type UnitsType

type UnitsType struct {
	Name string `xml:"Name"`

	Description string `xml:"Description,omitempty"`
}

type VoltageType

type VoltageType struct {
	FloatType
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL