Legend Item Order Topological Sorter Simple
Stable Kahn topological legend ordering from explicit prerequisite edges; rejects cycles, does not infer cartographic semantics.
Description
Legend Item Order Topological Sorter Simple: return ordered item ids.
A legend order can be constrained by prerequisites between items. A topological order satisfies those dependencies without implying a unique visual design.
This tool returns ordered item ids. Use the stated units and model convention when interpreting these fields.
When to use this tool
Use this tool when the supplied inputs match the specific operation described above and you need a repeatable result under its stated convention.
- Check the supported input and output contract against an existing calculation or observation.
- Use the complete example to confirm units, selector spelling and result interpretation.
How to use the tool and how it works
- Enter every field in the input table using the stated units and the exact supported selector spelling where applicable.
- Run the tool. Correct input errors before interpreting an output.
- Read the result fields below; use accompanying flags and the stated sign, boundary or model convention when interpreting a number.
Require unique item IDs and aligned zero-based edge indices. Repeatedly choose the first remaining zero-indegree item in original order, remove its outgoing edges and reject a cycle.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| itemIds | Item ids. | List of text values |
| prerequisiteIndices | Prerequisite indices. | List of finite numbers |
| dependentIndices | Dependent indices. | List of finite numbers |
| Output field | Interpretation |
|---|---|
| result | Object containing the following named result fields. |
| result.orderedItemIds | Ordered item ids list, in the ordering described in the calculation. |
{
"input": {
"itemIds": [
"a",
"b",
"c"
],
"prerequisiteIndices": [
2
],
"dependentIndices": [
0
]
},
"output": {
"result": {
"orderedItemIds": [
"b",
"c",
"a"
]
}
}
} Limitations and assumptions
- Duplicate edges are counted once. The tool does not infer prerequisites or optimize a legend's appearance.
- Every declared field is required and unexpected fields are rejected. Numeric inputs must be finite; input errors are distinct from a valid false result or an explicitly qualified output.
- Extremely large inputs and nonfinite or excessively large outputs are rejected. List positions reported by the tool use zero-based indices unless stated otherwise.
Alternative or Complementary methods
Check the underlying observations, units and conventions independently before using the result in a larger workflow. The tools listed below address nearby tasks; compare their inputs and scope before substituting one for this operation.
References
Similar or alternative tools
- proportional legend value solver
Value represented by a circle radius at a specified square-millimetres-per-unit scale.
- Strahler Stream Order Pair Merge Resolver
Resolve Strahler order for an explicitly established two-stream confluence; no network delineation.