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/Build spatial index based on google::s2 #248

Merged
merged 8 commits into from
Mar 30, 2020

Conversation

CodeBear801
Copy link

@CodeBear801 CodeBear801 commented Mar 25, 2020

Issue

#239

  • implement indexer to build spatial index based on points, implement a specified version of indexer based on google::s2
  • could answer nearbyQuery for any given point
  • Most logic are inside s2indexer, it could
    • construct spatial index with Build(), loads data from json, and iterate each points, find a group of cell id contains such point, in [minlevel, maxlevel] range
    • implement Dump and Load function, could record pre-processing data to files, so next time just need load data back to re-build spatial information
    • For queryNearByPoints, it will first find all cells covers query region, in [minlevel, maxlevel] range, then retrieves points data from those cells, you could go to here for more information: Research on usage of google::s2 #236 (comment)

Tasklist

  • implement code
  • add tests
  • review

@CodeBear801 CodeBear801 added the Prototype Proof of concept label Mar 25, 2020
@CodeBear801 CodeBear801 self-assigned this Mar 25, 2020
// => for each line, its formid and all other ids
// => calculate distance between fromid and all other ids
// => sort result based on distance and write back to file
package main
Copy link
Author

Choose a reason for hiding this comment

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

Just put comments here, to be implemented.

@CodeBear801
Copy link
Author

CodeBear801 commented Mar 25, 2020

Build failed with following information, didn't notice it on local, try to reproduce with docker.

##[error]Process completed with exit code 2.

update: I didn't met such error inside docker

go build -v ./...

image

May be not this command?

update: got error information and find root cause

# github.com/Telenav/osrm-backend/integration/cmd/chargestations-connectivity-gen
runtime.main_main·f: function main is undeclared in the main package
The command '/bin/sh -c cd /workspace/osrm-backend/integration &&   go test -short -v ./... &&   go install ./... &&   ls -lh /workspace/go/bin' returned a non-zero code: 2


@wangyoucao577
Copy link

Build failed with following information, didn't notice it on local, try to reproduce with docker.

##[error]Process completed with exit code 2.

update: I didn't met such error inside docker

go build -v ./...

image

May be not this command?

Here's the problem:

?   	github.com/Telenav/osrm-backend/integration/wayidsmap	[no test files]
# github.com/Telenav/osrm-backend/integration/cmd/chargestations-connectivity-gen
runtime.main_main·f: function main is undeclared in the main package
The command '/bin/sh -c cd /workspace/osrm-backend/integration &&   go test -short -v ./... &&   go install ./... &&   ls -lh /workspace/go/bin' returned a non-zero code: 2

More in link: https://github.com/Telenav/osrm-backend/pull/248/checks?check_run_id=532257078

@CodeBear801
Copy link
Author

CodeBear801 commented Mar 25, 2020

Build failed with following information, didn't notice it on local, try to reproduce with docker.

##[error]Process completed with exit code 2.

update: I didn't met such error inside docker

go build -v ./...

image
May be not this command?

Here's the problem:

?   	github.com/Telenav/osrm-backend/integration/wayidsmap	[no test files]
# github.com/Telenav/osrm-backend/integration/cmd/chargestations-connectivity-gen
runtime.main_main·f: function main is undeclared in the main package
The command '/bin/sh -c cd /workspace/osrm-backend/integration &&   go test -short -v ./... &&   go install ./... &&   ls -lh /workspace/go/bin' returned a non-zero code: 2

More in link: https://github.com/Telenav/osrm-backend/pull/248/checks?check_run_id=532257078

Thanks, found that immediately after dinner, hard to find root cause due to lake of energy :)

integration/service/poiloader/poi_format.go Outdated Show resolved Hide resolved
integration/service/poiloader/poi_format.go Outdated Show resolved Hide resolved
integration/service/poiloader/loader.go Outdated Show resolved Hide resolved
integration/service/spatialindexer/iterface.go Outdated Show resolved Hide resolved
integration/service/spatialindexer/iterface.go Outdated Show resolved Hide resolved
integration/service/spatialindexer/s2indexer/indexer.go Outdated Show resolved Hide resolved
@CodeBear801
Copy link
Author

Will change poi and Points to Place for later commit.

Place here identify a bunch of points(place, poi) be pre-processed, build spatial index and connectivity. Its different with random point on Earth.

@CodeBear801 CodeBear801 merged commit 7287af0 into master Mar 30, 2020
@CodeBear801 CodeBear801 deleted the feature/poi-graph-generator branch March 30, 2020 16:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Prototype Proof of concept
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants