tools

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGeospatialData

func GetGeospatialData(gd *GeoData, fs filestore.FileStore, geomFilePath string, sourceCRS string, destinationCRS int) error

GetGeospatialData ...

Types

type ControlFiles

type ControlFiles struct {
	Paths []string
	Data  map[string]interface{} // placeholder
}

ControlFiles ...

type Features

type Features struct {
	Rivers              []VectorLayer
	XS                  []VectorLayer
	Banks               []VectorLayer
	StorageAreas        []VectorLayer
	TwoDAreas           []VectorLayer
	HydraulicStructures []VectorLayer
}

Features ...

type FlowFileContents

type FlowFileContents struct {
	Path                string
	FileExt             string //`json:"File Extension"`
	FlowTitle           string //`json:"Flow Title"`
	ProgramVersion      string //`json:"Program Version"`
	NProfiles           string //`json:"Number of Profiles"`
	ProfileNames        string //`json:"Profile Names"`
	UpdatedProfileNames string //`json:"Updated Profile Names"`
	Notes               string //`json:"Notes"`
}

FlowFileContents keywords and data container for ras flow file search

type ForcingFiles

type ForcingFiles struct {
	Paths []string
	Data  map[string]interface{} // placeholder
}

ForcingFiles ...

type GeoData

type GeoData struct {
	Features     map[string]Features
	Georeference int
}

GeoData ...

type GeomFileContents

type GeomFileContents struct {
	Path           string
	FileExt        string                `json:"File Extension"`
	GeomTitle      string                `json:"Geom Title"`
	ProgramVersion string                `json:"Program Version"`
	Description    string                `json:"Description"`
	Structures     []hydraulicStructures `json:"Hydraulic Structures"`
	Notes          string
}

GeomFileContents keywords and data container for ras flow file search

type GeometryFiles

type GeometryFiles struct {
	Paths              []string
	FeaturesProperties map[string]interface{} // placeholder
	Georeference       interface{}            // placeholder
}

GeometryFiles is a general type that should contain all data pulled from the models spatial files

type InputFiles

type InputFiles struct {
	ControlFiles        ControlFiles
	ForcingFiles        ForcingFiles
	GeometryFiles       GeometryFiles
	SimulationVariables interface{} // placeholder
	LocalVariables      interface{} // placeholder
}

InputFiles is a general type that should contain all data pulled from the models input files

type Model

type Model struct {
	Type           string
	Version        string
	DefinitionFile string
	Files          ModelFiles
}

Model is a general type should contain all necessary data for a model of any type.

type ModelFiles

type ModelFiles struct {
	InputFiles        InputFiles
	OutputFiles       OutputFiles
	SupplementalFiles SupplementalFiles
}

ModelFiles ...

type OutputFiles

type OutputFiles struct {
	Paths           []string
	ModelPrediction interface{} // placeholder
	RunFiles        []string
	RunLogs         []string
}

OutputFiles is a general type that should contain all data pulled from the models output files

type PlanFileContents

type PlanFileContents struct {
	Path            string
	FileExt         string //`json:"File Extension"`
	PlanTitle       string //`json:"Plan Title"`
	ShortIdentifier string //`json:"Short Identifier"`
	ProgramVersion  string //`json:"Program Version"`
	QuasiSteadyFile string //`json:"QuasiSteady File"` //This is not currently used
	UnsteadyFile    string //`json:"Unsteady File"`    //This is not currently used
	GeomFile        string //`json:"Geom File"`
	FlowFile        string //`json:"Flow File"`
	FlowRegime      string //`json:"FlowRegime"`
	Description     string //`json:"Description"`
	Notes           string
}

PlanFileContents keywords and data container for ras plan file search

type PrjFileContents

type PrjFileContents struct {
	ProjTitle       string   //`json:"Proj Title"`
	PlanFile        []string //`json:"Plan File"`
	FlowFile        []string //`json:"Flow File"`
	QuasiSteadyFile []string //`json:"QuasiSteady File"`
	UnsteadyFile    []string //`json:"Unsteady File"`
	GeomFile        []string //`json:"Geom File"`
	Units           string   //`json:"Units"`
	CurrentPlan     string   //`json:"Current Plan"`
	Description     string   //`json:"Description"`

} //

PrjFileContents keywords and data container for ras project file search

type ProjectMetadata

type ProjectMetadata struct {
	ProjFilePath     string
	ProjFileContents PrjFileContents    //`json:"Project Data"`
	PlanFiles        []PlanFileContents //`json:"Plan Data"`
	FlowFiles        []FlowFileContents //`json:"Flow Data"`
	GeomFiles        []GeomFileContents //`json:"Geometry Data"`
	Projection       string             //`json:"Projection"`
	Notes            string             //`json:"Notes"`
}

ProjectMetadata contains information scraped from all files listed in the .prj file

type RasModel

type RasModel struct {
	Type           string
	Version        string
	FileStore      filestore.FileStore
	ModelDirectory string
	FileList       []string
	Metadata       ProjectMetadata
}

RasModel ...

func NewRasModel

func NewRasModel(key string, fs filestore.FileStore) (*RasModel, error)

NewRasModel ...

func (*RasModel) GeospatialData

func (rm *RasModel) GeospatialData(destinationCRS int) (GeoData, error)

GeospatialData ...

func (*RasModel) Index

func (rm *RasModel) Index() Model

Index ...

func (*RasModel) IsAModel

func (rm *RasModel) IsAModel() bool

IsAModel ...

func (*RasModel) IsGeospatial

func (rm *RasModel) IsGeospatial() bool

IsGeospatial ...

func (*RasModel) ModelType

func (rm *RasModel) ModelType() string

ModelType ...

func (*RasModel) ModelVersion

func (rm *RasModel) ModelVersion() string

ModelVersion ...

type SupplementalFiles

type SupplementalFiles struct {
	Paths             []string
	Visulizations     interface{} // placeholder
	ObservationalData interface{} // placeholder
}

SupplementalFiles is a general type that should contain all data pulled from the models supplemental files

type VectorLayer

type VectorLayer struct {
	FeatureName string                 `json:"feature_name"`
	Fields      map[string]interface{} `json:"fields"`
	Geometry    []uint8                `json:"geometry"`
}

VectorLayer ...

Jump to

Keyboard shortcuts

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