Conversation
kikoso
force-pushed
the
feat/flexible-polyline
branch
from
September 30, 2026 04:10
3d8e3a5 to
fd2c6a0
Compare
Adds FlexiblePolylineUtil to the library module, alongside the existing PolyUtil codec. The format supports configurable precision, a header that carries the precision with the data, and an optional third value per point. Also adds a demo activity exercising the decoder, registered under the Geometry category.
kikoso
force-pushed
the
feat/flexible-polyline
branch
from
September 30, 2026 04:13
fd2c6a0 to
b2e846e
Compare
Contributor
Code Coverage
Files
|
kikoso
marked this pull request as ready for review
September 30, 2026 04:31
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.
Adds
FlexiblePolylineUtilto thelibrarymodule, and a demo activity that decodes a sample string and draws it.PolyUtilis unchanged. No dependencies were added.Public API:
encode,decode,encodeLatLngs,decodeToLatLngs,getThirdDimension, plusFlexiblePoint,FlexiblePolylineandThirdDimension. All are@JvmStatic. Defaults are precision 7 and no third dimension.Differences from the codec in
PolyUtilPolyUtilFlexiblePolylineUtilA-Z,a-z,0-9,-,_decodereads the third dimension flag because a decoder that ignores it reads the third varint of each point as the next point's latitude, returning wrong coordinates for every point after the first.toLatLngs()omits the value.Testing
./gradlew testand./gradlew lintpass. 21 new tests, 0 lint findings in the added files.Expected strings in the tests are fixed vectors, not round trip assertions. The two dimensional case is the worked example published in the specification. The other vectors was generated by a separate implementation written from the same document, so an encoder regression does not cancel out against a decoder regression.
No linked issue yet. The public API grows by 5 functions and 3 types, so I can open one before this leaves draft.