Skip to content
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

Merged
merged 40 commits into from
Apr 8, 2020

Conversation

CodeBear801
Copy link

@CodeBear801 CodeBear801 commented Apr 7, 2020

Issue

#238

Tasklist

  • implement feature
  • add tests
  • review

Requirements / Relations

#231

@CodeBear801 CodeBear801 added NewFeature New feature or feature improvement Prototype Proof of concept labels Apr 7, 2020
@CodeBear801 CodeBear801 self-assigned this Apr 7, 2020
@CodeBear801 CodeBear801 added the Bug Something isn't working label Apr 7, 2020
@@ -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-- {
Copy link
Author

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
}
Copy link
Author

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)
Copy link
Author

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],
Copy link
Author

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

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More information: #267

@CodeBear801 CodeBear801 merged commit f38ac32 into master Apr 8, 2020
@CodeBear801 CodeBear801 deleted the feature/placeconnectivitymap-impl4 branch April 8, 2020 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working NewFeature New feature or feature improvement Prototype Proof of concept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants