You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Ranker used to ranking a group of pointstypeRankerinterface {
// RankPointIDsByGreatCircleDistance ranks a group of points based on great circle distance to given locationRankPointIDsByGreatCircleDistance(centerLocation, targets []*PointInfo) []*RankedPointInfo// RankPointIDsByShortestDistance ranks a group of points based on shortest path distance to given locationRankPointIDsByShortestDistance(centerLocation, targets []*PointInfo) []*RankedPointInfo
}
There is factory to create different rankers:
// CreateRanker creates implementations of interface Ranker
func CreateRanker(rankerType string, oc *osrmconnector.OSRMConnector) spatialindexer.Ranker {
switch rankerType {
case SimpleRanker:
return newSimpleRanker()
case OSRMBasedRanker:
return newOsrmRanker(oc)
default:
return newSimpleRanker()
}
}
Adjust spatialindexer/interface.go
// RankedPointInfo used to record ranking result to center point
// Distance record distance from center point to current point
// Duration records duration from center point to current point
// Ranker used to ranking a group of pointstypeRankerinterface {
// RankPointIDs ranks a group of points based on ranking strategyRankPointIDs(centerLocation, targets []*PointInfo) []*RankedPointInfo
}
Current status:
There is factory to create different rankers:
// RankedPointInfo used to record ranking result to center point
// Distance record distance from center point to current point
// Duration records duration from center point to current point
Target
The text was updated successfully, but these errors were encountered: