Repository navigation
Conversation
Two platforms had independently written byte-identical route blocks inside differently-named envelopes: W3DS Health's Workout (polyline5 route) and Meshenger's live location share. Neither is registered, so a reader arriving at somebody's vault cannot tell that one shape serves both, and must know which application wrote which record in order to find a route at all. Track carries the geometry and says nothing about why the thing moved. A run, a commute and a parcel delivery are the same geometry; the meaning belongs to whatever record points at the track. Its subject is a THING rather than an eName, because a parcel's movement belongs to no account and narrowing it to people is what forced the duplicate shapes. GeometryEncoding is a published list in the same style as Domain — the list itself, not a copy of it. GeoJSON is canonical, as FieldBoundary already uses, and polyline5 is declared as an encoding OF it rather than as a peer, with its mapping stated: lossy at five decimals, and latitude-first where GeoJSON is longitude-first. That axis difference does not fail loudly; it places a point in another hemisphere, so it is written down once here instead of being rediscovered by each reader. Separating the encoding from the shape rather than embedding it: an encoding is reusable by more than one shape (a polyline can encode a polygon ring), so adding one stays a single change to a single file. Two rules live with the list because they generalise past geometry. A reader may REFUSE an encoding it does not know, but must never REWRITE the declared value — a record then decodes as something it never claimed to be. And pointCount is required so that a reader which cannot decode the data still knows whether there was anything to decode: an unknown encoding with pointCount above zero must say so rather than render as empty, because an empty drawing is indistinguishable from an absent one. Checked against the repository's own rules: no duplicate schemaId across the 73 schemas, both domains exist in domain.json, both files parse.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
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.
Two platforms had independently written byte-identical route blocks inside differently-named envelopes: W3DS Health's
Workout(a polyline5route) and Meshenger's live location share. Neither was registered, so a reader arriving at somebody's vault cannot tell that one shape serves both, and has to know which application wrote which record in order to find a route at all. That is the split this fixes.Track carries geometry and says nothing about why the thing moved
A run, a commute and a parcel delivery are the same geometry. The meaning belongs to whatever record points at the track, not to the track. So
Track's subject is a thing, not an eName: a parcel's movement belongs to no account, and narrowing the subject to people is precisely what forced the duplicate shapes in the first place.GeometryEncoding is a published list, in the same style as
DomainGeoJSON is canonical, as
FieldBoundaryalready uses.polyline5is declared as an encoding of it rather than a peer, with its mapping stated: lossy at five decimals, and latitude-first where GeoJSON is longitude-first. That axis difference does not fail loudly — it silently places a point in another hemisphere — so it is written down once here instead of being rediscovered by every reader.The encoding is separate from the shape rather than embedded in it, because an encoding is reusable by more than one shape (a polyline can encode a polygon ring). Adding one then stays a single change to a single file.
Two rules travel with the list, because they generalise past geometry
format: "polyline5"unconditionally, so somebody else's polyline6 or GeoJSON track would have been relabelled by our own hand and then misdecoded by an order of magnitude.pointCountis required, so a reader that cannot decode the data still knows whether there was anything to decode. An unknown encoding withpointCountabove zero must say so rather than render as empty — an empty drawing is indistinguishable from an absent one.Checks
No duplicate
schemaIdacross the repository's existing schemas; bothdomainvalues exist indomain.json; both files parse.Provenance and one disclosure
Carved with the DigitalSelf platform over several rounds, after the question was put plainly: how is a reading application supposed to know that one app recorded a position share and another recorded a workout? The direction chosen was a graph of triples — geometry apart from activity apart from sport — rather than a new entity type per use.
Disclosure: Meshenger is already writing
Trackunder theschemaIdin this branch, on a small number of records. Adopting the id before the merge was deliberate — migrating a one-day-old envelope with a handful of records costs less than re-minting later — but it does mean that if review wants a different id or shape, say so and we will migrate rather than argue from installed base.