Documentation ¶
Overview ¶
Package overlay the spatial geometric operation and reconstruction between entities is realized.
Index ¶
- func AddPointToVertexSlice(edges []*Edge, pStart, pEnd, ip *Vertex)
- func Difference(m0, m1 matrix.Steric) (matrix.Steric, error)
- func IntersectLine(m, m1 matrix.LineMatrix) []relate.IntersectionResult
- func Intersection(m0, m1 matrix.Steric) (matrix.Steric, error)
- func LineMerge(ml matrix.Collection) matrix.Collection
- func MergeLine(ml matrix.Collection, i, j int) (matrix.Collection, bool)
- func MergeMatrix(ml matrix.Collection, i, j int, result matrix.Collection) (matrix.Collection, bool)
- func SliceContains(list []Vertex, p *Vertex) (int, error)
- func SymDifference(m0, m1 matrix.Steric) (matrix.Steric, error)
- func ToPolygonMatrix(poly *Plane) matrix.PolygonMatrix
- func UnaryUnion(matrix4 matrix.Steric) matrix.Steric
- func UnaryUnionByHalf(matrix4 matrix.Collection, start, end int) matrix.Steric
- func Union(m0, m1 matrix.Steric) (result matrix.Steric)
- func UnionLine(m0, m1 matrix.LineMatrix) matrix.Steric
- func UnionPolygon(m0, m1 matrix.PolygonMatrix) matrix.Steric
- type ComputeClipOverlay
- type ComputeMainOverlay
- type ComputeMergeOverlay
- type ComputePolyOverlay
- type Edge
- type Line
- type LineOverlay
- type Overlay
- type Plane
- func (p *Plane) AddPoint(point *Vertex)
- func (p *Plane) AddPointWhich(point *Vertex, which bool)
- func (p *Plane) ChangeRank()
- func (p *Plane) CloseRing()
- func (p *Plane) Equal(pol *Plane) bool
- func (p *Plane) IsVertexInHole(v *Vertex) (inHole bool)
- func (p *Plane) Reverse()
- func (p *Plane) ToString() string
- type PointOverlay
- func (p *PointOverlay) Difference() (matrix.Steric, error)
- func (p *PointOverlay) DifferenceReverse() (matrix.Steric, error)
- func (p *PointOverlay) Intersection() (matrix.Steric, error)
- func (p *PointOverlay) SymDifference() (matrix.Steric, error)
- func (p *PointOverlay) Union() (matrix.Steric, error)
- type PolygonOverlay
- func (p *PolygonOverlay) ComputePolygon(exitingPoints []Vertex, cpo ComputePolyOverlay) *Plane
- func (p *PolygonOverlay) Difference() (matrix.Steric, error)
- func (p *PolygonOverlay) DifferenceReverse() (matrix.Steric, error)
- func (p *PolygonOverlay) Intersection() (matrix.Steric, error)
- func (p *PolygonOverlay) SymDifference() (matrix.Steric, error)
- func (p *PolygonOverlay) Union() (matrix.Steric, error)
- func (p *PolygonOverlay) Weiler() (enteringPoints, exitingPoints []Vertex)
- type UniqueVertexFilter
- type Vertex
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddPointToVertexSlice ¶
AddPointToVertexSlice add point to vertex slice
func Difference ¶
Difference returns a geometry that represents that part of geometry A that does not intersect with geometry B. One can think of this as GeometryA - Intersection(A,B). If A is completely contained in B then an empty geometry collection is returned.
func IntersectLine ¶
func IntersectLine(m, m1 matrix.LineMatrix) []relate.IntersectionResult
IntersectLine returns a array that represents that part of geometry A intersect with geometry B.
func Intersection ¶
Intersection Computes the Intersection of two geometries,either or both of which may be null.
func LineMerge ¶
func LineMerge(ml matrix.Collection) matrix.Collection
LineMerge returns a Geometry containing the LineMerges.
or an empty atomic geometry, or an empty GEOMETRYCOLLECTION
todo Rewrite with monotone chain
func MergeLine ¶
func MergeLine(ml matrix.Collection, i, j int) (matrix.Collection, bool)
MergeLine Computes the Merge of two geometries.
func MergeMatrix ¶ added in v1.0.1
func MergeMatrix(ml matrix.Collection, i, j int, result matrix.Collection) (matrix.Collection, bool)
MergeMatrix Computes the Merge of two geometries,either or both of which may be matrix.
func SliceContains ¶
SliceContains Returns index of slice.
func SymDifference ¶
SymDifference returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because SymDifference(A,B) = SymDifference(B,A). One can think of this as Union(geomA,geomB) - Intersection(A,B).
func UnaryUnion ¶
UnaryUnion returns a Geometry containing the union.
or an empty atomic geometry, or an empty GEOMETRYCOLLECTION
func UnaryUnionByHalf ¶
func UnaryUnionByHalf(matrix4 matrix.Collection, start, end int) matrix.Steric
UnaryUnionByHalf returns Unions a section of a list using a recursive binary union on each half of the section.
func UnionLine ¶
func UnionLine(m0, m1 matrix.LineMatrix) matrix.Steric
UnionLine Computes the Union of two geometries,either or both of which may be null.
func UnionPolygon ¶ added in v1.0.2
func UnionPolygon(m0, m1 matrix.PolygonMatrix) matrix.Steric
UnionPolygon Computes the UnionPolygon of two geometries,either or both of which may be null.
Types ¶
type ComputeClipOverlay ¶
type ComputeClipOverlay struct {
*PolygonOverlay
}
ComputeClipOverlay merge overlay polygon.
type ComputeMainOverlay ¶
type ComputeMainOverlay struct {
*PolygonOverlay
}
ComputeMainOverlay merge overlay polygon.
type ComputeMergeOverlay ¶
type ComputeMergeOverlay struct {
*PolygonOverlay
}
ComputeMergeOverlay merge overlay polygon.
type ComputePolyOverlay ¶
type ComputePolyOverlay interface { Next(pol *Plane, start *Vertex) *Vertex Compute(pol *Plane, start *Vertex, which bool) *Vertex }
ComputePolyOverlay overlay polygon.
type Edge ¶
Edge ...
func (*Edge) AreaDirection ¶
AreaDirection Returns area <0 if direction is true, area > 0 else.
type LineOverlay ¶
type LineOverlay struct {
*PointOverlay
}
LineOverlay Computes the overlay of two geometries,either or both of which may be nil.
func (*LineOverlay) Difference ¶
func (p *LineOverlay) Difference() (matrix.Steric, error)
Difference returns a geometry that represents that part of geometry A that does not intersect with geometry B. One can think of this as GeometryA - Intersection(A,B). If A is completely contained in B then an empty geometry collection is returned.
func (*LineOverlay) DifferenceReverse ¶
func (p *LineOverlay) DifferenceReverse() (matrix.Steric, error)
DifferenceReverse returns a geometry that represents reverse that part of geometry A that does not intersect with geometry B . One can think of this as GeometryB - Intersection(A,B). If B is completely contained in A then an empty geometry collection is returned.
func (*LineOverlay) Intersection ¶
func (p *LineOverlay) Intersection() (matrix.Steric, error)
Intersection Computes the Intersection of two geometries,either or both of which may be nil.
func (*LineOverlay) SymDifference ¶
func (p *LineOverlay) SymDifference() (matrix.Steric, error)
SymDifference returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because SymDifference(A,B) = SymDifference(B,A). One can think of this as Union(geomA,geomB) - Intersection(A,B).
type Overlay ¶
type Overlay interface { // Union Computes the Union of two geometries,either or both of which may be nil. Union() (matrix.Steric, error) // Intersection Computes the Intersection of two geometries,either or both of which may be nil. Intersection() (matrix.Steric, error) // Difference returns a geometry that represents that part of geometry A that does not intersect with geometry B. // One can think of this as GeometryA - Intersection(A,B). // If A is completely contained in B then an empty geometry collection is returned. Difference() (matrix.Steric, error) // SymDifference returns a geometry that represents the portions of A and B that do not intersect. // It is called a symmetric difference because SymDifference(A,B) = SymDifference(B,A). // // One can think of this as Union(geomA,geomB) - Intersection(A,B). SymDifference() (matrix.Steric, error) }
Overlay Computes the overlay of two geometries,either or both of which may be nil.
type Plane ¶
Plane is a closed area. The first edge is the outer ring. The others are the holes. Each edge is expected to be closed ie. the first point matches the last.
func (*Plane) AddPointWhich ¶
AddPointWhich add a point in polyon with which.
func (*Plane) IsVertexInHole ¶ added in v1.0.2
IsVertexInHole ...
type PointOverlay ¶
PointOverlay Computes the overlay of two geometries,either or both of which may be nil.
func (*PointOverlay) Difference ¶
func (p *PointOverlay) Difference() (matrix.Steric, error)
Difference returns a geometry that represents that part of geometry A that does not intersect with geometry B. One can think of this as GeometryA - Intersection(A,B). If A is completely contained in B then an empty geometry collection is returned.
func (*PointOverlay) DifferenceReverse ¶
func (p *PointOverlay) DifferenceReverse() (matrix.Steric, error)
DifferenceReverse returns a geometry that represents reverse that part of geometry A that does not intersect with geometry B . One can think of this as GeometryB - Intersection(A,B). If B is completely contained in A then an empty geometry collection is returned.
func (*PointOverlay) Intersection ¶
func (p *PointOverlay) Intersection() (matrix.Steric, error)
Intersection Computes the Intersection of two geometries,either or both of which may be nil.
func (*PointOverlay) SymDifference ¶
func (p *PointOverlay) SymDifference() (matrix.Steric, error)
SymDifference returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because SymDifference(A,B) = SymDifference(B,A). One can think of this as Union(geomA,geomB) - Intersection(A,B).
type PolygonOverlay ¶
type PolygonOverlay struct { *PointOverlay // contains filtered or unexported fields }
PolygonOverlay Computes the overlay of two geometries,either or both of which may be nil.
func (*PolygonOverlay) ComputePolygon ¶
func (p *PolygonOverlay) ComputePolygon(exitingPoints []Vertex, cpo ComputePolyOverlay) *Plane
ComputePolygon compute overlay.
func (*PolygonOverlay) Difference ¶
func (p *PolygonOverlay) Difference() (matrix.Steric, error)
Difference returns a geometry that represents that part of geometry A that does not intersect with geometry B. One can think of this as GeometryA - Intersection(A,B). If A is completely contained in B then an empty geometry collection is returned.
func (*PolygonOverlay) DifferenceReverse ¶
func (p *PolygonOverlay) DifferenceReverse() (matrix.Steric, error)
DifferenceReverse returns a geometry that represents reverse that part of geometry A that does not intersect with geometry B . One can think of this as GeometryB - Intersection(A,B). If B is completely contained in A then an empty geometry collection is returned.
func (*PolygonOverlay) Intersection ¶
func (p *PolygonOverlay) Intersection() (matrix.Steric, error)
Intersection Computes the Intersection of two geometries,either or both of which may be nil.
func (*PolygonOverlay) SymDifference ¶
func (p *PolygonOverlay) SymDifference() (matrix.Steric, error)
SymDifference returns a geometry that represents the portions of A and B that do not intersect. It is called a symmetric difference because SymDifference(A,B) = SymDifference(B,A). One can think of this as Union(geomA,geomB) - Intersection(A,B).
func (*PolygonOverlay) Union ¶
func (p *PolygonOverlay) Union() (matrix.Steric, error)
Union Computes the Union of two geometries,either or both of which may be nil.
func (*PolygonOverlay) Weiler ¶
func (p *PolygonOverlay) Weiler() (enteringPoints, exitingPoints []Vertex)
Weiler Weiler overlay.
type UniqueVertexFilter ¶
type UniqueVertexFilter struct {
Ips []Vertex
}
UniqueVertexFilter A Filter that extracts a unique array.
func (*UniqueVertexFilter) Entities ¶ added in v1.0.2
func (u *UniqueVertexFilter) Entities() interface{}
Entities Returns the gathered Matrixes.
func (*UniqueVertexFilter) Filter ¶
func (u *UniqueVertexFilter) Filter(ip interface{}) bool
Filter Performs an operation with the provided .
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package chain Define Monotone Chains,it is a way of partitioning the segments of a linestring to allow for fast searching of intersections.
|
Package chain Define Monotone Chains,it is a way of partitioning the segments of a linestring to allow for fast searching of intersections. |
Package snap Snaps the vertices and segments of a Geometry's vertices to another Geometry's vertices.
|
Package snap Snaps the vertices and segments of a Geometry's vertices to another Geometry's vertices. |
Package sweepline Contains struct which implement a sweepline algorithm for scanning geometric data structures.
|
Package sweepline Contains struct which implement a sweepline algorithm for scanning geometric data structures. |