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 ¶
- func CrossProduct(aStart, aEnd, bStart, bEnd matrix.Matrix) float64
- func IM(g0, g1 matrix.Steric, intersectBound bool) *matrix.IntersectionMatrix
- func InLine(spot, a, b matrix.Matrix) (in bool, isVertex bool)
- func InLineMatrix(spot matrix.Matrix, matr matrix.LineMatrix) bool
- func InLineVertex(spot matrix.Matrix, matr matrix.LineMatrix) (bool, bool)
- func InPolygon(point matrix.Matrix, poly matrix.LineMatrix) bool
- func IsIntersectionEdge(aLine, bLine matrix.LineMatrix) (mark bool)
- func IsIntersectionLineSegment(l, o *matrix.LineSegment) bool
- func Relate(g0, g1 matrix.Steric, intersectBound bool) string
- type Computer
- type IntersectionPoint
- type IntersectionPointLine
- type IntersectionResult
- type LineRelate
- type PointRelate
- type PolygonRelate
- type Relationship
- type UniqueIntersectionEdgeFilter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CrossProduct ¶
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 InLineMatrix ¶
func InLineMatrix(spot matrix.Matrix, matr matrix.LineMatrix) bool
InLineMatrix returns true if spot in LineMatrix,false else..
func InLineVertex ¶
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.
Types ¶
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.
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.
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 ¶
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 .