Documentation ¶
Index ¶
- Constants
- Variables
- func AverageNanArr(toAverage []float64) float64
- func Circumcenter(a, b, c [2]float64) [2]float64
- func Clip25DTriangleByLine(tv []Triangle, triangleIdx int, lorg, ldir [2]float64)
- func InCircumcircle(a, b, c, d [2]float64) bool
- func InTriangle(a, b, c [2]float64, p [2]float64) bool
- func InTriangleCCW(a, b, c [2]float64, p [2]float64) bool
- func IsCCW(a, b, c [2]float64) bool
- func LatLongToPixelXY(latitude, longitude float64, levelOfDetail uint64) (pixelX, pixelY int64)
- func MapSize(levelOfDetail uint64) uint64
- func Max(x, y float64) float64
- func Min(x, y float64) float64
- func MinInt(x, y int) int
- func Minus(a, b [2]float64) [2]float64
- func Orientation(a, b, c [2]float64) float32
- func PixelXYTToMeters(pixelX, pixelY int64, levelOfDetail uint64) (meterX, meterY float64)
- func PixelXYToLatLong(pixelX, pixelY int64, levelOfDetail uint64) (latitude, longitude float64)
- func PixelXYToTileXY(pixelX, pixelY int64) (tileX, tileY int64)
- func QuadKeyToTileXY(quadKey string) (tileX, tileY int64, levelOfDetail uint64)
- func Res(levelOfDetail uint64) float64
- func SafeGetPixel(src *RasterDouble, w, h, r, c int64) float64
- func SampleNearestValidAvg(src *RasterDouble, _row, _column int, minAveragingSamples int) float64
- func Splice(a, b *QuadEdge)
- func SubSampleRaster3x3(src *RasterDouble, noDataValue float64, w, h, r, c int64) float64
- func SwapTriangles(e *QuadEdge)
- func TileXYToPixelXY(tileX, tileY int64) (pixelX, pixelY int64)
- func TileXYToQuadKey(tileX, tileY int64, levelOfDetail uint64) string
- func VertexEqual(v, o Vertex) bool
- type BBox2d
- func (b *BBox2d) Add(p interface{})
- func (b BBox2d) Contains(point []float64, epsilon float64) bool
- func (b *BBox2d) Grow(delta float64)
- func (b BBox2d) Height() float64
- func (b BBox2d) Intersects(o BBox2d, epsilon float64) bool
- func (b BBox2d) IsOnBorder(point []float64, epsilon float64) bool
- func (b BBox2d) Width() float64
- type BBox3d
- type Candidate
- type CandidateList
- type Data
- type DelaunayMesh
- type DelaunayTriangle
- type Edge
- type Face
- type Line
- type Mesh
- type Normal
- type PQ
- type Plane
- type Pool
- type QuadEdge
- func (e *QuadEdge) Dest() [2]float64
- func (e *QuadEdge) DestNext() *QuadEdge
- func (e *QuadEdge) DestPrev() *QuadEdge
- func (e *QuadEdge) Init()
- func (e *QuadEdge) Init2(ed *QuadEdge)
- func (e *QuadEdge) LeftFace() *DelaunayTriangle
- func (e *QuadEdge) LeftNext() *QuadEdge
- func (e *QuadEdge) LeftPrev() *QuadEdge
- func (e *QuadEdge) Next() *QuadEdge
- func (e *QuadEdge) Orig() [2]float64
- func (e *QuadEdge) OrigNext() *QuadEdge
- func (e *QuadEdge) OrigPrev() *QuadEdge
- func (e *QuadEdge) Pool() *Pool
- func (e *QuadEdge) RecycleNext()
- func (e *QuadEdge) RightNext() *QuadEdge
- func (e *QuadEdge) RightPrev() *QuadEdge
- func (e *QuadEdge) Rot() *QuadEdge
- func (e *QuadEdge) SetDest(d [2]float64)
- func (e *QuadEdge) SetEndPoints(org [2]float64, dest [2]float64)
- func (e *QuadEdge) SetLeftFace(f *DelaunayTriangle)
- func (e *QuadEdge) SetOrig(d [2]float64)
- func (e *QuadEdge) Sym() *QuadEdge
- func (e *QuadEdge) Tor() *QuadEdge
- type Raster
- func (r *Raster) Cols() int
- func (r *Raster) Count() int
- func (r *Raster) East() float64
- func (r *Raster) GetRow(row int) interface{}
- func (r *Raster) North() float64
- func (r *Raster) Rows() int
- func (r *Raster) SetTransform(trans func(*Vertex) Vertex)
- func (r *Raster) SetValue(row, column int, data interface{})
- func (r *Raster) SetXYPos(x, y, res float64)
- func (r *Raster) South() float64
- func (r *Raster) Value(row, column int) interface{}
- func (r *Raster) West() float64
- type RasterChar
- type RasterDouble
- type RasterInt
- type RasterMesh
- type RasterType
- type TileMaker
- type Triangle
- type Vertex
- type VertexIndex
- type VertexReceiverFn
- type ZemlyaMesh
Constants ¶
View Source
const ( RASTER_DATA_TYPE_INT8 = 0 RASTER_DATA_TYPE_UINT8 = 1 RASTER_DATA_TYPE_INT16 = 2 RASTER_DATA_TYPE_UINT16 = 3 RASTER_DATA_TYPE_INT32 = 4 RASTER_DATA_TYPE_UINT32 = 5 RASTER_DATA_TYPE_INT64 = 6 RASTER_DATA_TYPE_UINT64 = 7 RASTER_DATA_TYPE_FLOAT32 = 8 RASTER_DATA_TYPE_FLOAT64 = 9 )
View Source
const ( EarthRadius = 6378137.0 MinLatitude = -85.05112878 MaxLatitude = 85.05112878 MinLongitude = -180.0 MaxLongitude = 180.0 TileSize = 256 MaxLevelOfDetail = 38 HalfCircumference = 20037508.342789243076571549020 )
View Source
const (
EPS = float64(0.000000001)
)
View Source
const (
MAX_AVERAGING_SAMPLES = 64
)
View Source
const (
Nil = 0xFFFFFFFF
)
Variables ¶
View Source
var (
NAN_DATA = Data{/* contains filtered or unexported fields */}
)
Functions ¶
func AverageNanArr ¶
func Circumcenter ¶
func Clip25DTriangleByLine ¶
lp - leftPoints op - otherPoints winding order counter-clockwise = inside + /| / | / | / | / | / | / | / | / | / | l1 s0/ |s1 l0 x----*-----------*-------x / | / |
lp[0] + |
\ | \ | \ | \ | \ | \ | \ | + lp[1]
func InCircumcircle ¶
func InTriangle ¶
func InTriangleCCW ¶
func LatLongToPixelXY ¶
func Orientation ¶
func PixelXYTToMeters ¶
func PixelXYToLatLong ¶
func PixelXYToTileXY ¶
func QuadKeyToTileXY ¶
func SafeGetPixel ¶
func SafeGetPixel(src *RasterDouble, w, h, r, c int64) float64
func SampleNearestValidAvg ¶
func SampleNearestValidAvg(src *RasterDouble, _row, _column int, minAveragingSamples int) float64
func SubSampleRaster3x3 ¶
func SubSampleRaster3x3(src *RasterDouble, noDataValue float64, w, h, r, c int64) float64
func SwapTriangles ¶
func SwapTriangles(e *QuadEdge)
func TileXYToPixelXY ¶
func TileXYToQuadKey ¶
func VertexEqual ¶
Types ¶
type BBox2d ¶
type BBox2d [4]float64
func TileBounds ¶
type Candidate ¶
type CandidateList ¶
type CandidateList struct {
Candidates PQ
}
func (*CandidateList) Empty ¶
func (cl *CandidateList) Empty() bool
func (*CandidateList) GrabGreatest ¶
func (cl *CandidateList) GrabGreatest() *Candidate
func (*CandidateList) Push ¶
func (cl *CandidateList) Push(candidate *Candidate)
func (*CandidateList) Size ¶
func (cl *CandidateList) Size() int
type DelaunayMesh ¶
type DelaunayTriangle ¶
type DelaunayTriangle struct { Anchor *QuadEdge Next *DelaunayTriangle // contains filtered or unexported fields }
func NewDelaunayTriangle ¶
func NewDelaunayTriangle(p *Pool) *DelaunayTriangle
func (*DelaunayTriangle) GetAnchor ¶
func (t *DelaunayTriangle) GetAnchor() *QuadEdge
func (*DelaunayTriangle) GetLink ¶
func (t *DelaunayTriangle) GetLink() *DelaunayTriangle
type Edge ¶
type Edge struct { First VertexIndex Second VertexIndex }
func (*Edge) Assign ¶
func (e *Edge) Assign(a, b VertexIndex)
func (*Edge) SharesPoint ¶
type Face ¶
type Face [3]VertexIndex
type Mesh ¶
type Mesh struct { Vertices []Vertex Normals []Normal Faces []Face Triangles []Triangle BBox [2][3]float64 }
func GenerateTinMesh ¶
func GenerateTinMesh(raster *RasterDouble, maxError float64) *Mesh
type QuadEdge ¶
type QuadEdge struct {
// contains filtered or unexported fields
}
func (*QuadEdge) LeftFace ¶
func (e *QuadEdge) LeftFace() *DelaunayTriangle
func (*QuadEdge) RecycleNext ¶
func (e *QuadEdge) RecycleNext()
func (*QuadEdge) SetEndPoints ¶
func (*QuadEdge) SetLeftFace ¶
func (e *QuadEdge) SetLeftFace(f *DelaunayTriangle)
type Raster ¶
type Raster struct { Size [2]int Bounds [4]float64 NoData interface{} Type int32 Data interface{} Hemlines bool // contains filtered or unexported fields }
func NewRasterWithData ¶
func NewRasterWithNoData ¶
func (*Raster) SetTransform ¶
type RasterChar ¶
type RasterChar struct {
Raster
}
func NewRasterChar ¶
func NewRasterChar(row, column int, noData int8) *RasterChar
func NewRasterCharWithData ¶
func NewRasterCharWithData(row, column int, data []int8) *RasterChar
func (*RasterChar) GetRow ¶
func (r *RasterChar) GetRow(row int) []int8
func (*RasterChar) SetValue ¶
func (r *RasterChar) SetValue(row, column int, data int8)
func (*RasterChar) Value ¶
func (r *RasterChar) Value(row, column int) int8
type RasterDouble ¶
type RasterDouble struct {
Raster
}
func NewRasterDouble ¶
func NewRasterDouble(row, column int, noData float64) *RasterDouble
func NewRasterDoubleWithData ¶
func NewRasterDoubleWithData(row, column int, data []float64) *RasterDouble
func (*RasterDouble) GetRow ¶
func (r *RasterDouble) GetRow(row int) []float64
func (*RasterDouble) SetValue ¶
func (r *RasterDouble) SetValue(row, column int, data float64)
func (*RasterDouble) Value ¶
func (r *RasterDouble) Value(row, column int) float64
type RasterMesh ¶
type RasterMesh struct { DelaunayMesh Raster *RasterDouble }
func (*RasterMesh) LoadRaster ¶
func (r *RasterMesh) LoadRaster(raster *RasterDouble)
type RasterType ¶
type RasterType int
type TileMaker ¶
type TileMaker struct {
// contains filtered or unexported fields
}
func NewTileMaker ¶
type VertexIndex ¶
type VertexIndex int
type VertexReceiverFn ¶
type VertexReceiverFn func(x, y float64, v interface{})
type ZemlyaMesh ¶
type ZemlyaMesh struct { RasterMesh Sample *RasterDouble Insert *RasterDouble Result *RasterDouble Used *RasterChar Token *RasterInt Candidates CandidateList MaxError float64 Counter int CurrentLevel int MaxLevel int }
func NewZemlyaMesh ¶
func NewZemlyaMesh() *ZemlyaMesh
func (*ZemlyaMesh) GreedyInsert ¶
func (z *ZemlyaMesh) GreedyInsert(maxError float64)
func (*ZemlyaMesh) ScanTriangle ¶
func (z *ZemlyaMesh) ScanTriangle(t *DelaunayTriangle)
func (*ZemlyaMesh) ToMesh ¶
func (z *ZemlyaMesh) ToMesh() *Mesh
Click to show internal directories.
Click to hide internal directories.