Documentation
¶
Index ¶
- func Init(fp string) (cogHazardProvider, error)
- func InitADDMHP(fp string) (jsonArrivalDepthDurationMultiHazardProvider, error)
- func InitCSV(fp string, b geography.BBox) (csvArrivalDepthDurationMultiHazardProvider, error)
- func InitDaAHP(durationfp string, arrivalfp string, startTime time.Time) (cogDurationAndArrivalHazardProvider, error)
- func InitMulti(hpinfo HazardProviderInfo) (cogMultiHazardProvider, error)
- func Init_CustomFunction(fp string, function HazardFunction) (cogHazardProvider, error)
- func Init_Meters(fp string) (cogHazardProvider, error)
- func Init_Meters_CustomFunction(fp string, function HazardFunction) (cogHazardProvider, error)
- type ADDEvents
- type ADDProperties
- type HazardError
- type HazardFunction
- type HazardProvider
- type HazardProviderInfo
- type HazardProviderParameterAndPath
- type NoDataHazardError
- type NoFrequencyFoundError
- type NoHazardFoundError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitADDMHP ¶
func InitDaAHP ¶
func InitDaAHP(durationfp string, arrivalfp string, startTime time.Time) (cogDurationAndArrivalHazardProvider, error)
Init creates and produces an unexported cogHazardProvider
func InitMulti ¶
func InitMulti(hpinfo HazardProviderInfo) (cogMultiHazardProvider, error)
InitMulti creates and produces an unexported cogMultiHazardProvider
func Init_CustomFunction ¶
func Init_CustomFunction(fp string, function HazardFunction) (cogHazardProvider, error)
func Init_Meters ¶
func Init_Meters_CustomFunction ¶
func Init_Meters_CustomFunction(fp string, function HazardFunction) (cogHazardProvider, error)
Types ¶
type ADDEvents ¶
type ADDEvents struct {
Events []ADDProperties `json:"events"`
}
type ADDProperties ¶
type ADDProperties struct {
Year float64 `json:"year"`
Month float64 `json:"month"`
Day float64 `json:"day"`
Depth float64 `json:"depth"`
Depthgrid string `json:"depthgrid"`
Duration float64 `json:"duration"`
Xmin float64 `json:"xmin"`
Xmax float64 `json:"xmax"`
Ymin float64 `json:"ymin"`
Ymax float64 `json:"ymax"`
}
type HazardError ¶
type HazardError struct {
Input string
}
HazardError is an error for a generic hazarderror for the given args
func (HazardError) Error ¶
func (h HazardError) Error() string
Error implements the error interface for HazardError
type HazardFunction ¶
type HazardFunction func(valueIn hazards.HazardData, hazard hazards.HazardEvent) (hazards.HazardEvent, error)
func ArrivalAndDurationHazardFunction ¶
func ArrivalAndDurationHazardFunction() HazardFunction
func ArrivalDepthAndDurationHazardFunction ¶
func ArrivalDepthAndDurationHazardFunction() HazardFunction
func DepthAndDurationHazardFunction ¶
func DepthAndDurationHazardFunction() HazardFunction
func DepthHazardFunction ¶
func DepthHazardFunction() HazardFunction
type HazardProvider ¶
type HazardProvider interface {
Hazard(location geography.Location) (hazards.HazardEvent, error)
//ProcessedHazard(location geography.Location, process HazardFunction) (hazards.HazardEvent, error)
HazardBoundary() (geography.BBox, error)
Close()
}
HazardProvider provides hazards as a return for an argument input
type HazardProviderInfo ¶
type HazardProviderInfo struct {
Hazards []HazardProviderParameterAndPath `json:"hazards"`
StartTime time.Time `json:"start_time"`
EndTime time.Time `json:"end_time"`
}
func (HazardProviderInfo) CreateHazardProvider ¶
func (info HazardProviderInfo) CreateHazardProvider() (HazardProvider, error)
type NoDataHazardError ¶
type NoDataHazardError struct {
Input string
}
NoDataHazardError is an error for a situation where no hazard could be computed for the given args
func (NoDataHazardError) Error ¶
func (h NoDataHazardError) Error() string
Error implements the error interface for NoDataHazardError
type NoFrequencyFoundError ¶
type NoFrequencyFoundError struct {
Input string
}
NoFrequencyFoundError is an error for a situation where no frequency could be associated for the hazard for the given args
func (NoFrequencyFoundError) Error ¶
func (h NoFrequencyFoundError) Error() string
Error implements the error interface for NoFrequencyFoundError
type NoHazardFoundError ¶
type NoHazardFoundError struct {
Input string
}
NoHazardFoundError is an error for a situation where no hazard could be computed for the given args
func (NoHazardFoundError) Error ¶
func (h NoHazardFoundError) Error() string
Error implements the error interface for NoHazardFoundError