Documentation
¶
Overview ¶
Package measure Define spatial measurement function.
Index ¶
- Constants
- func Area(ring matrix.LineMatrix) float64
- func AreaDirection(ring matrix.LineMatrix) float64
- func AreaOfMultiPolygon(mp matrix.MultiPolygonMatrix) float64
- func AreaOfPolygon(polygon matrix.PolygonMatrix) float64
- func ClosestPoint(p, a, b matrix.Matrix) matrix.Matrix
- func IsCCW(ring matrix.LineMatrix) bool
- func MercatorDistance(distance float64, lat float64) float64
- func MercatorFctor(lat float64) (float64, float64)
- func OfLine(pts matrix.LineMatrix) float64
- func PlanarDistance(fromSteric, toSteric matrix.Steric) float64
- func Project(p, a, b matrix.Matrix) matrix.Matrix
- func ProjectionFactor(p, a, b matrix.Matrix) float64
- func SpheroidDistance(fromSteric, toSteric matrix.Steric) float64
- type Distance
- type DistanceToPoint
- type HausdorffDistance
- type MaxDensifiedByFractionDistanceFilter
- func (m *MaxDensifiedByFractionDistanceFilter) Clear()
- func (m *MaxDensifiedByFractionDistanceFilter) Filter(pt matrix.Matrix)
- func (m *MaxDensifiedByFractionDistanceFilter) FilterMatrixes(pts []matrix.Matrix)
- func (m *MaxDensifiedByFractionDistanceFilter) IsChanged() bool
- func (m *MaxDensifiedByFractionDistanceFilter) Matrixes() []matrix.Matrix
- type MaxPointDistanceFilter
- type PointPairDistance
Constants ¶
const ( // R radius of earth. R = 6371000.0 //6378137.0 // E is eccentricity. E = 0.006694379990141317 )
Variables ¶
This section is empty.
Functions ¶
func AreaDirection ¶
func AreaDirection(ring matrix.LineMatrix) float64
AreaDirection returns the area (direction) of a Ring geometry.
func AreaOfMultiPolygon ¶
func AreaOfMultiPolygon(mp matrix.MultiPolygonMatrix) float64
AreaOfMultiPolygon returns the area of a MultiPolygon geometry
func AreaOfPolygon ¶
func AreaOfPolygon(polygon matrix.PolygonMatrix) float64
AreaOfPolygon returns the area of a Polygon geometry
func ClosestPoint ¶
ClosestPoint Computes the closest point on this line segment to another point.
func IsCCW ¶
func IsCCW(ring matrix.LineMatrix) bool
IsCCW * Tests if a ring is oriented counter-clockwise
func MercatorDistance ¶
MercatorDistance scale factor is changed along the meridians as a function of latitude https://gis.stackexchange.com/questions/110730/mercator-scale-factor-is-changed-along-the-meridians-as-a-function-of-latitude https://gis.stackexchange.com/questions/93332/calculating-distance-scale-factor-by-latitude-for-mercator
func MercatorFctor ¶ added in v1.1.0
MercatorFctor scale factor the meridians as a function of latitude
func OfLine ¶
func OfLine(pts matrix.LineMatrix) float64
OfLine Computes the length of a linestring specified by a sequence of points.
func PlanarDistance ¶
PlanarDistance returns Distance of form to.
func ProjectionFactor ¶
ProjectionFactor Computes the Projection Factor for the projection of the point p
func SpheroidDistance ¶
SpheroidDistance Calculate distance, return unit: meter
Types ¶
type DistanceToPoint ¶
type DistanceToPoint struct { }
DistanceToPoint Computes the Euclidean distance (L2 metric) from a point to a point. Also computes two points on the geometry which are separated by the distance found.
type HausdorffDistance ¶
type HausdorffDistance struct {
// contains filtered or unexported fields
}
HausdorffDistance An algorithm for computing a distance metric which is an approximation to the Hausdorff Distance
func (*HausdorffDistance) Distance ¶
func (h *HausdorffDistance) Distance(g0, g1 matrix.Steric) float64
Distance ...
func (*HausdorffDistance) DistanceDensifyFrac ¶
func (h *HausdorffDistance) DistanceDensifyFrac(g0, g1 matrix.Steric, densifyFrac float64) (float64, error)
DistanceDensifyFrac ...
func (*HausdorffDistance) OrientedDistance ¶ added in v1.0.1
func (h *HausdorffDistance) OrientedDistance() float64
OrientedDistance ...
type MaxDensifiedByFractionDistanceFilter ¶
type MaxDensifiedByFractionDistanceFilter struct {
MaxPtDist, MinPtDist *PointPairDistance
// contains filtered or unexported fields
}
MaxDensifiedByFractionDistanceFilter ...
func (*MaxDensifiedByFractionDistanceFilter) Clear ¶ added in v1.0.2
func (m *MaxDensifiedByFractionDistanceFilter) Clear()
Clear clear Matrixes.
func (*MaxDensifiedByFractionDistanceFilter) Filter ¶ added in v1.0.2
func (m *MaxDensifiedByFractionDistanceFilter) Filter(pt matrix.Matrix)
Filter Performs an operation with the provided .
func (*MaxDensifiedByFractionDistanceFilter) FilterMatrixes ¶ added in v1.0.2
func (m *MaxDensifiedByFractionDistanceFilter) FilterMatrixes(pts []matrix.Matrix)
FilterMatrixes Performs an operation with the provided .
func (*MaxDensifiedByFractionDistanceFilter) IsChanged ¶ added in v1.0.2
func (m *MaxDensifiedByFractionDistanceFilter) IsChanged() bool
IsChanged Returns the true when need change.
func (*MaxDensifiedByFractionDistanceFilter) Matrixes ¶ added in v1.0.2
func (m *MaxDensifiedByFractionDistanceFilter) Matrixes() []matrix.Matrix
Matrixes Returns the gathered Matrixes.
type MaxPointDistanceFilter ¶
type MaxPointDistanceFilter struct {
MaxPtDist, MinPtDist *PointPairDistance
// contains filtered or unexported fields
}
MaxPointDistanceFilter ...
func (*MaxPointDistanceFilter) Clear ¶ added in v1.0.2
func (m *MaxPointDistanceFilter) Clear()
Clear clear Matrixes.
func (*MaxPointDistanceFilter) Filter ¶ added in v1.0.2
func (m *MaxPointDistanceFilter) Filter(pt matrix.Matrix)
Filter Performs an operation with the provided .
func (*MaxPointDistanceFilter) FilterMatrixes ¶ added in v1.0.2
func (m *MaxPointDistanceFilter) FilterMatrixes(pts []matrix.Matrix)
FilterMatrixes Performs an operation with the provided .
func (*MaxPointDistanceFilter) IsChanged ¶ added in v1.0.2
func (m *MaxPointDistanceFilter) IsChanged() bool
IsChanged Returns the true when need change.
func (*MaxPointDistanceFilter) Matrixes ¶ added in v1.0.2
func (m *MaxPointDistanceFilter) Matrixes() []matrix.Matrix
Matrixes Returns the gathered Matrixes.
type PointPairDistance ¶
PointPairDistance Contains a pair of points and the distance between them. Provides methods to update with a new point pair with either maximum or minimum distance.