-
Notifications
You must be signed in to change notification settings - Fork 0
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
Using radixtree for check spatialIDs' overlap #35
Using radixtree for check spatialIDs' overlap #35
Conversation
by using altitude index conversion To avoid cycle import between `integrate` and `transform`, check_spatial_id_overlap.go moved to new package
refactored convertZToMinAltitudekey to reuse index boundary check
multi-dimensional-radix-tree
Merge branch 'refs/heads/develop' into feature/using-radixtree-detectoverlap
Merge branch 'refs/heads/develop' into feature/using-radixtree-detectoverlap
It needs receiver if implementing tree cache; ``` type detector struct { tr tree.TreeInterface } func CheckSpatialIdsArrayOverlapWithCache(spatialIds1 tree.TreeInterface, spatialIds2 []string) (bool, error){ // ... } ``` This reverts commit de00e69
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.
I reviewed this.
Check it out.
// AddZBaseOffsetToZ (拡張)空間IDz成分(fインデックス)にオフセット加算する | ||
// ConvertZToAltitudekey()でズームレベル変換を行わずオフセット変換のみ指定したもの | ||
// | ||
// したがって ConvertZToAltitudekey(f, z, z, consts.ZBaseExponent, zBaseOffset)と等価 |
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.
Memo: Change over from AddZBaseOffsetToZ(_)
to convertZToMinAltitudekey(_)
.
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.
test/detect_overlap/main.go
Outdated
|
||
const maxCases = 10 | ||
|
||
func main() { |
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.
Memo: Move this folder to examples/detectOverlap/main.go
.
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.
for `CheckSpatialIdsArrayOverlap`
it found that `AddZBaseOffsetToZ` is not useful since it is slower than `ConvertZToMinMaxAltitudekey`, and this function existence only matters when `AddZBaseOffsetToZ` is faster than `ConvertZToMinAltitudekey`.
@mi-24v |
CheckSpatialIdsOverlap
andCheckSpatialIdsArrayOverlap
detector
package to prevent cycle import