{
  "asset": "precincts-topology.json",
  "purpose": "Display geometry for NC District Lab; not a revision of solver adjacency, Census/election values, or geographic contiguity rules.",
  "object": "precincts",
  "featureCount": 2625,
  "originalFeatureOrderAndPropertiesPreserved": true,
  "source": {
    "vintage": "20260824",
    "url": "https://s3.amazonaws.com/dl.ncsbe.gov/ShapeFiles/Precinct/SBE_PRECINCTS_20260824.zip",
    "sha256": "71f2a6a4d6601b44a0d3cfd4228dd51b199cb8ccb233d6e585bb4701c50cbe2e",
    "files": [
      "SBE_PRECINCTS_20260824.cpg",
      "SBE_PRECINCTS_20260824.dbf",
      "SBE_PRECINCTS_20260824.prj",
      "SBE_PRECINCTS_20260824.qmd",
      "SBE_PRECINCTS_20260824.shp",
      "SBE_PRECINCTS_20260824.shx"
    ]
  },
  "sourceCRS": "EPSG:32119",
  "outputCRS": "EPSG:4326",
  "normalization": {
    "method": "Node all boundaries on 1m EPSG32119 precision grid, polygonize into nonoverlapping faces; assign faces covered by multiple source precincts to the earliest original source index. Recombine faces by original precinct, then repair enclosed unassigned gaps as documented in displayGapRepair. Display geometry only, no graph/data changes.",
    "features": 2625,
    "faces": 5046,
    "overlapFaces": 1263,
    "overlapAreaM2": 162706.21007119183,
    "unassignedGapFaces": 1149,
    "unassignedGapAreaM2": 111156.21007122862
  },
  "maximumNormalizationAreaChange": {
    "i": 2513,
    "id": "036:34A",
    "originalM2": 10538267.798040535,
    "normalizedM2": 10497755.5,
    "changeM2": -40512.2980405353
  },
  "simplification": {
    "algorithm": "Shapely/GEOS coverage_simplify Visvalingam-Whyatt with intersection checks",
    "shapely": "2.2.0",
    "geos": "3.14.1",
    "toleranceMeters": 20,
    "coverageValidBefore": true,
    "coverageValidAfter": true
  },
  "quantization": {
    "steps": 1000000000,
    "degreeStep": [
      8.921702879195365e-09,
      2.835256584642834e-09
    ],
    "note": "Approximately 0.8 mm east-west and 0.3 mm north-south: finer serialization precision prevents quantization from collapsing tiny coastal slivers. This is not a claim of survey accuracy; normalization used 1m grid and simplification tolerance 20m."
  },
  "build": {
    "features": 2625,
    "arcs": 7620,
    "simplifiedArcPoints": 265375,
    "sourcePrecisionGridMeters": 1,
    "initialQuantization": null,
    "simplification": "GEOS coverage_simplify 20m tolerance; equivalent effective triangle area approx 400m2, preserves valid nonoverlap coverage. No further arc simplification by topojson-simplify."
  },
  "bytes": 5069281,
  "sha256": "658c9d41c22e593e91e890c5bcc0bc8886dbd8fcf2902822c20804cc3863acf8",
  "runtimeLibraries": [
    {
      "name": "topojson-client",
      "version": "3.1.0",
      "registryUrl": "https://registry.npmjs.org/topojson-client/3.1.0",
      "tarball": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz",
      "npmIntegrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==",
      "sha256": "889fadb422f6236d0f8337a236ce6499f258b75e44b81733b13bd971067322bf"
    }
  ],
  "generationLibraries": [
    {
      "name": "topojson-client",
      "version": "3.1.0",
      "registryUrl": "https://registry.npmjs.org/topojson-client/3.1.0",
      "tarball": "https://registry.npmjs.org/topojson-client/-/topojson-client-3.1.0.tgz",
      "npmIntegrity": "sha512-605uxS6bcYxGXw9qi62XyrV6Q3xwbndjachmNxu8HWTtVPxZfEJN9fd/SZS1Q54Sn2y0TMyMxFj/cJINqGHrKw==",
      "sha256": "889fadb422f6236d0f8337a236ce6499f258b75e44b81733b13bd971067322bf"
    },
    {
      "name": "topojson-server",
      "version": "3.0.1",
      "registryUrl": "https://registry.npmjs.org/topojson-server/3.0.1",
      "tarball": "https://registry.npmjs.org/topojson-server/-/topojson-server-3.0.1.tgz",
      "npmIntegrity": "sha512-/VS9j/ffKr2XAOjlZ9CgyyeLmgJ9dMwq6Y0YEON8O7p/tGGk+dCWnrE03zEdu7i4L7YsFZLEPZPzCvcB7lEEXw==",
      "sha256": "d52d79830c814028fd40b4a528d46a87c0cfb6a5d2d01d740159819a8e57b28b"
    },
    {
      "name": "topojson-simplify",
      "version": "3.0.3",
      "registryUrl": "https://registry.npmjs.org/topojson-simplify/3.0.3",
      "tarball": "https://registry.npmjs.org/topojson-simplify/-/topojson-simplify-3.0.3.tgz",
      "npmIntegrity": "sha512-V+pBjLVzSQ3+hSOxBiV01OVXgFiCmMO8ia3huxKEyIMTC1ApQHBcdXdOqcQ6U2JJJD31TZduwY6KyF15R8sUgg==",
      "sha256": "9454ce01d26b58835227bef9cb0f78308ca987545611cc9a405e667a7ce6e524"
    }
  ],
  "runtimeUsage": "Load vendor/topojson-client.min.js and district-topology.js; decoded precincts = topojson.feature(topology, topology.objects.precincts); district geometry = districtTopology.cleanMergedGeometry(topojson.merge(topology, selectedPrecinctGeometries)); render with evenodd fill rule. Keep all required geometry loads awaited and fixed overlay ordering.",
  "cleanup": "TopoJSON merge may concatenate microscopic tangent holes into self-touching rings. The local cleanup splits repeated-vertex loops and omits zero-area loops without moving coordinates or adding connections. Do not omit this cleanup for valid GeoJSON export.",
  "tests": {
    "precincts-gap-free-recovered.geojson": {
      "features": 2625,
      "allValid": true,
      "unassignedInteriorHoles": 0,
      "overlapArea": -7.105427357601002e-15
    },
    "counties-gap-free.geojson": {
      "features": 100,
      "allValid": true
    },
    "districts-gap-free.geojson": {
      "features": 14,
      "allValid": true
    },
    "nested-gap-free.geojson": {
      "features": 224,
      "allValid": true
    }
  },
  "reproduce": [
    "python normalize_coverage.py",
    "python repair_display_gaps.py",
    "node build_gap_free.cjs",
    "python transform_gap_free.py",
    "node finalize_gap_free.cjs",
    "node test_gap_free.cjs",
    "python audit_gap_free.py"
  ],
  "notes": [
    "Original unassigned interior slivers are filled for display only; no water connections or geographic graph edges were added.",
    "Source overlap faces use the earliest original precinct index, deterministically, only for display coverage.",
    "GEOS coverage simplification preserves shared edges and planar validity."
  ],
  "revision": "2.1",
  "displayGapRepair": {
    "method": "Fill every enclosed unassigned source gap into the neighboring precinct with the longest shared boundary, tie-break by original index. Only display geometry changes; no population, election, precinct membership or contiguity graph changes. Outer footprint is unchanged before shared-edge simplification. Coastline and water display are controlled by the existing Census land mask and geographic overlays.",
    "source": "precincts-original-meters.geojson (normalized original source coverage)",
    "gapCount": 1149,
    "gapAreaM2": 111156.21007122856,
    "largestGapM2": 22659.324855650935,
    "displayCoverageValid": true,
    "interiorUnassignedHolesAfter": 0,
    "simplificationMeters": 20,
    "largestGaps": [
      {
        "precinct": "043:PR39",
        "areaM2": 22659.324855650935,
        "perimeterM": 4822.034441627114,
        "centroid": [
          -78.72813815942511,
          35.35349435729795
        ]
      },
      {
        "precinct": "058:GRF",
        "areaM2": 11225.5,
        "perimeterM": 500.74885525406273,
        "centroid": [
          -76.97942304174907,
          35.66208262913124
        ]
      },
      {
        "precinct": "043:PR35",
        "areaM2": 9525.0,
        "perimeterM": 1775.8200825403317,
        "centroid": [
          -78.87147168934322,
          35.243657327453896
        ]
      },
      {
        "precinct": "043:PR37",
        "areaM2": 7872.44834308073,
        "perimeterM": 1029.1834033523012,
        "centroid": [
          -79.02612088332287,
          35.20929126740285
        ]
      },
      {
        "precinct": "073:RCOB",
        "areaM2": 4575.051282051281,
        "perimeterM": 7845.332968607967,
        "centroid": [
          -79.0151058124034,
          36.44430003520146
        ]
      },
      {
        "precinct": "043:PR35",
        "areaM2": 4422.275797872164,
        "perimeterM": 1413.8464282683524,
        "centroid": [
          -78.93295347809702,
          35.22039397386891
        ]
      },
      {
        "precinct": "043:PR35",
        "areaM2": 3649.028263795888,
        "perimeterM": 500.28313098964463,
        "centroid": [
          -78.95261277355215,
          35.34002266019503
        ]
      },
      {
        "precinct": "043:PR35",
        "areaM2": 2914.573093220257,
        "perimeterM": 775.7118679281796,
        "centroid": [
          -78.91641803042964,
          35.22349368563002
        ]
      },
      {
        "precinct": "043:PR38",
        "areaM2": 2626.5,
        "perimeterM": 454.62811288133196,
        "centroid": [
          -78.78279604654267,
          35.26310117539898
        ]
      },
      {
        "precinct": "043:PR37",
        "areaM2": 2288.0,
        "perimeterM": 591.993559556705,
        "centroid": [
          -79.01742775259498,
          35.23059143540046
        ]
      },
      {
        "precinct": "043:PR38",
        "areaM2": 2209.0333333334856,
        "perimeterM": 629.7046060331585,
        "centroid": [
          -78.80240829211941,
          35.26164995636889
        ]
      },
      {
        "precinct": "067:SW19",
        "areaM2": 2198.5,
        "perimeterM": 536.8018847090759,
        "centroid": [
          -77.1121656260306,
          34.65263532090618
        ]
      },
      {
        "precinct": "026:LI65",
        "areaM2": 2003.5,
        "perimeterM": 705.5932394408984,
        "centroid": [
          -78.84119346877469,
          35.252860849385044
        ]
      },
      {
        "precinct": "043:PR39",
        "areaM2": 1933.7092391304614,
        "perimeterM": 812.4928298313879,
        "centroid": [
          -78.73943560447277,
          35.35957915859679
        ]
      },
      {
        "precinct": "043:PR38",
        "areaM2": 1817.6969696970482,
        "perimeterM": 457.49469305066805,
        "centroid": [
          -78.83244744990449,
          35.25537953734798
        ]
      },
      {
        "precinct": "043:PR38",
        "areaM2": 1444.844444444403,
        "perimeterM": 432.75128042860536,
        "centroid": [
          -78.75002502975126,
          35.262577632928206
        ]
      },
      {
        "precinct": "026:LO66A",
        "areaM2": 961.7553879310435,
        "perimeterM": 377.6897367190763,
        "centroid": [
          -78.91834902454288,
          35.22155036442783
        ]
      },
      {
        "precinct": "053:C1",
        "areaM2": 928.0001805707143,
        "perimeterM": 1354.2984616338565,
        "centroid": [
          -79.13548737734257,
          35.355506207619335
        ]
      },
      {
        "precinct": "016:IBPK",
        "areaM2": 928.0,
        "perimeterM": 5445.279857135474,
        "centroid": [
          -76.78219633540814,
          34.68069823551286
        ]
      },
      {
        "precinct": "043:PR38",
        "areaM2": 803.178038379061,
        "perimeterM": 439.75492806912627,
        "centroid": [
          -78.82542357103499,
          35.25939687582978
        ]
      }
    ],
    "elapsedSeconds": 14.765020370483398
  },
  "rendering": "District, county and precinct boundaries use a single shared-arc mesh, filtered by adjacent feature assignments; polygon hole rings are not stroked as boundaries."
}