Skip to contents

Compute one SHA-256 hash per GeoJSON feature after normalising JSON object ordering and excluding archive-added fields.

Usage

get_tiger_mosquito_feature_hashes(x)

Arguments

x

A GeoJSON string or path to a GeoJSON file.

Value

A character vector of SHA-256 hashes, one per feature.

Details

Canonical feature hashing follows these normalization rules:

  • Radix key ordering: Object keys are sorted using order(..., method = "radix") to ensure byte-wise (C-locale) deterministic ordering regardless of session LC_COLLATE settings.

  • 15-digit coordinate precision: Geometry coordinates are serialized with digits = 15, preserving IEEE-754 double precision for stable coordinate representation across platforms while absorbing minor floating-point printing artifacts across snapshots.

  • Excluded metadata: Archive-added and metadata attributes (feature_hash, source_url, source_official_update_date, fetched_at, data_canonical_sha256, and previous_data_canonical_sha256) are removed prior to hashing.