Skip to content

Main content

Feature Property Key Collision Policy Tool

Compute feature property key collision policy from explicit bounded inputs.

Loading tool…

Description

Parse properties as an object and require oldKey to exist as an own key.

Feature properties and foreign members are JSON metadata, distinct from the geometry coordinates. Exact key operations and ID type checks can preserve useful distinctions, but do not independently authenticate records or validate an entire Feature.

Parse properties as an object and require oldKey to exist as an own key.

When to use this tool

Use Feature Property Key Collision Policy when you need a literal GeoJSON metadata, identifier, or shallow-key operation.

How to use the tool and how it works

  1. Enter propertiesJson, oldKey, newKey, overwrite. 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 propertiesJson, renamed. Inspect renamed before interpreting the associated values.

Parse properties as an object and require oldKey to exist as an own key. Reject an existing newKey unless overwrite is true or both keys are identical; remove oldKey and define newKey with its former JSON value before serialization.1

Input fieldMeaning and unitsAccepted input
propertiesJsonProperties JsonRequired. Text; maximum UTF-16 length 8192.
oldKeyOld KeyRequired. Text; maximum UTF-16 length 8192.
newKeyNew KeyRequired. Text; maximum UTF-16 length 8192.
overwriteOverwriteRequired. Boolean.
Output fieldInterpretationReturned shape
propertiesJsonProperties JsonRequired. Text; maximum UTF-16 length 8192.
renamedRenamedRequired. Boolean.
json
{
  "input": {
    "propertiesJson": "{\"a\":1,\"b\":2}",
    "oldKey": "a",
    "newKey": "b",
    "overwrite": true
  },
  "output": {
    "propertiesJson": "{\"b\":1}",
    "renamed": true
  }
}

Limitations and assumptions

  • This is a shallow exact-key rename. The implementation safely defines names such as __proto__; it does not merge objects or preserve original JSON formatting, and renamed means the two key names differ.
  • 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

Validate the complete Feature and its intended data model after editing. Preserve identifier precision and distinguish null values, absent members, collisions, and nested properties explicitly.

References

  1. Calculation and input contract: geojson/feature-property-key-collision-policy — tool.io

Similar or alternative tools

  • Feature Properties Single Key Removal

    Parse a properties object, test whether key exists as an own member, remove that exact top-level key if present, and serialize the remaining entries.

  • Feature Property JSON Null Replacement

    Parse a properties object, record whether key exists as an own member, remove its old entry if present, and append the key with JSON null before serializing.