Skip to content

Main content

Feature Foreign Member Shallow Rename Tool

Calculate feature foreign member shallow rename from explicit caller-supplied inputs.

Loading tool…

Description

Reject an occupied destination unless both names match, then rename a present own top-level member.

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.

Reject an occupied destination unless both names match, then rename a present own top-level member.

When to use this tool

Use Feature Foreign Member Shallow Rename when you need a literal GeoJSON metadata, identifier, or shallow-key operation.

How to use the tool and how it works

  1. Enter featureJson, from, to. 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 featureJson, renamed. Inspect renamed before interpreting the associated values.

Require a Feature object and from/to names outside the fixed reserved set type, geometry, properties, id, bbox, features, coordinates, and geometries. Reject an occupied destination unless both names match, then rename a present own top-level member.1

Input fieldMeaning and unitsAccepted input
featureJsonFeature JsonRequired. Text; maximum UTF-16 length 8192.
fromFromRequired. Text; maximum UTF-16 length 8192.
toToRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
featureJsonFeature JsonRequired. Text; maximum UTF-16 length 8192.
renamedRenamedRequired. Boolean.
json
{
  "input": {
    "featureJson": "{\"type\":\"Feature\",\"source\":\"survey\"}",
    "from": "source",
    "to": "provenance"
  },
  "output": {
    "featureJson": "{\"type\":\"Feature\",\"provenance\":\"survey\"}",
    "renamed": true
  }
}

Limitations and assumptions

  • This shallow rename preserves member values but not JSON formatting. An occupied destination is rejected even when the source is absent; reserved-name policy alone does not establish full Feature validity.
  • 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-foreign-member-shallow-rename — tool.io

Similar or alternative tools