-
Notifications
You must be signed in to change notification settings - Fork 0
Distance(...)
$meters = $index->Distance( \%point_1, \%point_2 );
$meters = $index->Distance( \@point_1, \@point_2 );
$meters = $index->Distance( \%point_1, \@point_2 );
$meters = $index->Distance( \@point_1, \%point_2 );
Returns the distance in meters between two points
The haversine function is used to compute the distance. As this assumes a
spherical body the distances returned may show errors. Using the default
options, these errors are up to 0.056% (north - south) or 1.12% (east - west).
Such errors typically start becoming significant at distances over 20 km.
%point_1
or @point_1
, %point_2
or @point_2
The points to measure the distance between
These can be either hashes containing at a minimum a lat
and a lon
value
(both in degrees) or arrays giving each point. See the POINTS section
for details.
- Overview
- Points
-
Methods
-
Indexing
new
Index
IndexPoints
Unindex -
Searching
Search
SearchByBounds
Closest
Farthest
AllPoints
Condition functions -
Distance and measurement
Distance
DistanceFrom
DistanceTo
OneDegreeInMeters
OneMeterInDegrees -
Metadata
GetConfiguration
GetStatistics -
Miscellaneous
Sweep
Vacuum
PointCount
-
Indexing
- Alternate method names
- Performance
- Theory of operation
- Bugs and deficiencies
- Version history
- Author and copyright