database

package
v1.5.6 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	//go:embed sql/AggResultsNoExclude.sql
	AggResultsNoExclude string
	//go:embed sql/RchAggResultsNoExclude.sql
	RchAggResultsNoExclude string
	//go:embed sql/WelSingleResult.sql
	WelSingleResult string
	//go:embed sql/RchSingleResult.sql
	RchSingleResult string
)

Functions

func AddCellsToOutput added in v1.3.1

func AddCellsToOutput(v *Setup) error

func ConnectSqlite added in v1.1.0

func ConnectSqlite(fileName string) (*sqlx.DB, error)

func FilterCCDryLand

func FilterCCDryLand(cSlice []CoeffCrop, z int, c int) (DryEtAdj float64, DryEtToRo float64, PerToRch float64, DpAdj float64,
	RoAdj float64, err error)

FilterCCDryLand is a function that returns the dryland values of the coefficient of crops table by giving it a slice of CoeffCrop and a zone and crop.

func GetDescription added in v1.1.1

func GetDescription(db *sqlx.DB) (desc string, err error)

func GetFileKeys added in v1.1.0

func GetFileKeys(db *sqlx.DB, wel bool) ([]string, error)

func GetGrid added in v1.3.6

func GetGrid(db *sqlx.DB) (grid int, err error)

func GetSqlite

func GetSqlite(logger lg, path string, fileName string) (*sqlx.DB, error)

GetSqlite gets or sets the connection string for the sqlite3 results database.

It takes no args, and returns the db object for the connection

func GetStartEndYrs added in v1.3.7

func GetStartEndYrs(db *sqlx.DB) (SYr, EYr int, err error)

func GetSteadyState added in v1.3.12

func GetSteadyState(db *sqlx.DB) (bool, error)

func InitializeDb

func InitializeDb(db *sqlx.DB, logger lg) error

InitializeDb creates the database results table if it doesn't exist, so the records of the transaction can be stored properly, also creates file_keys table for result file_type integer and a foreign key restriction to results table

func PgConnx

func PgConnx(myEnv map[string]string) (*sqlx.DB, error)

PgConnx is a function that returns the sql connection to the postgres database.

Types

type Adjustment

type Adjustment int
const (
	DryET Adjustment = 1
	IrrEt Adjustment = 2
	NirEt Adjustment = 3
)

type CellIntersect

type CellIntersect struct {
	Node      int             `db:"node"`
	Soil      int             `db:"soil_code"`
	CZone     int             `db:"coeff_zone"`
	CellArea  float64         `db:"cell_area"`
	Mtg       sql.NullFloat64 `db:"mtg"`
	NpIrrArea sql.NullFloat64 `db:"nip_area"`
	NpDryArea sql.NullFloat64 `db:"ndp_area"`
	SpIrrArea sql.NullFloat64 `db:"sip_area"`
	SpDryArea sql.NullFloat64 `db:"sdp_area"`
	PointX    float64         `db:"pointx"`
	PointY    float64         `db:"pointy"`
}

func GetCellAreas

func GetCellAreas(v *Setup, y int) (cells []CellIntersect, err error)

GetCellAreas is a function to return the amount of area within each model cell that is covered by parcels of irrigated and dryland. It also returns the area, soil code, and zone of the cell in a slice of CellIntersect Struct. It implements the debug mode to only return 200 cells which were selected as having good data.

func GetSSCellAreas1 added in v1.3.12

func GetSSCellAreas1(v *Setup) (cells []CellIntersect, err error)

GetSSCellAreas1 is a function for the Steady State Run to return the amount of area within each model cell for the first two stress periods. NO parcels are included. It returns the area, soil code, and zone of the cell in a slice of CellIntersect Struct.

func GetSSCellAreas2 added in v1.3.12

func GetSSCellAreas2(v *Setup) (cells []CellIntersect, err error)

GetSSCellAreas2 is a function to return the amount of area within each model cell that is covered by parcels of surface water irrigated and dryland parcels. It returns the area, soil code, and zone of the cell in a slice of CellIntersect Struct.

func (CellIntersect) GetLossFactor added in v1.2.0

func (c CellIntersect) GetLossFactor() float64

func (CellIntersect) GetXY

func (c CellIntersect) GetXY() (x float64, y float64)

