Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

HARP-14678 Fix tile dependencies not working #2186

Merged
merged 3 commits into from
May 6, 2021
Merged

HARP-14678 Fix tile dependencies not working #2186

merged 3 commits into from
May 6, 2021

Conversation

nzjony
Copy link
Member

@nzjony nzjony commented Apr 30, 2021

HARP-14678 Fix issue with morton codes being stored as 32 bit

The tile dependency example wasn't working with two separate data sources because the morton code was stored in a Float32Array, which doesn't have enough precision and caused issues. This change stores the row, column and level separately and then in the decoder, the mortonCode is computed and stored as a number, which has more accuracy that a 32 bit float.

Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
The tile dependency example wasn't working with two separate data sources because the morton code
was stored in a Float32Array, which doesn't have enough precision and caused issues. This change
stores the row, column and level separately and then in the decoder, the mortonCode is computed and
stored as a `number`, which has more accuracy that a 32 bit float.

Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
@nzjony nzjony changed the title Harp 14678 HARP-14678 Fix tile dependencies not working Apr 30, 2021
Signed-off-by: Jonathan Stichbury <2533428+nzjony@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Apr 30, 2021

Codecov Report

Merging #2186 (5f703e3) into master (b5c7a1a) will decrease coverage by 0.00%.
The diff coverage is 50.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2186      +/-   ##
==========================================
- Coverage   68.44%   68.44%   -0.01%     
==========================================
  Files         299      299              
  Lines       26526    26529       +3     
  Branches     6009     6011       +2     
==========================================
+ Hits        18156    18158       +2     
- Misses       8370     8371       +1     
Impacted Files Coverage Δ
@here/harp-mapview/lib/VisibleTileSet.ts 77.97% <50.00%> (-0.08%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b5c7a1a...5f703e3. Read the comment docs.

@dbacarel dbacarel self-requested a review May 3, 2021 07:44
@@ -962,6 +962,11 @@ export class VisibleTileSet {
visibleTileKeys.find(
tileKeyEntry =>
tileKeyEntry.tileKey.mortonCode() === tileKey.mortonCode()
) === undefined &&
// Check that we haven't already added this TileKey
dependentTiles.find(
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, this isn't related to the bug, it is just a minor optimization.

@nzjony nzjony merged commit 2f10962 into master May 6, 2021
@nzjony nzjony deleted the HARP-14678 branch May 6, 2021 08:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants