-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/Implement the tool to generate connectivity map for places #268
Conversation
@@ -24,7 +24,7 @@ func build(points []spatialindexer.PointInfo, minLevel, maxLevel int) map[s2.Cel | |||
var cellIDs []s2.CellID | |||
// For level = 30, its parent equal to current | |||
// So no need append leafCellID into cellIDs outside of for loop | |||
for i := leafCellID.Level(); i > minLevel; i-- { | |||
for i := leafCellID.Level(); i >= minLevel; i-- { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More information: #262
if s.ValidCount == 0 { | ||
glog.Warningf("connectivity's statistic detect 0 valid result.\n") | ||
return s | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More information, please go to: #266
Also add protection in unit tests.
@@ -105,7 +119,7 @@ func generateTableRequest(center spatialindexer.Location, targets []*spatialinde | |||
|
|||
req.Sources = append(req.Sources, strconv.Itoa(0)) | |||
pointsCount4Sources := 1 | |||
for i := startIndex; i <= endIndex; i++ { | |||
for i := 0; i <= endIndex-startIndex; i++ { | |||
str := strconv.Itoa(i + pointsCount4Sources) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More information, please go to: #265
distanceFromOrig: respOrig.Resp.Distances[0][index], | ||
durationFromOrig: respOrig.Resp.Durations[0][index], | ||
distanceToDest: respDest.Resp.Distances[index][0], | ||
durationToDest: respDest.Resp.Durations[index][0], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More information: #267
@@ -17,7 +19,7 @@ import ( | |||
// During pre-processing, its possible to calculate distance between thousands of points, which will | |||
// cause too big request and might reach potential limitation of different parts. | |||
// The scenario here is 1-to-N table request, use pointsLimit4SingleTableRequest to limit N | |||
const pointsThresholdPerRequest = 1000 | |||
const pointsThresholdPerRequest = 500 | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More information: #267
Issue
#238
place-connectivity-generator
incmd
code
Tasklist
Requirements / Relations
#231