GetXY is a method of CellIntersect struct that returns the XY locations for use in the Distances function and is required by the XyPoints interface.

func (CellIntersect) VegArea

func (c CellIntersect) VegArea() float64

VegArea is a method of the CellIntersect struct that returns the total area that isn't covered by a parcel (dry or irr) of a cell and returns an area. Checks for cropArea > cell area as small parcel overlaps can make this negative which cannot be introduced to equations.

type Cellrc added in v1.3.1

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

type CellrcDB added in v1.3.1

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

func CellRCDB added in v1.3.1

func CellRCDB(sqlDB *sqlx.DB) (*CellrcDB, error)

func (*CellrcDB) Add added in v1.3.1

func (db *CellrcDB) Add(c Cellrc) error

func (*CellrcDB) Close added in v1.3.1

func (db *CellrcDB) Close() error

func (*CellrcDB) Flush added in v1.3.1

func (db *CellrcDB) Flush() error

type CoeffCrop

type CoeffCrop struct {
	Zone         int     `db:"zone"`
	Crop         int     `db:"crop"`
	DryEtAdj     float64 `db:"dryetadj"`
	IrrEtAdj     float64 `db:"irretadj"`
	NirAdjFactor float64 `db:"niradjfactor"`
	FslGW        float64 `db:"fslgw"`
	DryEtToRo    float64 `db:"dryettoro"`
	FslSW        float64 `db:"fslsw"`
	PerToRch     float64 `db:"pertorch"`
	DpAdj        float64 `db:"dpadj"`
	RoAdj        float64 `db:"roadj"`
}

func GetCoeffCrops

func GetCoeffCrops(v *Setup) (CoeffCrops []CoeffCrop, err error)

GetCoeffCrops is a function that calls the database to get the list of coefficients for each crop and zone in the model and returns a slice of CoeffCrop.

func (CoeffCrop) FilterValues

func (coeff CoeffCrop) FilterValues() (z, c int)

FilterValues is a method that will return the values that you would use to filter a slice of CoeffCrop struct for a filter function, returns the zone and the crop as integers

type DB

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

func PNirDB

func PNirDB(sqlDB *sqlx.DB) (*DB, error)

func (*DB) Add

func (db *DB) Add(pNir PNir) error

func (*DB) Close

func (db *DB) Close() error

func (*DB) Flush

func (db *DB) Flush() error

type DryCell

type DryCell struct {
	Node     int             `db:"node"`
	Mtg      sql.NullFloat64 `db:"mtg"`
	CellArea float64         `db:"c_area"`
	DryArea  float64         `db:"d_area"`
	PId      int64           `db:"parcel_id"`
	Nrd      string          `db:"nrd"`
}

DryCell is a struct that holds the data for each cell and the parcel data associated with it including crops and the amount of crop that is included.

func GetDryCells

func GetDryCells(v *Setup, yr int) []DryCell

GetDryCells is a function that returns a struct of cells with parcels that are within it including the crops and acres within each cell. If there are more then one parcel within a cell, the cell will be listed multiple times.

func GetDrySSCells added in v1.3.12

func GetDrySSCells(v *Setup) []DryCell

func (DryCell) GetLossFactor added in v1.2.0

func (d DryCell) GetLossFactor() float64

type Efficiency

type Efficiency struct {
	Yr          int     `db:"yr"`
	AeFlood     float64 `db:"ae_flood"`
	AeSprinkler float64 `db:"ae_sprinkler"`
}

func GetAppEfficiency

func GetAppEfficiency(pgDB *sqlx.DB) (efficiencies []Efficiency)

GetAppEfficiency is a function that returns the application efficiency for use in calculations throughout the app.

func GetSSAppEfficiency added in v1.3.12

func GetSSAppEfficiency() (efficiencies []Efficiency)

GetSSAppEfficiency is a function that returns the application efficiency for use in calculations throughout the Steady State portion of the app, it is fixed and doesn't use the database. The values are fixed and are made for years of 1893 through 1952.

type ExtRch added in v1.0.4

type ExtRch struct {
	Node     int     `db:"node"`
	Size     float64 `db:"cell_size"`
	Yr       int     `db:"yr"`
	Mnth     int     `db:"mnth"`
	FileType int     `db:"file_type"`
	Rch      float64 `db:"rch"`
}

func GetExtRecharge added in v1.0.4

func GetExtRecharge(v *Setup) (eRch []ExtRch, err error)

GetExtRecharge is a function to return a slice of ExtRch filled with the ext_recharge data from the database and used in the model to create the recharge values for the external non-NRD areas.

func (*ExtRch) Date added in v1.0.4

func (e *ExtRch) Date() time.Time

Date is a method to return a formatted date object for the ExtRch struct using its components and setting the day to 1 and 0 hours in UTC.

type ExtWell added in v1.0.4

type ExtWell struct {
	Yr       int     `db:"yr"`
	Mnth     int     `db:"mnth"`
	FileType int     `db:"file_type"`
	Pumping  float64 `db:"pmp"`
	Node     int     `db:"node"`
}

func GetExternalWells added in v1.0.4

func GetExternalWells(v *Setup) (extWells []ExtWell, err error)

GetExternalWells is a function to query the external pumping from the database and returns a slice of ExtWell as well as includes handling the debug mode.

func (*ExtWell) Date added in v1.0.4

func (w *ExtWell) Date() time.Time

Date returns the formatted date of the ExtWell struct with a 1 for the day and zero hour in UTC.

func (*ExtWell) Pmp added in v1.0.4

func (w *ExtWell) Pmp() float64

Pmp is a method that returns the correct pumping values for each value

type FileKeys added in v1.1.0

type FileKeys struct {
	FileKey     int    `db:"file_key"`
	Description string `db:"description"`
}

func (FileKeys) Print added in v1.1.0

func (f FileKeys) Print() string

type IrrCell

type IrrCell struct {
	Node     int             `db:"node"`
	CellArea float64         `db:"c_area"`
	IrrArea  float64         `db:"i_area"`
	ParcelId int             `db:"parcel_id"`
	Nrd      string          `db:"nrd"`
	Mtg      sql.NullFloat64 `db:"mtg"`
}

IrrCell is a struct to hold the data of each cell and parcel intersect, it includes the cert, crops, and other characteristics important to the calculations.

func GetCellsIrr

func GetCellsIrr(v *Setup, yr int) ([]IrrCell, error)

GetCellsIrr gets the cells that have irrigation within them and splits them by parcel. If a cell has multiple parcels there will be multiples of the same cell listed. This includes both nrd irrigated acres.

func GetCellsIrrPost97 added in v1.2.3

func GetCellsIrrPost97(v *Setup, yr int) ([]IrrCell, error)

GetCellsIrrPost97 a Post 97 version of this function that gets the cells that have irrigation within them and splits them by parcel. If a cell has multiple parcels there will be multiples of the same cell listed. This includes both nrd irrigated acres. It limits to the actual parcels during that year without GWO, then goes to 1997 for GWO parcels, combines them and sends it off.

func GetSSCellsIrr added in v1.3.12

func GetSSCellsIrr(v *Setup) ([]IrrCell, error)

GetSSCellsIrr is a function to return the irrigated cells for 1953 only where there are surface water parcels. Any GW only parcels are not included in this function.

func (IrrCell) GetLossFactor added in v1.2.0

func (i IrrCell) GetLossFactor() float64

type IrrCellResult

type IrrCellResult struct {
	Node int
	RO   [12]float64
	DP   [12]float64
	Yr   int
	File int
}

type IrrDB

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

func IrrResultDB

func IrrResultDB(sqlDB *sqlx.DB) (*IrrDB, error)

IrrResultDB is a function that returns the IrrDB struct setup to insert values into the results database for the Irrigated parcel functions.

func (*IrrDB) Add

func (db *IrrDB) Add(i IrrCellResult) error

Add is a method to NvDB to add a record that will get saved.

func (*IrrDB) Close

func (db *IrrDB) Close() error

Close is a method to close the statement, but does not close the DB as it's used in other places around the App.

func (*IrrDB) Flush

func (db *IrrDB) Flush() error

Flush is a method to flush the buffer of records and save them to the db.

type MIPumping added in v1.1.0

type MIPumping struct {
	WellId   int       `db:"well_id"`
	PumpDate time.Time `db:"dt"`
	Pump     float64   `db:"pumping"`
}

type MIWell added in v1.1.0

type MIWell struct {
	WellId     int    `db:"id"`
	WellName   string `db:"wellname"`
	Rate       int    `db:"defaultq"`
	MuniWell   bool   `db:"muni_well"`
	IndustWell bool   `db:"indust_well"`
	Stop97     bool   `db:"stop_97"`
	Start97    bool   `db:"start_97"`
	Node       int    `db:"node"`
	Pumping    []MIPumping
}

func GetMIWells added in v1.1.0

func GetMIWells(v *Setup) (miWells []MIWell, err error)

func (*MIWell) MIFileType added in v1.1.0

func (w *MIWell) MIFileType() int

type MfResults added in v1.1.0

type MfResults struct {
	CellNode       int             `db:"cell_node"`
	CellSize       sql.NullFloat64 `db:"cell_size"`
	ResultDate     time.Time       `db:"dt"`
	Rslt           float64         `db:"rslt"`
	Rw             sql.NullInt64   `db:"rw"`
	Clm            sql.NullInt64   `db:"clm"`
	ConvertedValue bool            // value in Rslt is already converted, no need to use convert methods
}

func GetAggResults added in v1.1.0

func GetAggResults(db *sqlx.DB, wel bool, excludeList []string) ([]MfResults, error)

func SingleResult added in v1.1.0

func SingleResult(db *sqlx.DB, wel bool, fileKey string) ([]MfResults, error)

func (MfResults) ConvertToFt3PDay added in v1.3.12

func (m MfResults) ConvertToFt3PDay() float64

func (MfResults) ConvertToFtPDay added in v1.3.12

func (m MfResults) ConvertToFtPDay() float64

func (MfResults) Date added in v1.1.0

func (m MfResults) Date() time.Time

func (MfResults) IsNodeResult added in v1.3.12

func (m MfResults) IsNodeResult() bool

func (MfResults) Month added in v1.3.12

func (m MfResults) Month() int

func (MfResults) Node added in v1.1.0

func (m MfResults) Node() int

func (MfResults) RowCol added in v1.3.1

func (m MfResults) RowCol() (int, int)

func (*MfResults) SetConvertedValue added in v1.3.12

func (m *MfResults) SetConvertedValue()

func (MfResults) UseValue added in v1.3.12

func (m MfResults) UseValue() bool

func (MfResults) Value added in v1.1.0

func (m MfResults) Value() float64

func (MfResults) Year added in v1.3.12

func (m MfResults) Year() int

type ModelCell

type ModelCell struct {
	Node      int     `db:"node"`
	SoilCode  int     `db:"soil_code"`
	CoeffZone int     `db:"coeff_zone"`
	Zone      int     `db:"zone"`
	Mtg       float64 `db:"mtg"`
	PointX    float64 `db:"pointx"`
	PointY    float64 `db:"pointy"`
	Rw        int     `db:"rw"`
	Clm       int     `db:"clm"`
}

func GetCells

func GetCells(v *Setup) (cells []ModelCell, err error)

GetCells is a function to retrieve the model cells from the database and return a struct of ModelCell. It also handles debug mode to only return a slice of 50 cells.

func (ModelCell) GetNodeRC added in v1.3.1

func (m ModelCell) GetNodeRC() (node, rw, clm int)

GetNodeRC is a method of ModelCell to return the node, rw, clm of the model cell.

func (ModelCell) GetXY

func (m ModelCell) GetXY() (x float64, y float64)

GetXY is a method of ModelCell to return the XY Coordinates of the model cell.

type Note added in v1.2.3

type Note struct {
	Nt string `db:"note"`
}

type NoteDB added in v1.2.3

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

func ResultsNoteDB added in v1.2.3

func ResultsNoteDB(sqlDB *sqlx.DB) (*NoteDB, error)

ResultsNoteDB is a function that returns a db struct that includes a sql connection, a insert statement, and buffer to add notes to the output database.

func (*NoteDB) Add added in v1.2.3

func (db *NoteDB) Add(n Note) error

Add is a method on NoteDB that will add a text message to the output db results_notes table

func (*NoteDB) Close added in v1.2.3

func (db *NoteDB) Close() error

func (*NoteDB) Flush added in v1.2.3

func (db *NoteDB) Flush() error

type Option added in v1.2.0

type Option func(*Setup)

func WithDebug added in v1.2.0

func WithDebug() Option

func WithLogger added in v1.2.0

