Documentation
¶
Index ¶
- func Init(fp string) (cogHazardProvider, 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 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 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 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 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