geom

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoundsGeom

func BoundsGeom(xmin, xmax, ymin, ymax float64) (*geos.Geom, error)

func BoundsWKT

func BoundsWKT(xmin, xmax, ymin, ymax float64) string

func CenterFromGeometry

func CenterFromGeometry(g *geos.Geom) []float64

func CircleGeom

func CircleGeom(origin []float64, radius float64, numPoints int) (*geos.Geom, error)

func CircleWKT

func CircleWKT(origin []float64, radius float64, numPoints int) (string, error)

func DrawCoordLine

func DrawCoordLine(gc draw2d.GraphicContext, lineCoords [][]float64, lineWidth float64, fillColor color.Color, strokeWidth float64, strokeColor color.Color, scale func(x, y float64) (float64, float64)) error

func DrawDot

func DrawDot(gc *draw2dimg.GraphicContext, radius, x, y float64) error

func DrawLine

func DrawLine(gc draw2d.GraphicContext, g *geos.Geom, lineWidth float64, fillColor color.Color, strokeWidth float64, strokeColor color.Color, scale func(x, y float64) (float64, float64)) error

func DrawPoint

func DrawPoint(gc draw2d.GraphicContext, g *geos.Geom, radius float64, fillColor color.Color, strokeWidth float64, strokeColor color.Color, scale func(x, y float64) (float64, float64)) error

func DrawPolygon

func DrawPolygon(gc draw2d.GraphicContext, g *geos.Geom, fillColor color.Color, strokeColor color.Color, strokeWidth float64, scale func(x, y float64) (float64, float64)) error

func DrawRune

func DrawRune(gc *draw2dimg.GraphicContext, pos []float64, f font.Face, rotation float64, char rune) error

func DrawString

func DrawString(gc *draw2dimg.GraphicContext, pos []float64, rotation float64, text string) error

func GetGeometryCenter

func GetGeometryCenter(g *geos.Geom, scale func(x, y float64) (float64, float64)) ([]float64, error)

func GetOrd

func GetOrd(cs *geos.CoordSeq, fn func(*geos.CoordSeq, int) float64) func(int) float64

func GetPoints

func GetPoints(list ...*geos.Geom) *[][]float64

func ScaleLine

func ScaleLine(g *geos.Geom, scale func(x, y float64) (float64, float64)) (*geos.Geom, error)

func SimplifyGeom

func SimplifyGeom(g *geos.Geom, lvl float64) *geos.Geom

func ToLineString

func ToLineString(g *geos.Geom) (*geos.Geom, error)

func ToPolygon

func ToPolygon(g *geos.Geom) (*geos.Geom, error)

Types

type Envelope

type Envelope struct {
	Min, Max []float64
}

func ToEnvelope

func ToEnvelope(g *geos.Geom) (Envelope, error)

func (Envelope) Dx

func (e Envelope) Dx() float64

func (Envelope) Dy

func (e Envelope) Dy() float64

func (Envelope) Px

func (e Envelope) Px(x float64) float64

func (Envelope) Py

func (e Envelope) Py(y float64) float64

type LineData

type LineData struct {
	Pos    []float64
	Angle  float64
	Length float64
}

func (LineData) String

func (d LineData) String() string

type MultiLineData

type MultiLineData []LineData

func TransposeMultiLineData

func TransposeMultiLineData(in text.MultiLineData) MultiLineData

func (MultiLineData) String

func (ld MultiLineData) String() string

func (MultiLineData) ToGeom

func (ld MultiLineData) ToGeom(origin []float64) (*geos.Geom, error)

func (MultiLineData) ToWKT

func (ld MultiLineData) ToWKT(origin []float64) string

Jump to

Keyboard shortcuts

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