func WithLogger(path string, fileName string) Option

func WithMF640Grid added in v1.3.7

func WithMF640Grid() Option

func WithNoExcessFlow added in v1.5.0

func WithNoExcessFlow() Option

func WithNoSQLite added in v1.2.0

func WithNoSQLite() Option

func WithOldGrid added in v1.3.0

func WithOldGrid() Option

func WithPost97 added in v1.2.3

func WithPost97() Option

func WithSteadyState added in v1.3.12

func WithSteadyState(startYr, endYr int) Option

WithSteadyState sets the Steady State Bool to true and also sets the years to SYear to 1893 and EYear to 1952

type PNir

type PNir struct {
	ParcelNo  int
	Nrd       string
	ParcelNIR [12]float64
	Year      int
	IrrType   int
}

type PPDB

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

func ParcelPumpDB

func ParcelPumpDB(sqlDB *sqlx.DB) (*PPDB, error)

func (*PPDB) Add

func (db *PPDB) Add(pPump Pumping) error

func (*PPDB) Close

func (db *PPDB) Close() error

func (*PPDB) Flush

func (db *PPDB) Flush() error

type Pumping

type Pumping struct {
	ParcelID int       `db:"parcelID"`
	Nrd      string    `db:"nrd"`
	Dt       time.Time `db:"dt"`
	FileType int       `db:"file_type"`
	Pump     float64   `db:"pump"`
}

type RchDB

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

func ResultsRchDB

func ResultsRchDB(sqlDB *sqlx.DB) (*RchDB, error)

func (*RchDB) Add

func (db *RchDB) Add(conveyLoss RchResult) error

func (*RchDB) Close

func (db *RchDB) Close() error

func (*RchDB) Flush

func (db *RchDB) Flush() error

type RchResult

type RchResult struct {
	Node     int       `db:"cell_node"`
	Size     float64   `db:"cell_size"`
	Dt       time.Time `db:"dt"`
	FileType int       `db:"file_type"`
	Result   float64   `db:"result"`
}

type ResultsNote added in v1.1.1

type ResultsNote struct {
	Id   int    `db:"id"`
	Note string `db:"note"`
}

type SSWell added in v1.0.4

type SSWell struct {
	Id       int `db:"id"`
	WellName int `db:"wellname"`
	Rate     int `db:"defaultq"`
	Node     int `db:"node"`
	MVolume  [12]float64
}

func GetSSWells added in v1.0.4

func GetSSWells(v *Setup) (ssWells []SSWell, err error)

GetSSWells is a function that gets the data from the postgres DB and returns a slice of SSWell and also includes a call to the SSWell.monthlyVolume() method to set the monthly data from the annual data that is in the database.

type SWDelDB added in v1.2.2

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

func SWDeliveryDB added in v1.2.2

func SWDeliveryDB(sqlDB *sqlx.DB) (*SWDelDB, error)

func (*SWDelDB) Add added in v1.2.2

func (db *SWDelDB) Add(delivery SWDelResult) error

func (*SWDelDB) Close added in v1.2.2

func (db *SWDelDB) Close() error

func (*SWDelDB) Flush added in v1.2.2

func (db *SWDelDB) Flush() error

type SWDelResult added in v1.2.2

type SWDelResult struct {
	CanalId   int       `db:"canalId"`
	Dt        time.Time `db:"dt"`
	DelAmount float64   `db:"delAmount"`
}

type Setup

type Setup struct {
	PgDb         *sqlx.DB
	SqliteDB     bool
	SlDb         *sqlx.DB
	SYear        int
	EYear        int
	Logger       *logging.TheLogger
	PNirDB       *DB
	RchDb        *RchDB
	AppDebug     bool
	NoExcessFlow bool
	Post97       bool
	OldGrid      bool
	MF640Grid    bool
	SteadyState  bool
}

func NewSetup added in v1.2.0

func NewSetup(myEnv map[string]string, options ...Option) (*Setup, error)

NewSetup is an initialization function for the Setup struct that sets the initial database connections, logger, and stores the flags for excess flow and debug.

func (*Setup) CellType added in v1.3.0

func (s *Setup) CellType() int

func (*Setup) SetYears

func (s *Setup) SetYears(sYear, eYear int) error

SetYears is an initializer method for the Setup struct to set the start and end years of the application run.

