Skip to content

Main content

Random Geodesic Route Set Generator

Generate seeded bearing/distance leg sequences from a supplied global start using the existing IUGG spherical destination/haversine cores, with a reflection/meridian adapter for negative coordinates; coordinates and endpoint distances inherit two-decimal rounding, and totals sum rounded endpoint legs, not road lengths or safe-navigation routes.

Loading tool…

Description

Generate seeded bearing/distance leg sequences from a supplied global start using the existing IUGG spherical destination/haversine cores, with a reflection/meridian adapter for negative coordinates; coordinates and endpoint distances inherit two-decimal rounding, and totals sum rounded endpoint legs, not road lengths or safe-navigation routes.

A physical-model fixture draws inputs under explicit units and delegates a stated idealized calculation. Computed values follow that model; they are separate from measurements, calibration, and environmental effects omitted by the assumptions.

Generate seeded bearing/distance leg sequences from a supplied global start using the existing IUGG spherical destination/haversine cores, with a reflection/meridian adapter for negative coordinates; coordinates and endpoint distances inherit two-decimal rounding, and totals sum rounded endpoint legs, not road lengths or safe-navigation routes.

When to use this tool

Use this generator to create reproducible geodesic route set cases from the supplied model or bank. Inspect the returned evidence before using cases in a test or exercise.

How to use the tool and how it works

  1. Supply start, routeCount, legCount, minimumLegKm, maximumLegKm in the field shapes below. Set seed when you need an explicit replay.
  2. Run the tool and correct any input error. For generated controls, distinguish a successful fixture containing an invalid case from failure to generate the fixture.
  3. Read routes. Use the conventions below. Keep answer-bearing fields separate when presenting an exercise.

For each route, start at the supplied location and repeatedly draw a bearing and requested leg distance. Calculate a spherical destination, delegate the endpoint Haversine distance, and sum requested and endpoint distances separately.1

Delegated operations used for this result: destination point; haversine distance. Their calculation or parsing conventions apply to the corresponding result fields.2, 3

Input fieldMeaning and unitsAccepted input
startOrigin coordinate in decimal degrees.Required. Object; no unknown keys.
start.latitudeDegLatitude in decimal degrees, -90 to 90.Required. Finite number; minimum -90; maximum 90.
start.longitudeDegLongitude in decimal degrees, -180 to 180.Required. Finite number; minimum -180; maximum 180.
routeCountRoute CountRequired. Safe integer; minimum 1; maximum 16.
legCountLeg CountRequired. Safe integer; minimum 1; maximum 32.
minimumLegKmGreat-circle distance to travel in kilometers.Required. Finite number; maximum 40075.017; strictly above 0.
maximumLegKmGreat-circle distance to travel in kilometers.Required. Finite number; maximum 40075.017; strictly above 0.
seedOptional numeric seed; takes precedence over context randomness. Without either, use the fixed tool.io default seed.Optional. Safe integer.
Output fieldInterpretationReturned shape
routesRoutesRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 16.
routes[].legsLegsRequired. Array of Object; no unknown keys.; minimum items 1; maximum items 32.
routes[].legs[].fromOrigin coordinate in decimal degrees.Required. Object; no unknown keys.
routes[].legs[].from.latitudeDegLatitude in decimal degrees, -90 to 90.Required. Finite number; minimum -90; maximum 90.
routes[].legs[].from.longitudeDegLongitude in decimal degrees, -180 to 180.Required. Finite number; minimum -180; maximum 180.
routes[].legs[].toOrigin coordinate in decimal degrees.Required. Object; no unknown keys.
routes[].legs[].to.latitudeDegLatitude in decimal degrees, -90 to 90.Required. Finite number; minimum -90; maximum 90.
routes[].legs[].to.longitudeDegLongitude in decimal degrees, -180 to 180.Required. Finite number; minimum -180; maximum 180.
routes[].legs[].bearingDegreesBearing DegreesRequired. Safe integer; minimum 0; maximum 359.
routes[].legs[].requestedKilometersGreat-circle distance to travel in kilometers.Required. Finite number; maximum 40075.017; strictly above 0.
routes[].legs[].endpointKilometersEndpoint KilometersRequired. Finite number; minimum 0.
routes[].totalRequestedKilometersTotal Requested KilometersRequired. Finite number; minimum 0.
routes[].totalEndpointKilometersTotal Endpoint KilometersRequired. Finite number; minimum 0.
randomnessReplay source and normalized 32-bit seed, or null seed for an advancing context source.Required. Object; no unknown keys.
randomness.seedOptional safe-integer replay seed; normalization and precedence are explained below.Required. Safe integer. or Null.
randomness.sourceSourceRequired. Text; one of "context", "seed".

An explicit safe-integer seed takes precedence over injected context randomness and is normalized to an unsigned 32-bit integer. With no seed and no context source, replay uses the fixed tool.io default seed. A context source must return finite values from zero inclusive to one exclusive; its advancing state must be retained separately. randomness records the source and normalized seed, or null for context. These generators are not cryptographic random sources.

json
{
  "input": {
    "start": {
      "latitudeDeg": 0,
      "longitudeDeg": 0
    },
    "routeCount": 1,
    "legCount": 2,
    "minimumLegKm": 1000,
    "maximumLegKm": 1000,
    "seed": 42
  },
  "output": {
    "routes": [
      {
        "legs": [
          {
            "from": {
              "latitudeDeg": 0,
              "longitudeDeg": 0
            },
            "to": {
              "latitudeDeg": -7.27,
              "longitudeDeg": -5.31
            },
            "bearingDegrees": 216,
            "requestedKilometers": 1000,
            "endpointKilometers": 1000.12
          },
          {
            "from": {
              "latitudeDeg": -7.27,
              "longitudeDeg": -5.31
            },
            "to": {
              "latitudeDeg": -1.94,
              "longitudeDeg": -12.58
            },
            "bearingDegrees": 306,
            "requestedKilometers": 1000,
            "endpointKilometers": 1000.03
          }
        ],
        "totalRequestedKilometers": 2000,
        "totalEndpointKilometers": 2000.15
      }
    ],
    "randomness": {
      "seed": 42,
      "source": "seed"
    }
  }
}

Limitations and assumptions

  • Endpoint distance is the shortest spherical separation and can differ from the requested travel distance for long or wrapped legs. This is synthetic geography, not road routing, ellipsoidal surveying, or navigation guidance. Destinations inherit coarse calculator precision and longitude is rounded to 0.01 degrees, so even short legs can show substantial endpoint-distance error.
  • A replay requires the same complete input and implementation. The stated sampling convention applies within its eligible space. A finite draw does not exhaust all possible outputs; repeats remain possible unless a distinct-selection rule is explicit.
  • The field tables state structural bounds; cross-field constraints and bounded search or output budgets also apply. Unknown keys are rejected where the object contract disallows them. Input errors are distinct from null fields and deliberate invalid controls in a successful output.

Alternative or Complementary methods

For a supplied example, inspect the returned construction or delegated check directly. To evaluate a consumer, also test cases chosen for its own boundaries; a generated finite corpus does not establish exhaustive coverage.

References

  1. Tool behavior and example: Random Geodesic Route Set Generator — tool.io

  2. Calculation or validation: geo/destination-point — tool.io

  3. Calculation or validation: geo/haversine-distance — tool.io

Similar or alternative tools