GeoCourse

GeoCourse 0.1 test files

manifest.json lists every file with its expected result. A validator must accept each valid file and reject each invalid file with an error for the rule named. message is a substring of the reference validator's error, to help other validators match up.

The files are generated by npm run make-tests (scripts/make-tests.ts); example-ramp is taken verbatim from section 9 of the spec. CI runs the reference validator and the schema against all of them with npm test.

Pending: Frost Gate Traverse (75.6 km), the reference writer's first export, joins valid/ when it lands.

The test files are dedicated to the public domain under CC0 1.0 (../LICENSE).

Valid files

FileDescription
example-ramp.geocourse.jsonThe example from section 9: 25 m at a steady 8 %, heading east.
stadium-loop.geocourse.jsonClosed local-frame loop with two 30 m bends, one wrapping through the start line.
s-bend.geocourse.jsonA left bend straight into a right bend, listed as two bends split where the direction changes.
bend-at-start.geocourse.jsonAn open course that starts on a bend, measured with the window clamped at the start.

Invalid files

RuleFileDescriptionExpected error contains
101-type.geocourse.jsontype is "course", not "Course".type must be "Course"
202-id.geocourse.jsonid has upper-case letters and an underscore.id must match
303-channel-count.geocourse.jsonElevation has 3 values; floor instead of ceil drops the sample at the end.expected ceil(length / step) + 1 = 4 values
404-geometry-count.geocourse.jsonGeometry has 3 positions instead of 4.expected 2 × (ceil(length / step) + 1) = 8 positions
505-no-heading.geocourse.jsonNeither geometry nor profile.heading is present.either geometry or profile.heading
505-heading-360.geocourse.jsonA heading stored as 3600 at scale 0.1; writers must store it as 0.heading 360° is outside [0, 360)
606-range-past-end.geocourse.jsonA hazard at 30 m on a 25 m course.is outside [0, length
707-surface-gap.geocourse.jsonSurface ranges stop at 20 m.surface gap from 20 to length 25
808-geometry-length.geocourse.jsonThe last position is 5 m too far east.geometry length disagrees with d
909-grade-integral.geocourse.jsonGrade says 20 % while elevation climbs 8 %.grade integral differs from elevation change
1010-missing-bend.geocourse.jsonThe stadium loop with its north bend left out, while bendRadiusLimit says the list is complete.missing left bend
1111-segment-id.geocourse.jsonA segment without an id.segment has no id
1212-loop-elevation.geocourse.jsonThe stadium loop ends 0.1 m higher than it starts.first and last elevation samples differ
1313-required-extension.geocourse.jsonextensionsRequired names an extension missing from extensionsUsed.required extension "acme_wind" is not in extensionsUsed
1414-attribution.geocourse.jsonOpenStreetMap data (ODbL-1.0) with no attribution.requires attribution
1515-finish-on-loop.geocourse.jsonThe stadium loop with a finish marker; a closed course has none.a closed course must not have a finish marker