clipping

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: 14 Imported by: 0

Documentation

Overview

Package clipping the spatial geometric operation and reconstruction between entities is realized. a method for spatial geometry operation by update geometric relation graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Difference

func Difference(m0, m1 matrix.Steric) (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 Intersection

func Intersection(m0, m1 matrix.Steric) (matrix.Steric, error)

Intersection Computes the Intersection of two geometries,either or both of which may be nil.

func LineMerge added in v1.1.1

func LineMerge(ml matrix.Collection) ([]matrix.LineMatrix, error)

LineMerge returns a Geometry containing the LineMerges.

or an empty atomic geometry, or an empty GEOMETRYCOLLECTION

func SymDifference

func SymDifference(m0, m1 matrix.Steric) (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 UnaryUnion

func UnaryUnion(matrix4 matrix.Steric) (result matrix.Steric, err error)

UnaryUnion returns a Geometry containing the union.

or an empty atomic geometry, or an empty GEOMETRYCOLLECTION

func Union

func Union(m0, m1 matrix.Steric) (result matrix.Steric, err error)

Union Computes the Union of two geometries, if one is encountered.

Types

type LineClipping

type LineClipping struct {
	*PointClipping
}

LineClipping Computes the overlay of two geometries.

func (*LineClipping) Difference

func (p *LineClipping) 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 (*LineClipping) DifferenceReverse

func (p *LineClipping) 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 (*LineClipping) Intersection

func (p *LineClipping) Intersection() (matrix.Steric, error)

Intersection Computes the Intersection of two geometries,either or both of which may be nil.

func (*LineClipping) SymDifference

func (p *LineClipping) 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 (*LineClipping) Union

func (p *LineClipping) Union() (matrix.Steric, error)

Union Computes the Union of two geometries, if one is encountered.

type PointClipping

type PointClipping struct {
	Subject, Clipping matrix.Steric
}

PointClipping Computes the overlay of two geometries.

func (*PointClipping) Difference

func (p *PointClipping) 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 (*PointClipping) DifferenceReverse

func (p *PointClipping) 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 (*PointClipping) Intersection

func (p *PointClipping) Intersection() (matrix.Steric, error)

Intersection Computes the Intersection of two geometries,either or both of which may be nil.

func (*PointClipping) SymDifference

func (p *PointClipping) 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 (*PointClipping) Union

func (p *PointClipping) Union() (matrix.Steric, error)

Union Computes the Union of two geometries, if one is encountered.

type PolygonClipping

type PolygonClipping struct {
	*PointClipping
	// contains filtered or unexported fields
}

PolygonClipping Computes the overlay of two geometries.

func (*PolygonClipping) Difference

func (p *PolygonClipping) 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 (*PolygonClipping) DifferenceReverse

func (p *PolygonClipping) 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 (*PolygonClipping) Intersection

func (p *PolygonClipping) Intersection() (matrix.Steric, error)

Intersection Computes the Intersection of two geometries,either or both of which may be nil.

func (*PolygonClipping) Result

func (p *PolygonClipping) Result() (matrix.Steric, error)

Result returns result.

func (*PolygonClipping) SymDifference

func (p *PolygonClipping) 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 (*PolygonClipping) Union

func (p *PolygonClipping) Union() (matrix.Steric, error)

Union Computes the Union of two geometries, if one is encountered.

Jump to

Keyboard shortcuts

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