Skip to content

Main content

Feature Null Property Preservation

Build an explicit null-geometry GeoJSON Feature with an optional retained null property; omission and null are distinct.

Loading tool…

Description

Construct a null-geometry GeoJSON Feature with an explicit null property or its omission.

GeoJSON separates a Feature’s identifier, geometry and properties. Null geometry, an explicit null property and an omitted property are distinct states. Coordinate-order labels do not transform positions, and stringifying a value already entered as a number cannot restore lost identifier precision or spelling.

Construct a null-geometry GeoJSON Feature with an explicit null property or its omission.

When to use this tool

Use Feature Null Property Preservation when checking the stated restricted GeoJSON construction, property or identifier convention.

How to use the tool and how it works

  1. Enter featureId, propertyName, preserveNull. 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. Use the output convention below.

Serialize a Feature with supplied ID, null geometry and either a propertyName:null entry when preserveNull=true or empty properties otherwise.1

A GeoJSON Feature can have null geometry. An explicitly null property value remains different from an omitted property.2

Input fieldMeaning and unitsAccepted input
featureIdFeature IdRequired. Text; maximum UTF-16 length 8192.
propertyNameProperty NameRequired. Text; minimum UTF-16 length 0; maximum UTF-16 length 8192.
preserveNullTrue creates an explicit null property; false omits it. Geometry remains null in either case.Required. Boolean.
Output fieldInterpretationReturned shape
featureJsonFeature JsonRequired. Text; maximum UTF-16 length 8192.
json
{
  "input": {
    "featureId": "F17",
    "propertyName": "note",
    "preserveNull": true
  },
  "output": {
    "featureJson": "{\"type\":\"Feature\",\"id\":\"F17\",\"geometry\":null,\"properties\":{\"note\":null}}"
  }
}

Limitations and assumptions

  • A null geometry and an explicit null property have separate meanings; no coordinates, feature identity or property schema is verified.
  • 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 against the intended GeoJSON contract and use verified longitude/latitude and datum conventions for actual geographic data exchange.

References

  1. Calculation and input contract: geojson/feature-null-property-preservation — tool.io

  2. RFC 7946: The GeoJSON Format — IETF

Similar or alternative tools