Documentation ¶
Index ¶
- Variables
- func NewRGBA(r, g, b, a uint8) color.RGBA
- type ContourRectangle
- type DistanceList
- type GridLevelColor
- type GridMatrices
- type ModelType
- type Point
- type PolygonCoordinates
- type PolygonGeometry
- type PredictDate
- type Ring
- type Variogram
- func (variogram *Variogram) Contour(xWidth, yWidth int) *ContourRectangle
- func (variogram *Variogram) ContourWithBBox(bbox [4]float64, width float64) *ContourRectangle
- func (variogram *Variogram) Grid(polygon PolygonCoordinates, width float64) *GridMatrices
- func (variogram *Variogram) Plot(gridMatrices *GridMatrices, width, height int, xlim, ylim [2]float64, ...) *canvas.Canvas
- func (variogram *Variogram) PlotPng(rectangleGrids *ContourRectangle) *image.RGBA
- func (variogram *Variogram) PlotRectangleGrid(contourRectangle *ContourRectangle, width, height int, xlim, ylim [2]float64, ...) *canvas.Canvas
- func (variogram *Variogram) Predict(x, y float64) float64
- func (variogram *Variogram) Train(model ModelType, sigma2 float64, alpha float64) (*Variogram, error)
- func (variogram *Variogram) Variance(x, y float64)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultLegendColor = []color.Color{ NewRGBA(40, 146, 199, 255), NewRGBA(96, 163, 181, 255), NewRGBA(140, 184, 164, 255), NewRGBA(177, 204, 145, 255), NewRGBA(215, 227, 125, 255), NewRGBA(250, 250, 100, 255), NewRGBA(252, 207, 81, 255), NewRGBA(252, 164, 63, 255), NewRGBA(242, 77, 31, 255), NewRGBA(232, 16, 20, 255), } DefaultGridLevelColor = []GridLevelColor{ {Color: NewRGBA(40, 146, 199, 255), Value: [2]float64{-30, -15}}, {Color: NewRGBA(96, 163, 181, 255), Value: [2]float64{-15, -10}}, {Color: NewRGBA(140, 184, 164, 255), Value: [2]float64{-10, -5}}, {Color: NewRGBA(177, 204, 145, 255), Value: [2]float64{-5, 0}}, {Color: NewRGBA(215, 227, 125, 255), Value: [2]float64{0, 5}}, {Color: NewRGBA(250, 250, 100, 255), Value: [2]float64{5, 10}}, {Color: NewRGBA(252, 207, 81, 255), Value: [2]float64{10, 15}}, {Color: NewRGBA(252, 164, 63, 255), Value: [2]float64{15, 20}}, {Color: NewRGBA(247, 122, 45, 255), Value: [2]float64{20, 25}}, {Color: NewRGBA(242, 77, 31, 255), Value: [2]float64{25, 30}}, {Color: NewRGBA(232, 16, 20, 255), Value: [2]float64{30, 40}}, } )
Functions ¶
Types ¶
type ContourRectangle ¶
type DistanceList ¶
type DistanceList [][2]float64
func (DistanceList) Len ¶
func (t DistanceList) Len() int
func (DistanceList) Less ¶
func (t DistanceList) Less(i, j int) bool
func (DistanceList) Swap ¶
func (t DistanceList) Swap(i, j int)
type GridLevelColor ¶
type GridMatrices ¶
type PolygonCoordinates ¶
type PolygonCoordinates []Ring
type PolygonGeometry ¶
type PredictDate ¶
type Variogram ¶
type Variogram struct { Nugget float64 `json:"nugget"` Range float64 `json:"range"` Sill float64 `json:"sill"` A float64 `json:"A"` N int `json:"n"` K []float64 `json:"K"` M []float64 `json:"M"` // contains filtered or unexported fields }
Variogram ordinary kriging variogram
func NewOrdinary ¶
func (*Variogram) Contour ¶
func (variogram *Variogram) Contour(xWidth, yWidth int) *ContourRectangle
Contour contour paths 根据宽高度生成轮廓数据
func (*Variogram) ContourWithBBox ¶
func (variogram *Variogram) ContourWithBBox(bbox [4]float64, width float64) *ContourRectangle
ContourWithBBox contour paths 根据 bbox 生成轮廓数据
func (*Variogram) Grid ¶
func (variogram *Variogram) Grid(polygon PolygonCoordinates, width float64) *GridMatrices
Grid gridded matrices or contour paths 根据 PolygonCoordinates 生成裁剪过的矩阵网格数据 这里 polygon 是一个三维数组,可以变相的支持的多个面,但不符合 Polygon 规范 PolygonCoordinates [[[x,y]],[[x,y]]] 两个面
func (*Variogram) Plot ¶
func (variogram *Variogram) Plot(gridMatrices *GridMatrices, width, height int, xlim, ylim [2]float64, colors []GridLevelColor) *canvas.Canvas
Plot plotting on the canvas 绘制裁剪过的矩阵网格数据到 canvas 上
func (*Variogram) PlotPng ¶
func (variogram *Variogram) PlotPng(rectangleGrids *ContourRectangle) *image.RGBA
PlotPng plot to png
func (*Variogram) PlotRectangleGrid ¶
func (variogram *Variogram) PlotRectangleGrid(contourRectangle *ContourRectangle, width, height int, xlim, ylim [2]float64, colors []color.Color) *canvas.Canvas
PlotRectangleGrid plot to canvas 绘制矩形网格到数据 canvas 上
Click to show internal directories.
Click to hide internal directories.