type StDistances

type StDistances struct {
	Station  string
	Distance float64
	Weight   float64
}

func Distances

func Distances(points XyPoints, wStations []WeatherStation) (dist []StDistances, err error)

Distances is a function that that returns the top three weather stations from the list with the appropriate weighting factor. Used to make CSResults Distribution.

type WeatherStation

type WeatherStation struct {
	Code   string  `db:"code"`
	PointX float64 `db:"pointx"`
	PointY float64 `db:"pointy"`
}

func GetWeatherStations

func GetWeatherStations(db *sqlx.DB) (wStations []WeatherStation, err error)

GetWeatherStations is a function to return a slice of WeatherStation that includes the weather station text id (code) and the X and Y coordinates of it's location.

type WelAnnualResult added in v1.0.4

type WelAnnualResult struct {
	Wellid   int
	Node     int
	Yr       int
	FileType int
	Result   [12]float64
}

WelAnnualResult is a struct that is used to construct the well result and includes a 12-month array

func (*WelAnnualResult) AddPumping added in v1.0.4

func (wr *WelAnnualResult) AddPumping(pump [12]float64, welCount float64)

AddPumping is a method to add more pumping to the WelAnnualResult by pumping and a welCount that is the number of wells that it should be divided by.

type WelDB added in v1.0.4

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

WelDB is a struct for the sql database, statement and buffer that is used to save information in chunks

func ResultsWelDB added in v1.0.4

func ResultsWelDB(sqlDB *sqlx.DB) (*WelDB, error)

ResultsWelDB is a function that creates the WelDB struct and contains the SQL statement to insert the records, it also accepts a slice of WelResult used for the buffer

func (*WelDB) Add added in v1.0.4

func (db *WelDB) Add(value interface{}) error

Add is a method of WelDB that adds a record to the buffer, but we accept a WelAnnualResult or WelResult struct and create 12 WelResult records for WelAnnualResult and remove the zeros. If there is a WelResult sent it will just save that value directly to the buffer. If the buffer is full it calls the Flush method.

func (*WelDB) Close added in v1.0.4

func (db *WelDB) Close() error

Close is a method to call the Flush method once more and then calls the close for the statement

func (*WelDB) Flush added in v1.0.4

func (db *WelDB) Flush() error

Flush is a method to empty the buffer by executing the SQL statement, inserting the records and then clears out the buffer and commits to the database.

type WelResult added in v1.0.4

type WelResult struct {
	Wellid   int       `db:"well_id"`
	Node     int       `db:"cell_node"`
	Dt       time.Time `db:"dt"`
	FileType int       `db:"file_type"`
	Result   float64   `db:"result"`
}

WelResult is a struct for the final result to be saved to db that is a value per well, per month

type WellNode added in v1.0.4

type WellNode struct {
	WellId int            `db:"wellid"`
	RegCd  sql.NullString `db:"regcd"`
	Node   int            `db:"node"`
	Nrd    string         `db:"nrd"`
}

func GetWellNode added in v1.0.4

func GetWellNode(v *Setup) (wellNodes []WellNode, err error)

GetWellNode is a function that gets the wellid, regno and node number of the well so that we can add a location to the well when it is written out along with the nrd.

type WellParcel added in v1.0.4

type WellParcel struct {
	ParcelId int    `db:"parcel_id"`
	WellId   int    `db:"wellid"`
	Nrd      string `db:"nrd"`
	Yr       int    `db:"yr"`
}

func GetWellParcels added in v1.0.4

func GetWellParcels(v *Setup) ([]WellParcel, error)

GetWellParcels is a function that gets all the well parcel junction table values and creates one struct from them and also includes the year of the join as well as the nrd.

func GetWellParcelsPost97 added in v1.2.3

func GetWellParcelsPost97(v *Setup) ([]WellParcel, error)

GetWellParcelsPost97 is a function that gets all the well parcel junction table values and creates one struct from them and also includes the year of the join as well as the nrd but replaces any GWO parcels with the 1997 GWO parcels.

type XyPoints

type XyPoints interface {
	GetXY() (x float64, y float64)
}

XyPoints is an interface that uses the GetXY method and is used by the Distances function to enable different structs to be able to input to the Distances function.

Jump to

Keyboard shortcuts

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