Skip to content

Main content

Place Hierarchy Level Count Tool

Count supplied hierarchy components without inferring geographic containment.

Loading tool…

Description

Return place-path level count under a root policy.

Regional records connect place labels, language coverage, source vintages, calendar offsets and historical units. A literal label or supplied year offset can organize metadata without resolving changes in borders, calendar systems or naming authority. Unknown and ambiguous values must retain their explicit flags.

Return place-path level count under a root policy.

When to use this tool

Use Place Hierarchy Level Count when checking the stated regional record, period, hierarchy or text convention.

How to use the tool and how it works

  1. Enter pathTokens, countRoot. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read levels. Use the output convention below.

Return place-path level count under a root policy. levels = max(0,pathTokens.length-(countRoot ? 0 : 1)).1

Input fieldMeaning and unitsAccepted input
pathTokensPath TokensRequired. Array of text; maximum UTF-16 length 8192; maximum items 256.
countRootCount RootRequired. Boolean.
Output fieldInterpretationReturned shape
levelsLevelsRequired. Safe integer.
json
{
  "input": {
    "pathTokens": [
      "world",
      "region",
      "town"
    ],
    "countRoot": false
  },
  "output": {
    "levels": 2
  }
}

Limitations and assumptions

  • The path may be empty and is not structurally validated; geographic hierarchy and source authority are not inferred.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Consult the original sources, applicable calendar and historical naming/measurement authorities for geographic or historical interpretation.

References

  1. Calculation and input contract: area-studies/place-hierarchy-level-count — tool.io

Similar or alternative tools