Documentation
¶
Index ¶
- Variables
- func Buffer(g geom.Geometry, radius float64) (geom.Geometry, error)
- func Contains(a, b geom.Geometry) (bool, error)
- func CoveredBy(a, b geom.Geometry) (bool, error)
- func Covers(a, b geom.Geometry) (bool, error)
- func Crosses(a, b geom.Geometry) (bool, error)
- func Disjoint(g1, g2 geom.Geometry) (bool, error)
- func Equals(g1, g2 geom.Geometry) (bool, error)
- func Intersection(a, b geom.Geometry) (geom.Geometry, error)
- func Intersects(a, b geom.Geometry) (bool, error)
- func Overlaps(a, b geom.Geometry) (bool, error)
- func Touches(g1, g2 geom.Geometry) (bool, error)
- func Union(a, b geom.Geometry) (geom.Geometry, error)
- func Within(a, b geom.Geometry) (bool, error)
- type Handle
- func (h *Handle) Buffer(g geom.Geometry, radius float64) (geom.Geometry, error)
- func (h *Handle) Contains(a, b geom.Geometry) (bool, error)
- func (h *Handle) CoveredBy(a, b geom.Geometry) (bool, error)
- func (h *Handle) Covers(a, b geom.Geometry) (bool, error)
- func (h *Handle) Crosses(a, b geom.Geometry) (bool, error)
- func (h *Handle) Disjoint(g1, g2 geom.Geometry) (bool, error)
- func (h *Handle) Equals(g1, g2 geom.Geometry) (bool, error)
- func (h *Handle) Intersection(g1, g2 geom.Geometry) (geom.Geometry, error)
- func (h *Handle) Intersects(a, b geom.Geometry) (bool, error)
- func (h *Handle) Overlaps(a, b geom.Geometry) (bool, error)
- func (h *Handle) Release()
- func (h *Handle) Touches(g1, g2 geom.Geometry) (bool, error)
- func (h *Handle) Union(g1, g2 geom.Geometry) (geom.Geometry, error)
- func (h *Handle) Within(a, b geom.Geometry) (bool, error)
Constants ¶
This section is empty.
Variables ¶
var ErrGeometryCollectionNotSupported = errors.New("GeometryCollection not supported")
ErrGeometryCollectionNotSupported indicates that a GeometryCollection was passed to a function that does not support GeometryCollections.
Functions ¶
func Buffer ¶
Buffer returns a geometry that contains all points within the given radius of the input geometry.
func Contains ¶
Contains returns true if and only if geometry A contains geometry B. See the global Contains function for details. Formally, the following two conditions must hold:
1. No points of B lies on the exterior of geometry A. That is, B must only be in the exterior or boundary of A.
2 .At least one point of the interior of B lies on the interior of A. That is, they can't *only* intersect at their boundaries.
func CoveredBy ¶
CoveredBy returns true if and only if geometry A is covered by geometry B. Formally, the following two conditions must hold:
1. No points of A lies on the exterior of geometry B. That is, A must only be in the exterior or boundary of B.
2. At least one point of A lies on B (either its interior or boundary).
func Covers ¶
Covers returns true if and only if geometry A covers geometry B. Formally, the following two conditions must hold:
1. No points of B lies on the exterior of geometry A. That is, B must only be in the exterior or boundary of A.
2. At least one point of B lies on A (either its interior or boundary).
func Crosses ¶
Crosses returns true if and only if geometry A and B cross each other. Formally, the following conditions must hold:
1. The geometries must have some but not all interior points in common.
2. The dimensionality of the intersection must be less than the maximum dimension of the input geometries.
3. The intersection must not equal either of the input geometries.
func Equals ¶
Equals returns true if and only if the input geometries are spatially equal, i.e. they represent exactly the same set of points.
func Intersection ¶
Intersection returns a geometry that is the intersection of the input geometries. Formally, the returned geometry will contain a particular point X if and only if X is present in both geometries.
func Intersects ¶
Intersects returns true if and only if the geometries share at least one point in common.
func Overlaps ¶
Overlaps returns true if and only if geometry A and B overlap with each other. Formally, the following conditions must hold:
1. The geometries must have the same dimension.
2. The geometries must have some but not all points in common.
3. The intersection of the geometries must have the same dimension as the geometries themselves.
func Touches ¶
Touches returns true if and only if the geometries have at least 1 point in common, but their interiors don't intersect.
func Union ¶
Union returns a geometry that that is the union of the input geometries. Formally, the returned geometry will contain a particular point X if and only if X is present in either geometry (or both).
func Within ¶
Within returns true if and only if geometry A is completely within geometry B. Formally, the following two conditions must hold:
1. No points of A lies on the exterior of geometry B. That is, A must only be in the exterior or boundary of B.
2.At least one point of the interior of A lies on the interior of B. That is, they can't *only* intersect at their boundaries.
Types ¶
type Handle ¶
type Handle struct {
// contains filtered or unexported fields
}
Handle is an opaque handle that can be used to invoke GEOS operations. Instances are not threadsafe and thus should only be used serially (e.g. protected by a mutex or similar).
func (*Handle) Buffer ¶
Buffer returns a geometry that contains all points within the given radius of the input geometry.
func (*Handle) Contains ¶
Contains returns true if and only if geometry A contains geometry B. See the global Contains function for details.
func (*Handle) CoveredBy ¶
CoveredBy returns true if and only if geometry A is covered by geometry B. See the global CoveredBy function for details.
func (*Handle) Covers ¶
Covers returns true if and only if geometry A covers geometry B. See the global Covers function for details.
func (*Handle) Crosses ¶
Crosses returns true if and only if geometry A and B cross each other. See the global Crosses function for details.
func (*Handle) Disjoint ¶
Disjoint returns true if and only if the input geometries have no points in common.
func (*Handle) Equals ¶
Equals returns true if and only if the input geometries are spatially equal.
func (*Handle) Intersection ¶
Intersection returns a geometry that is the intersection of the input geometries. See the global Intersection function for details.
func (*Handle) Intersects ¶
Intersects returns true if and only if the geometries share at least one point in common.
func (*Handle) Overlaps ¶
Overlaps returns true if and only if the geometry A and B overlap each other. See the global Overlaps function for details.
func (*Handle) Release ¶
func (h *Handle) Release()
Release releases any resources held by the handle. The handle should not be used after Release is called.
func (*Handle) Touches ¶
Touches returns true if and only if the geometries have at least 1 point in common, but their interiors don't intersect.