relate

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2022 License: LGPL-2.1 Imports: 5 Imported by: 0

Documentation

Overview

Package relate the criteria for judging the various topological relations between points, line and surface entities in DE-9IM model are given.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrossProduct

func CrossProduct(aStart, aEnd, bStart, bEnd matrix.Matrix) float64

CrossProduct Returns cross product of a,b Matrix.

func IM

func IM(g0, g1 matrix.Steric, intersectBound bool) *matrix.IntersectionMatrix

IM Gets the relate for the spatial relationship between the input geometries.

func InLine

func InLine(spot, a, b matrix.Matrix) (in bool, isVertex bool)

InLine returns true if spot in ab,false else.

func InLineMatrix

func InLineMatrix(spot matrix.Matrix, matr matrix.LineMatrix) bool

InLineMatrix returns true if spot in LineMatrix,false else..

func InLineVertex

func InLineVertex(spot matrix.Matrix, matr matrix.LineMatrix) (bool, bool)

InLineVertex returns true if spot in LineVertex,false else..

func InPolygon

func InPolygon(point matrix.Matrix, poly matrix.LineMatrix) bool

InPolygon returns true if pt is inside pg.

Segments of the polygon are allowed to cross. InPolygon this case they divide the polygon into multiple regions. The function returns true for points in regions on the perimeter of the polygon. The return value for interior regions is determined by a two coloring of the regions.

If point is exactly on a segment or vertex of polygon, the method may return true or false.

func IsIntersectionEdge

func IsIntersectionEdge(aLine, bLine matrix.LineMatrix) (mark bool)

IsIntersectionEdge returns intersection of edge a and b.

func IsIntersectionLineSegment

func IsIntersectionLineSegment(l, o *matrix.LineSegment) bool

IsIntersectionLineSegment returns intersection of a and other.

func Relate

func Relate(g0, g1 matrix.Steric, intersectBound bool) string

Relate Gets the relate string for the spatial relationship between the input geometries.

Types

type Computer

type Computer struct {
	Arg            []matrix.Steric // the arg(s) of the operation
	IntersectBound bool
}

Computer Computes the topological relationship between two Geometries.

type IntersectionPoint

type IntersectionPoint struct {
	matrix.Matrix
	IsIntersectionPoint, IsEntering, IsOriginal, IsCollinear bool
}

IntersectionPoint overlay point.

func (*IntersectionPoint) Compare added in v1.1.0

func (ip *IntersectionPoint) Compare(other *IntersectionPoint, tes int) bool

Compare Returns Compare of IntersectionPoint.

func (*IntersectionPoint) X

func (ip *IntersectionPoint) X() float64

X Returns x .

func (*IntersectionPoint) Y

func (ip *IntersectionPoint) Y() float64

Y Returns y .

type IntersectionPointLine

type IntersectionPointLine []IntersectionPoint

IntersectionPointLine overlay point array.

func Intersection

func Intersection(aStart, aEnd, bStart, bEnd matrix.Matrix) (mark bool, ips IntersectionPointLine)

Intersection returns intersection of a and b.

func IntersectionEdge

func IntersectionEdge(aLine, bLine matrix.LineMatrix) (mark bool, ps IntersectionPointLine)

IntersectionEdge returns intersection of edge a and b.

func IntersectionLineSegment

func IntersectionLineSegment(l, o *matrix.LineSegment) (bool, IntersectionPointLine)

IntersectionLineSegment returns intersection of a and other.

func (IntersectionPointLine) IsOriginal

func (ips IntersectionPointLine) IsOriginal() bool

IsOriginal returns line overlays.

func (IntersectionPointLine) Len

func (ips IntersectionPointLine) Len() int

Len ...

func (IntersectionPointLine) Less

func (ips IntersectionPointLine) Less(i, j int) bool

Less ...

func (IntersectionPointLine) Swap

func (ips IntersectionPointLine) Swap(i, j int)

Swap ...

type IntersectionResult added in v1.0.1

type IntersectionResult struct {
	Pos        int
	Start, End int
	Line       matrix.LineSegment
	Ips        IntersectionPointLine
}

IntersectionResult ...

type LineRelate

type LineRelate struct {
	matrix.LineMatrix
	// contains filtered or unexported fields
}

LineRelate be used during the relate computation.

func (*LineRelate) IntersectionMatrix

func (p *LineRelate) IntersectionMatrix(im *matrix.IntersectionMatrix) *matrix.IntersectionMatrix

IntersectionMatrix Gets the IntersectionMatrix for the spatial relationship between the input geometries.

type PointRelate

type PointRelate struct {
	matrix.Matrix
	// contains filtered or unexported fields
}

PointRelate be used during the relate computation.

func (*PointRelate) IntersectionMatrix

func (p *PointRelate) IntersectionMatrix(im *matrix.IntersectionMatrix) *matrix.IntersectionMatrix

IntersectionMatrix Gets the IntersectionMatrix for the spatial relationship between the input geometries.

type PolygonRelate

type PolygonRelate struct {
	matrix.PolygonMatrix
	// contains filtered or unexported fields
}

PolygonRelate be used during the relate computation.

func (*PolygonRelate) IntersectionMatrix

func (p *PolygonRelate) IntersectionMatrix(im *matrix.IntersectionMatrix) *matrix.IntersectionMatrix

IntersectionMatrix Gets the IntersectionMatrix for the spatial relationship between the input geometries.

type Relationship

type Relationship struct {
	// The operation args into an array so they can be accessed by index
	Arg            []matrix.Steric // the arg(s) of the operation
	IntersectBound bool
	// contains filtered or unexported fields
}

Relationship be used during the relate computation.

func (*Relationship) IntersectionMatrix

func (r *Relationship) IntersectionMatrix() *matrix.IntersectionMatrix

IntersectionMatrix Gets the IntersectionMatrix for the spatial relationship between the input geometries.

type UniqueIntersectionEdgeFilter

type UniqueIntersectionEdgeFilter struct {
	Ips IntersectionPointLine
}

UniqueIntersectionEdgeFilter A Filter that extracts a unique array.

func (*UniqueIntersectionEdgeFilter) Entities added in v1.0.2

func (u *UniqueIntersectionEdgeFilter) Entities() interface{}

Entities Returns the gathered Matrixes.

func (*UniqueIntersectionEdgeFilter) Filter

func (u *UniqueIntersectionEdgeFilter) Filter(ip interface{}) bool

Filter Performs an operation with the provided .

Jump to

Keyboard shortcuts

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