Repository navigation
Conversation
Contributor
Code Coverage
Files
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Extends
FlexiblePolylineUtil,FlexiblePolyline, andFlexiblePointwith an optional, self-describing time dimension to support 3D(lat, lng, time)and 4D(lat, lng, elevation/altitude, time)tracks (e.g., hikes, runs, bike rides, and flight paths) while maintaining 100% wire compatibility with the HERE Flexible Polyline v1 specification wheneverhasTime = false.Key Changes
FlexiblePolylineUtil):11(hasTime) and bits12..15(timePrecisionin0..9) of the header varint. WhenhasTime = false, bits11..15are0, producing bit-for-bit identical HERE v1 output.DEFAULT_PRECISION = 6(~11 cm spatial resolution) andDEFAULT_TIME_PRECISION = 1(100 ms temporal resolution), while keepingprecision(0..15),thirdDimensionPrecision(0..15), andtimePrecision(0..9) user-selectable perencode(...)call.timestampMillis: Longin pure 64-bit integer arithmetic (scaleTimeMillis/unscaleTimeMillis) with half-away-from-zero tie rounding and zero floating-point precision loss.FlexiblePolylineUtil.hasTime(encoded)to inspect the header without decoding points.FlexiblePoint,FlexiblePolyline):timestampMillis: Long? = nulland@RequiresApi(O)java.time.Instantconstructor/property overloads toFlexiblePoint.hasTime,timePrecision,durationMillis,interpolateAtTime(timestampMillis / Instant), andgetPrefixAtTime(timestampMillis / Instant)toFlexiblePolyline.FlexiblePolylineDemoActivity):FlexiblePolylineUtilTestcovering 3D and 4D timed tracks, default vs. user-selected precisions,Instantoverloads, quantization tie-breaking,interpolateAtTime,getPrefixAtTime, and validation errors.