common

package
v0.0.0-...-62531ef Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2022 License: GPL-3.0 Imports: 11 Imported by: 3

Documentation

Index

Constants

View Source
const (
	BufSize = 50
)
View Source
const DefaultCachePath = "/mnt/bozso_i/cache"

Variables

View Source
var (
	Pols = [4]string{"vv", "hh", "hv", "vh"}

	// TODO: get settings path from environment variable
	Settings = loadSettings(confpath)
)
View Source
var DefaultRngAzi = RngAzi{Rng: 1, Azi: 1}

Functions

func Check

func Check(err error)

func LoadJson

func LoadJson(f path.ValidFile, val interface{}) (err error)

func SaveJson

func SaveJson(val SavePather) (err error)

func SaveJsonTo

func SaveJsonTo(pth path.Like, val interface{}) (err error)

Types

type AOI

type AOI [4]geometry.LatLon

type Dims

type Dims interface {
	Rng() int
	Azi() int
}

type FileParseError

type FileParseError struct {
	// contains filtered or unexported fields
}

func ParseFail

func ParseFail(p path.Pather, err error) FileParseError

func (FileParseError) Error

func (e FileParseError) Error() string

func (FileParseError) ToRetreive

func (e FileParseError) ToRetreive(s string) error

func (FileParseError) Unwrap

func (e FileParseError) Unwrap() error

type IMinmax

type IMinmax struct {
	Min int `name:"min" default:"0"`
	Max int `name:"max" default:"1"`
}

func (*IMinmax) Set

func (mm *IMinmax) Set(s string) (err error)

type LatLon

type LatLon struct {
	Lat float64 `json:"lan"`
	Lon float64 `json:"lot"`
}

func (*LatLon) Set

func (ll *LatLon) Set(s string) (err error)

func (LatLon) String

func (ll LatLon) String() string

type LatLonRegion

type LatLonRegion struct {
	Max geometry.LatLon `json:"max"`
	Min geometry.LatLon `json:"min"`
}

func ParseRegion

func ParseRegion(info params.Parser) (r LatLonRegion, err error)

func (LatLonRegion) Contains

func (ll LatLonRegion) Contains(l geometry.LatLon) (b bool)

func (LatLonRegion) ToRegion

func (ll LatLonRegion) ToRegion() (r geometry.Region)

type MinOrMax

type MinOrMax int
const (
	Min MinOrMax = iota
	Max
)

func (MinOrMax) Parse

func (mode MinOrMax) Parse(info params.Parser) (p geometry.LatLon, err error)

type Minmax

type Minmax struct {
	Min float64 `name:"min" default:"0.0"`
	Max float64 `name:"max" default:"1.0"`
}

type ParseError

type ParseError struct {
	// contains filtered or unexported fields
}

func (ParseError) Error

func (e ParseError) Error() string

func (ParseError) Unwrap

func (e ParseError) Unwrap() error

type Pather

type Pather interface {
	Path() path.ValidFile
}

type Pol

type Pol int
const (
	VV Pol = iota
	VH
	HV
	HH
	AllPolarisation
)

func (*Pol) Set

func (p *Pol) Set(s string) (err error)

func (Pol) String

func (p Pol) String() (s string)

type RngAzi

type RngAzi struct {
	Rng int `json:"rng"`
	Azi int `json:"azi"`
}

func (*RngAzi) Default

func (ra *RngAzi) Default()

func (*RngAzi) Set

func (ra *RngAzi) Set(s string) (err error)

func (RngAzi) String

func (ra RngAzi) String() string

func (RngAzi) Validate

func (ra RngAzi) Validate() (err error)

type SavePather

type SavePather interface {
	SavePath(ext string) path.Like
}

type Slice

type Slice []string

func (Slice) Contains

func (sl Slice) Contains(s string) bool

type Validator

type Validator interface {
	Validate() error
}

type ZeroDimError

type ZeroDimError struct {
	// contains filtered or unexported fields
}

func (ZeroDimError) Error

func (e ZeroDimError) Error() string

func (ZeroDimError) Unwrap

func (e ZeroDimError) Unwrap() error

Jump to

Keyboard shortcuts

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