@mailwoman/resolver-wof-sqlite 10.0.0 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (477) hide show
  1. package/README.md +9 -8
  2. package/lib/address/point/interpolation.ts +45 -39
  3. package/lib/address/point/schema.ts +17 -40
  4. package/lib/address/point.ts +316 -0
  5. package/lib/{address/index.ts → address.ts} +1 -1
  6. package/lib/ancestry/backfill.ts +20 -86
  7. package/lib/{ancestry/index.ts → ancestry.ts} +19 -15
  8. package/lib/build/candidate.ts +122 -174
  9. package/lib/build/population-corrections.ts +64 -0
  10. package/lib/build/slim.ts +44 -114
  11. package/lib/candidate/alias-bags.ts +16 -17
  12. package/lib/candidate/ancestors/schema.ts +77 -61
  13. package/lib/candidate/ancestors/sidecar.ts +15 -22
  14. package/lib/candidate/country-display-names.ts +6 -20
  15. package/lib/candidate/extract-fold.ts +10 -55
  16. package/lib/candidate/fts.ts +5 -23
  17. package/lib/candidate/importance.ts +65 -68
  18. package/lib/candidate/lookup.ts +124 -415
  19. package/lib/candidate/name-roles.ts +15 -33
  20. package/lib/candidate/own-name.ts +35 -32
  21. package/lib/candidate/place-attrs.ts +20 -13
  22. package/lib/candidate/schema.ts +29 -65
  23. package/lib/candidate/scoring.ts +54 -93
  24. package/lib/capital-schema.ts +21 -17
  25. package/lib/capitals.ts +29 -27
  26. package/lib/coincident-roles.ts +85 -55
  27. package/lib/convention/schema.ts +15 -16
  28. package/lib/convention.ts +144 -0
  29. package/lib/coverage-manifest-schema.ts +40 -45
  30. package/lib/currency-backfill.ts +34 -79
  31. package/lib/env.ts +1 -1
  32. package/lib/exact-match.ts +32 -21
  33. package/lib/extracts.ts +97 -74
  34. package/lib/fst/autocomplete.ts +54 -37
  35. package/lib/fst/builder.ts +37 -41
  36. package/lib/fst/deserialize-web.ts +16 -17
  37. package/lib/fst/format.ts +41 -23
  38. package/lib/fst/freshness.ts +43 -120
  39. package/lib/fst/matcher.ts +7 -5
  40. package/lib/fst/serialize.ts +54 -74
  41. package/lib/fst/types.ts +78 -75
  42. package/lib/{fst/index.ts → fst.ts} +1 -0
  43. package/lib/fts/query.ts +5 -36
  44. package/lib/fts.ts +280 -0
  45. package/lib/geonames/aliases.ts +73 -144
  46. package/lib/geonames/postal.ts +162 -71
  47. package/lib/index.ts +9 -8
  48. package/lib/interpolation.ts +48 -100
  49. package/lib/lookup.ts +155 -270
  50. package/lib/name-score.ts +9 -7
  51. package/lib/nsul/lookup.ts +37 -54
  52. package/lib/nsul/schema.ts +16 -43
  53. package/lib/paths.ts +159 -0
  54. package/lib/place-importance-schema.ts +62 -169
  55. package/lib/poi/lookup.ts +104 -121
  56. package/lib/poi/schema.ts +42 -26
  57. package/lib/polygon-schema.ts +10 -6
  58. package/lib/postal/city/alias/lookup.ts +22 -40
  59. package/lib/postal/city/alias/schema.ts +14 -10
  60. package/lib/postal/city/candidate-schema.ts +26 -20
  61. package/lib/postcode-point-lookup.ts +8 -27
  62. package/lib/primary-preference.ts +46 -126
  63. package/lib/proximity-rerank.ts +44 -33
  64. package/lib/ranking-weights.ts +105 -78
  65. package/lib/region-keys.ts +70 -42
  66. package/lib/reverse.ts +149 -86
  67. package/lib/schema.ts +73 -50
  68. package/lib/search-fetch.ts +90 -68
  69. package/lib/sqlite/convention-source.ts +15 -23
  70. package/lib/sqlite/utils.ts +19 -22
  71. package/lib/street/centroid/schema.ts +37 -42
  72. package/lib/street/{centroid/index.ts → centroid.ts} +16 -25
  73. package/lib/street/morphology/fst/builder.ts +60 -42
  74. package/lib/street/morphology/fst/loader.ts +40 -32
  75. package/lib/street/name-lookup.ts +45 -41
  76. package/lib/street/normalize.ts +88 -219
  77. package/lib/street/segment-schema.ts +116 -43
  78. package/lib/{street/index.ts → street.ts} +1 -1
  79. package/lib/types.ts +109 -150
  80. package/lib/unified-schema.ts +29 -29
  81. package/lib/uprn/existence.ts +30 -19
  82. package/lib/uprn/lookup.ts +29 -68
  83. package/lib/uprn/schema.ts +18 -40
  84. package/lib/weights-overlay-linker.ts +236 -252
  85. package/out/address/point/interpolation.d.ts +20 -23
  86. package/out/address/point/interpolation.d.ts.map +1 -1
  87. package/out/address/point/interpolation.js +42 -39
  88. package/out/address/point/interpolation.js.map +1 -1
  89. package/out/address/point/schema.d.ts +12 -35
  90. package/out/address/point/schema.d.ts.map +1 -1
  91. package/out/address/point/schema.js +3 -19
  92. package/out/address/point/schema.js.map +1 -1
  93. package/out/address/point.d.ts +57 -0
  94. package/out/address/point.d.ts.map +1 -0
  95. package/out/address/point.js +206 -0
  96. package/out/address/point.js.map +1 -0
  97. package/out/{address/index.js → address.d.ts} +2 -2
  98. package/out/address.d.ts.map +1 -0
  99. package/out/{address/index.d.ts → address.js} +2 -2
  100. package/out/address.js.map +1 -0
  101. package/out/ancestry/backfill.d.ts +11 -64
  102. package/out/ancestry/backfill.d.ts.map +1 -1
  103. package/out/ancestry/backfill.js +14 -74
  104. package/out/ancestry/backfill.js.map +1 -1
  105. package/out/ancestry.d.ts +49 -0
  106. package/out/ancestry.d.ts.map +1 -0
  107. package/out/ancestry.js +59 -0
  108. package/out/ancestry.js.map +1 -0
  109. package/out/build/candidate.d.ts +82 -112
  110. package/out/build/candidate.d.ts.map +1 -1
  111. package/out/build/candidate.js +17 -100
  112. package/out/build/candidate.js.map +1 -1
  113. package/out/build/population-corrections.d.ts +52 -0
  114. package/out/build/population-corrections.d.ts.map +1 -0
  115. package/out/build/population-corrections.js +40 -0
  116. package/out/build/population-corrections.js.map +1 -0
  117. package/out/build/slim.d.ts +8 -44
  118. package/out/build/slim.d.ts.map +1 -1
  119. package/out/build/slim.js +33 -94
  120. package/out/build/slim.js.map +1 -1
  121. package/out/candidate/alias-bags.d.ts +6 -6
  122. package/out/candidate/alias-bags.d.ts.map +1 -1
  123. package/out/candidate/alias-bags.js +16 -17
  124. package/out/candidate/alias-bags.js.map +1 -1
  125. package/out/candidate/ancestors/schema.d.ts +73 -57
  126. package/out/candidate/ancestors/schema.d.ts.map +1 -1
  127. package/out/candidate/ancestors/schema.js +56 -48
  128. package/out/candidate/ancestors/schema.js.map +1 -1
  129. package/out/candidate/ancestors/sidecar.d.ts +3 -8
  130. package/out/candidate/ancestors/sidecar.d.ts.map +1 -1
  131. package/out/candidate/ancestors/sidecar.js +15 -22
  132. package/out/candidate/ancestors/sidecar.js.map +1 -1
  133. package/out/candidate/country-display-names.d.ts +5 -15
  134. package/out/candidate/country-display-names.d.ts.map +1 -1
  135. package/out/candidate/country-display-names.js +6 -20
  136. package/out/candidate/country-display-names.js.map +1 -1
  137. package/out/candidate/extract-fold.d.ts +7 -15
  138. package/out/candidate/extract-fold.d.ts.map +1 -1
  139. package/out/candidate/extract-fold.js +5 -47
  140. package/out/candidate/extract-fold.js.map +1 -1
  141. package/out/candidate/fts.d.ts +5 -23
  142. package/out/candidate/fts.d.ts.map +1 -1
  143. package/out/candidate/fts.js +5 -23
  144. package/out/candidate/fts.js.map +1 -1
  145. package/out/candidate/importance.d.ts +60 -65
  146. package/out/candidate/importance.d.ts.map +1 -1
  147. package/out/candidate/importance.js +56 -63
  148. package/out/candidate/importance.js.map +1 -1
  149. package/out/candidate/lookup.d.ts +18 -55
  150. package/out/candidate/lookup.d.ts.map +1 -1
  151. package/out/candidate/lookup.js +82 -385
  152. package/out/candidate/lookup.js.map +1 -1
  153. package/out/candidate/name-roles.d.ts +9 -21
  154. package/out/candidate/name-roles.d.ts.map +1 -1
  155. package/out/candidate/name-roles.js +15 -33
  156. package/out/candidate/name-roles.js.map +1 -1
  157. package/out/candidate/own-name.d.ts +23 -25
  158. package/out/candidate/own-name.d.ts.map +1 -1
  159. package/out/candidate/own-name.js +35 -32
  160. package/out/candidate/own-name.js.map +1 -1
  161. package/out/candidate/place-attrs.d.ts +20 -13
  162. package/out/candidate/place-attrs.d.ts.map +1 -1
  163. package/out/candidate/place-attrs.js +4 -5
  164. package/out/candidate/place-attrs.js.map +1 -1
  165. package/out/candidate/schema.d.ts +27 -62
  166. package/out/candidate/schema.d.ts.map +1 -1
  167. package/out/candidate/schema.js +10 -22
  168. package/out/candidate/schema.js.map +1 -1
  169. package/out/candidate/scoring.d.ts +7 -8
  170. package/out/candidate/scoring.d.ts.map +1 -1
  171. package/out/candidate/scoring.js +52 -89
  172. package/out/candidate/scoring.js.map +1 -1
  173. package/out/capital-schema.d.ts +21 -17
  174. package/out/capital-schema.d.ts.map +1 -1
  175. package/out/capital-schema.js +17 -15
  176. package/out/capital-schema.js.map +1 -1
  177. package/out/capitals.d.ts +27 -25
  178. package/out/capitals.d.ts.map +1 -1
  179. package/out/capitals.js +23 -21
  180. package/out/capitals.js.map +1 -1
  181. package/out/coincident-roles.d.ts +60 -43
  182. package/out/coincident-roles.d.ts.map +1 -1
  183. package/out/coincident-roles.js +72 -50
  184. package/out/coincident-roles.js.map +1 -1
  185. package/out/convention/schema.d.ts +14 -14
  186. package/out/convention/schema.d.ts.map +1 -1
  187. package/out/convention/schema.js +6 -4
  188. package/out/convention/schema.js.map +1 -1
  189. package/out/convention.d.ts +97 -0
  190. package/out/convention.d.ts.map +1 -0
  191. package/out/convention.js +81 -0
  192. package/out/convention.js.map +1 -0
  193. package/out/coverage-manifest-schema.d.ts +34 -39
  194. package/out/coverage-manifest-schema.d.ts.map +1 -1
  195. package/out/coverage-manifest-schema.js +25 -34
  196. package/out/coverage-manifest-schema.js.map +1 -1
  197. package/out/currency-backfill.d.ts +16 -38
  198. package/out/currency-backfill.d.ts.map +1 -1
  199. package/out/currency-backfill.js +19 -46
  200. package/out/currency-backfill.js.map +1 -1
  201. package/out/env.d.ts +1 -1
  202. package/out/env.js +1 -1
  203. package/out/exact-match.d.ts +19 -10
  204. package/out/exact-match.d.ts.map +1 -1
  205. package/out/exact-match.js +32 -21
  206. package/out/exact-match.js.map +1 -1
  207. package/out/extracts.d.ts +66 -55
  208. package/out/extracts.d.ts.map +1 -1
  209. package/out/extracts.js +63 -55
  210. package/out/extracts.js.map +1 -1
  211. package/out/fst/autocomplete.d.ts +29 -21
  212. package/out/fst/autocomplete.d.ts.map +1 -1
  213. package/out/fst/autocomplete.js +39 -28
  214. package/out/fst/autocomplete.js.map +1 -1
  215. package/out/fst/builder.d.ts.map +1 -1
  216. package/out/fst/builder.js +37 -41
  217. package/out/fst/builder.js.map +1 -1
  218. package/out/fst/deserialize-web.d.ts +4 -4
  219. package/out/fst/deserialize-web.d.ts.map +1 -1
  220. package/out/fst/deserialize-web.js +15 -16
  221. package/out/fst/deserialize-web.js.map +1 -1
  222. package/out/fst/format.d.ts +41 -23
  223. package/out/fst/format.d.ts.map +1 -1
  224. package/out/fst/format.js +41 -23
  225. package/out/fst/format.js.map +1 -1
  226. package/out/fst/freshness.d.ts +19 -81
  227. package/out/fst/freshness.d.ts.map +1 -1
  228. package/out/fst/freshness.js +31 -94
  229. package/out/fst/freshness.js.map +1 -1
  230. package/out/fst/matcher.d.ts +5 -4
  231. package/out/fst/matcher.d.ts.map +1 -1
  232. package/out/fst/matcher.js +2 -2
  233. package/out/fst/matcher.js.map +1 -1
  234. package/out/fst/serialize.d.ts +28 -28
  235. package/out/fst/serialize.d.ts.map +1 -1
  236. package/out/fst/serialize.js +53 -71
  237. package/out/fst/serialize.js.map +1 -1
  238. package/out/fst/types.d.ts +78 -74
  239. package/out/fst/types.d.ts.map +1 -1
  240. package/out/fst/types.js +1 -4
  241. package/out/fst/types.js.map +1 -1
  242. package/out/{fst/index.js → fst.d.ts} +2 -1
  243. package/out/fst.d.ts.map +1 -0
  244. package/out/{fst/index.d.ts → fst.js} +2 -1
  245. package/out/fst.js.map +1 -0
  246. package/out/fts/query.d.ts +2 -27
  247. package/out/fts/query.d.ts.map +1 -1
  248. package/out/fts/query.js +5 -36
  249. package/out/fts/query.js.map +1 -1
  250. package/out/fts.d.ts +126 -0
  251. package/out/fts.d.ts.map +1 -0
  252. package/out/fts.js +188 -0
  253. package/out/fts.js.map +1 -0
  254. package/out/geonames/aliases.d.ts +26 -62
  255. package/out/geonames/aliases.d.ts.map +1 -1
  256. package/out/geonames/aliases.js +45 -117
  257. package/out/geonames/aliases.js.map +1 -1
  258. package/out/geonames/postal.d.ts +84 -44
  259. package/out/geonames/postal.d.ts.map +1 -1
  260. package/out/geonames/postal.js +115 -73
  261. package/out/geonames/postal.js.map +1 -1
  262. package/out/{geonames/index.js → geonames.d.ts} +1 -1
  263. package/out/geonames.d.ts.map +1 -0
  264. package/out/{geonames/index.d.ts → geonames.js} +1 -1
  265. package/out/geonames.js.map +1 -0
  266. package/out/index.d.ts +9 -8
  267. package/out/index.d.ts.map +1 -1
  268. package/out/index.js +6 -5
  269. package/out/index.js.map +1 -1
  270. package/out/interpolation.d.ts +18 -55
  271. package/out/interpolation.d.ts.map +1 -1
  272. package/out/interpolation.js +27 -69
  273. package/out/interpolation.js.map +1 -1
  274. package/out/lookup.d.ts +23 -51
  275. package/out/lookup.d.ts.map +1 -1
  276. package/out/lookup.js +136 -234
  277. package/out/lookup.js.map +1 -1
  278. package/out/name-score.d.ts +2 -2
  279. package/out/name-score.d.ts.map +1 -1
  280. package/out/name-score.js +9 -7
  281. package/out/name-score.js.map +1 -1
  282. package/out/nsul/lookup.d.ts +33 -34
  283. package/out/nsul/lookup.d.ts.map +1 -1
  284. package/out/nsul/lookup.js +26 -40
  285. package/out/nsul/lookup.js.map +1 -1
  286. package/out/nsul/schema.d.ts +16 -43
  287. package/out/nsul/schema.d.ts.map +1 -1
  288. package/out/nsul/schema.js +9 -35
  289. package/out/nsul/schema.js.map +1 -1
  290. package/out/{nsul/index.d.ts → nsul.d.ts} +1 -1
  291. package/out/nsul.d.ts.map +1 -0
  292. package/out/{nsul/index.js → nsul.js} +1 -1
  293. package/out/nsul.js.map +1 -0
  294. package/out/paths.d.ts +124 -0
  295. package/out/paths.d.ts.map +1 -0
  296. package/out/paths.js +104 -0
  297. package/out/paths.js.map +1 -0
  298. package/out/place-importance-schema.d.ts +51 -143
  299. package/out/place-importance-schema.d.ts.map +1 -1
  300. package/out/place-importance-schema.js +28 -143
  301. package/out/place-importance-schema.js.map +1 -1
  302. package/out/poi/lookup.d.ts +40 -47
  303. package/out/poi/lookup.d.ts.map +1 -1
  304. package/out/poi/lookup.js +69 -96
  305. package/out/poi/lookup.js.map +1 -1
  306. package/out/poi/schema.d.ts +41 -25
  307. package/out/poi/schema.d.ts.map +1 -1
  308. package/out/poi/schema.js +25 -17
  309. package/out/poi/schema.js.map +1 -1
  310. package/out/{poi/index.js → poi.d.ts} +1 -1
  311. package/out/poi.d.ts.map +1 -0
  312. package/out/{poi/index.d.ts → poi.js} +1 -1
  313. package/out/poi.js.map +1 -0
  314. package/out/polygon-schema.d.ts +10 -6
  315. package/out/polygon-schema.d.ts.map +1 -1
  316. package/out/polygon-schema.js +2 -2
  317. package/out/polygon-schema.js.map +1 -1
  318. package/out/postal/city/alias/lookup.d.ts +20 -23
  319. package/out/postal/city/alias/lookup.d.ts.map +1 -1
  320. package/out/postal/city/alias/lookup.js +17 -30
  321. package/out/postal/city/alias/lookup.js.map +1 -1
  322. package/out/postal/city/alias/schema.d.ts +14 -10
  323. package/out/postal/city/alias/schema.d.ts.map +1 -1
  324. package/out/postal/city/alias/schema.js +10 -8
  325. package/out/postal/city/alias/schema.js.map +1 -1
  326. package/out/postal/city/candidate-schema.d.ts +25 -19
  327. package/out/postal/city/candidate-schema.d.ts.map +1 -1
  328. package/out/postal/city/candidate-schema.js +21 -17
  329. package/out/postal/city/candidate-schema.js.map +1 -1
  330. package/out/{postal/index.d.ts → postal.d.ts} +1 -1
  331. package/out/postal.d.ts.map +1 -0
  332. package/out/{postal/index.js → postal.js} +1 -1
  333. package/out/postal.js.map +1 -0
  334. package/out/postcode-point-lookup.d.ts +6 -24
  335. package/out/postcode-point-lookup.d.ts.map +1 -1
  336. package/out/postcode-point-lookup.js +5 -17
  337. package/out/postcode-point-lookup.js.map +1 -1
  338. package/out/primary-preference.d.ts +38 -92
  339. package/out/primary-preference.d.ts.map +1 -1
  340. package/out/primary-preference.js +15 -99
  341. package/out/primary-preference.js.map +1 -1
  342. package/out/proximity-rerank.d.ts +41 -30
  343. package/out/proximity-rerank.d.ts.map +1 -1
  344. package/out/proximity-rerank.js +38 -29
  345. package/out/proximity-rerank.js.map +1 -1
  346. package/out/ranking-weights.d.ts +98 -64
  347. package/out/ranking-weights.d.ts.map +1 -1
  348. package/out/ranking-weights.js +26 -25
  349. package/out/ranking-weights.js.map +1 -1
  350. package/out/region-keys.d.ts +50 -31
  351. package/out/region-keys.d.ts.map +1 -1
  352. package/out/region-keys.js +68 -40
  353. package/out/region-keys.js.map +1 -1
  354. package/out/reverse.d.ts +78 -50
  355. package/out/reverse.d.ts.map +1 -1
  356. package/out/reverse.js +98 -61
  357. package/out/reverse.js.map +1 -1
  358. package/out/schema.d.ts +72 -49
  359. package/out/schema.d.ts.map +1 -1
  360. package/out/schema.js +4 -5
  361. package/out/schema.js.map +1 -1
  362. package/out/search-fetch.d.ts +16 -12
  363. package/out/search-fetch.d.ts.map +1 -1
  364. package/out/search-fetch.js +83 -63
  365. package/out/search-fetch.js.map +1 -1
  366. package/out/sqlite/convention-source.d.ts +12 -16
  367. package/out/sqlite/convention-source.d.ts.map +1 -1
  368. package/out/sqlite/convention-source.js +13 -22
  369. package/out/sqlite/convention-source.js.map +1 -1
  370. package/out/sqlite/utils.d.ts +19 -19
  371. package/out/sqlite/utils.d.ts.map +1 -1
  372. package/out/sqlite/utils.js +14 -15
  373. package/out/sqlite/utils.js.map +1 -1
  374. package/out/street/centroid/schema.d.ts +37 -42
  375. package/out/street/centroid/schema.d.ts.map +1 -1
  376. package/out/street/centroid/schema.js +9 -21
  377. package/out/street/centroid/schema.js.map +1 -1
  378. package/out/street/centroid.d.ts +30 -0
  379. package/out/street/centroid.d.ts.map +1 -0
  380. package/out/street/{centroid/index.js → centroid.js} +13 -24
  381. package/out/street/centroid.js.map +1 -0
  382. package/out/street/morphology/fst/builder.d.ts +20 -10
  383. package/out/street/morphology/fst/builder.d.ts.map +1 -1
  384. package/out/street/morphology/fst/builder.js +44 -34
  385. package/out/street/morphology/fst/builder.js.map +1 -1
  386. package/out/street/morphology/fst/loader.d.ts +33 -26
  387. package/out/street/morphology/fst/loader.d.ts.map +1 -1
  388. package/out/street/morphology/fst/loader.js +23 -22
  389. package/out/street/morphology/fst/loader.js.map +1 -1
  390. package/out/street/name-lookup.d.ts +24 -18
  391. package/out/street/name-lookup.d.ts.map +1 -1
  392. package/out/street/name-lookup.js +34 -35
  393. package/out/street/name-lookup.js.map +1 -1
  394. package/out/street/normalize.d.ts +35 -136
  395. package/out/street/normalize.d.ts.map +1 -1
  396. package/out/street/normalize.js +77 -194
  397. package/out/street/normalize.js.map +1 -1
  398. package/out/street/segment-schema.d.ts +79 -39
  399. package/out/street/segment-schema.d.ts.map +1 -1
  400. package/out/street/segment-schema.js +71 -21
  401. package/out/street/segment-schema.js.map +1 -1
  402. package/out/{street/index.js → street.d.ts} +2 -2
  403. package/out/street.d.ts.map +1 -0
  404. package/out/{street/index.d.ts → street.js} +2 -2
  405. package/out/street.js.map +1 -0
  406. package/out/types.d.ts +84 -149
  407. package/out/types.d.ts.map +1 -1
  408. package/out/types.js +0 -6
  409. package/out/types.js.map +1 -1
  410. package/out/unified-schema.d.ts +8 -12
  411. package/out/unified-schema.d.ts.map +1 -1
  412. package/out/unified-schema.js +29 -29
  413. package/out/unified-schema.js.map +1 -1
  414. package/out/uprn/existence.d.ts +28 -17
  415. package/out/uprn/existence.d.ts.map +1 -1
  416. package/out/uprn/existence.js +26 -16
  417. package/out/uprn/existence.js.map +1 -1
  418. package/out/uprn/lookup.d.ts +14 -44
  419. package/out/uprn/lookup.d.ts.map +1 -1
  420. package/out/uprn/lookup.js +21 -57
  421. package/out/uprn/lookup.js.map +1 -1
  422. package/out/uprn/schema.d.ts +18 -40
  423. package/out/uprn/schema.d.ts.map +1 -1
  424. package/out/uprn/schema.js +10 -32
  425. package/out/uprn/schema.js.map +1 -1
  426. package/out/{uprn/index.d.ts → uprn.d.ts} +1 -1
  427. package/out/uprn.d.ts.map +1 -0
  428. package/out/{uprn/index.js → uprn.js} +1 -1
  429. package/out/uprn.js.map +1 -0
  430. package/out/weights-overlay-linker.d.ts +138 -144
  431. package/out/weights-overlay-linker.d.ts.map +1 -1
  432. package/out/weights-overlay-linker.js +105 -159
  433. package/out/weights-overlay-linker.js.map +1 -1
  434. package/package.json +91 -596
  435. package/lib/address/point/index.ts +0 -328
  436. package/lib/convention/index.ts +0 -154
  437. package/lib/fts/index.ts +0 -361
  438. package/out/address/index.d.ts.map +0 -1
  439. package/out/address/index.js.map +0 -1
  440. package/out/address/point/index.d.ts +0 -53
  441. package/out/address/point/index.d.ts.map +0 -1
  442. package/out/address/point/index.js +0 -222
  443. package/out/address/point/index.js.map +0 -1
  444. package/out/ancestry/index.d.ts +0 -45
  445. package/out/ancestry/index.d.ts.map +0 -1
  446. package/out/ancestry/index.js +0 -55
  447. package/out/ancestry/index.js.map +0 -1
  448. package/out/convention/index.d.ts +0 -106
  449. package/out/convention/index.d.ts.map +0 -1
  450. package/out/convention/index.js +0 -93
  451. package/out/convention/index.js.map +0 -1
  452. package/out/fst/index.d.ts.map +0 -1
  453. package/out/fst/index.js.map +0 -1
  454. package/out/fts/index.d.ts +0 -184
  455. package/out/fts/index.d.ts.map +0 -1
  456. package/out/fts/index.js +0 -277
  457. package/out/fts/index.js.map +0 -1
  458. package/out/geonames/index.d.ts.map +0 -1
  459. package/out/geonames/index.js.map +0 -1
  460. package/out/nsul/index.d.ts.map +0 -1
  461. package/out/nsul/index.js.map +0 -1
  462. package/out/poi/index.d.ts.map +0 -1
  463. package/out/poi/index.js.map +0 -1
  464. package/out/postal/index.d.ts.map +0 -1
  465. package/out/postal/index.js.map +0 -1
  466. package/out/street/centroid/index.d.ts +0 -40
  467. package/out/street/centroid/index.d.ts.map +0 -1
  468. package/out/street/centroid/index.js.map +0 -1
  469. package/out/street/index.d.ts.map +0 -1
  470. package/out/street/index.js.map +0 -1
  471. package/out/uprn/index.d.ts.map +0 -1
  472. package/out/uprn/index.js.map +0 -1
  473. /package/lib/{geonames/index.ts → geonames.ts} +0 -0
  474. /package/lib/{nsul/index.ts → nsul.ts} +0 -0
  475. /package/lib/{poi/index.ts → poi.ts} +0 -0
  476. /package/lib/{postal/index.ts → postal.ts} +0 -0
  477. /package/lib/{uprn/index.ts → uprn.ts} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"aliases.js","sourceRoot":"","sources":["../../lib/geonames/aliases.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAA;AAExG,OAAO,EAAE,IAAI,EAAwB,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5C;;;GAGG;AACH,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,kBAAkB,EAAE,WAAW,CAAU,CAAA;AAEpF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,uBAAuB,CAAK,EAAsB;IACjE,MAAM,OAAO,GAA2B,EAAE,CAAA;IAE1C,KAAK,MAAM,KAAK,IAAI,iBAAiB,EAAE,CAAC;QACvC,MAAM,MAAM,GAAG,EAAE;aACf,OAAO,CAAC,eAAe,KAAK,2BAA2B,CAAC;aACxD,GAAG,CAAC,gBAAgB,EAAE,uBAAuB,CAAC,CAAA;QAEhD,OAAO,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IACxC,CAAC;IAED,OAAO,OAAO,CAAA;AACf,CAAC;AA6BD;;;GAGG;AACH,KAAK,UAAU,qBAAqB,CACnC,MAAc,EACd,EAAU,EACV,MAA2B;IAE3B,MAAM,EAAE,GAAG,IAAI,GAAG,EAAgC,CAAA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C,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC,CAAA;QAC5E,KAAK,IAAI,EAAE,CAAA;IACZ,CAAC;IAED,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;IAEjB,OAAO,KAAK,CAAA;AACb,CAAC"}
@@ -3,43 +3,33 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * #920 — fold GeoNames POSTAL codes into a WOF/unified postcode extract as first-class
7
- * `postalcode` places, for the countries whose WOF postalcode repos don't exist (the
8
- * namesake-tail locales: FI/CZ/SK/SI/DK/NO/HR/PL and any future gap).
6
+ * Fold GeoNames postcode rows into a WOF or unified postcode extract as first-class `postalcode`
7
+ * places for countries whose WOF postalcode repos do not exist.
9
8
  *
10
- * Why: the night-31 taxonomy measured the cross-locale resolve tail as NAMESAKE COLLISION
11
- * (FI 300/1k … PL 75/1k offender rows), and the controlled experiment showed postcode-extract
12
- * coverage alone collapses it (FI 300→1, CZ 131→4): a resolvable postcode node feeds the
13
- * resolver's coordinate-first sibling-postcode candidate injection, which binds the locality
14
- * pick to its postcode neighborhood. The implementation already ships; it was coverage-starved.
9
+ * Two laws are enforced here in code rather than in a runbook.
15
10
  *
16
- * Two hard-won laws from the experiment are enforced HERE, in code, not in a runbook:
11
+ * 1. The name law. A postcode row's `name` is stored in the sanitized-query token shape with
12
+ * every non-letter and non-number stripped. `sanitizeFTSQuery` reduces the parsed token to
13
+ * that shape at lookup time. A stored `"110 00"` or `"11-041"` can never match the
14
+ * query `"11000"` or `"11041"`. The display form is preserved as an alt row in `names`.
15
+ * 2. The medoid law. A postcode whose rows contain scattered points has no single true center.
16
+ * Their average puts the code somewhere no address is. The medoid is the member point
17
+ * nearest the group's mean.
17
18
  *
18
- * 1. **The name law (#920 format law):** a postcode row's `name` is stored in the
19
- * SANITIZED-QUERY token shape — every non-letter/number stripped — because that is what
20
- * `sanitizeFTSQuery` reduces the parsed token to at lookup time. Stored `"110 00"` (CZ) or
21
- * `"11-041"` (PL) can never match the query `"11000"`/`"11041"`; the spaced CZ build
22
- * measured WORSE than no coverage (+13 namesake rows) because its bigrams partial-matched
23
- * WRONG codes. The display form is preserved as an alt row in `names`.
24
- * 2. **Medoid centroids:** GeoNames postal is one row per (postcode, settlement); the naive
25
- * mean-of-members centroid displaced tighter village coordinates on already-correct rows
26
- * (the p50-tax that ni-failed SK/SI/HR at 1.10–1.94 km CI). The MEDOID — the member point
27
- * nearest the mean — keeps the coordinate on a real settlement.
28
- *
29
- * Package home for the same reason as `geonames-aliases.ts`: `build-unified-wof
30
- * --geonames-postal-countries`, any standalone fold, and the `mailwoman gazetteer` commands
31
- * share ONE implementation. GeoNames postal dump = `download.geonames.org/export/zip/<CC>.zip`
32
- * → `<CC>.txt` (TSV: country, postcode, place, admin1, code1, admin2, code2, admin3, code3,
33
- * lat, lon, accuracy). License CC BY 4.0 — attribution rides the extract's `meta` provenance and
34
- * the model card like the existing GeoNames alias fold.
19
+ * `build-unified-wof --geonames-postal-countries`, standalone folds and the `mailwoman
20
+ * gazetteer` commands share one implementation. The GeoNames postal dump is
21
+ * `download.geonames.org/export/zip/<CC>.zip` → `<CC>.txt`, a headerless TSV of country,
22
+ * postcode, place, admin1, code1, admin2, code2, admin3, code3, lat, lon and accuracy.
23
+ * The license is CC BY 4.0. Attribution appears in the extract's `meta` provenance and model card.
35
24
  */
36
25
  import type { DatabaseClient } from "@mailwoman/sqlite/client";
37
26
  import { type PathBuilderLike } from "path-ts";
38
27
  import type { WOFDatabase } from "#schema";
39
28
  /**
40
- * The #920 name law: reduce a postcode to the sanitized-query token shape — strip every non-letter/number — so the
41
- * stored name matches what `sanitizeFTSQuery` produces from the parsed postcode token. `"110 00"` → `"11000"`,
42
- * `"11-041"` → `"11041"`, `"AD500"` → `"AD500"`.
29
+ * Reduce a postcode to the sanitized-query token shape, stripping every non-letter and non-number,
30
+ * so the stored name matches what `sanitizeFTSQuery` produces from the parsed postcode token.
31
+ *
32
+ * `"110 00"` → `"11000"`, `"11-041"` → `"11041"`, `"AD500"` → `"AD500"`.
43
33
  */
44
34
  export declare function normalizePostcodeName(raw: string): string;
45
35
  /**
@@ -47,22 +37,62 @@ export declare function normalizePostcodeName(raw: string): string;
47
37
  */
48
38
  export type PostcodePoint = readonly [number, number];
49
39
  /**
50
- * The #920 MEDOID law: pick the member point nearest the group's mean, never the mean itself.
40
+ * A medoid and the size of the group it came from.
51
41
  *
52
- * A postcode whose evidence is several scattered points has no single "true" centre, and the tempting answer — average
53
- * them — puts the code somewhere no address is. The night-31 experiment measured that as a p50 tax severe enough to
54
- * fail SK/SI/HR at 1.10–1.94 km CI: the mean displaced coordinates that were already correct. The medoid stays on a
55
- * real observation, so a single-member group is exactly its own point and a multi-member group is one of its members.
42
+ * These two integers describe the source dump.
43
+ * `@mailwoman/evidence`'s `EpistemicStatus` vocabulary belongs to the answering path.
56
44
  *
57
- * Distance is squared-Euclidean in DEGREES, not haversine. At the scale a postcode spans, the ranking the two produce
58
- * is the same, and this one carries no trig into a per-group inner loop. Ties go to the earliest member, which makes
59
- * the result a pure function of the input order — the property a rebuilt extract's ids depend on.
45
+ * `epistemicStatusFor` derives it there.
46
+ * These fields cannot use `observed` or `derived` here because that would give
47
+ * those words a second, local meaning.
48
+ */
49
+ export interface MedoidSupport {
50
+ /**
51
+ * The medoid over the distinct member points.
52
+ */
53
+ point: PostcodePoint;
54
+ /**
55
+ * Rows the group held.
56
+ */
57
+ rows: number;
58
+ /**
59
+ * Distinct coordinates among them.
60
+ *
61
+ * One means every row refers to the same point.
62
+ * In a dump whose coordinates are computed, that is one value inherited N times
63
+ * rather than N sources agreeing.
64
+ */
65
+ distinctPoints: number;
66
+ }
67
+ /**
68
+ * Pick the member point nearest the group's mean, never the mean itself.
60
69
  *
61
- * Exported (rather than inlined at each ingest) because it is the second half of the #920 pair: every postcode source
62
- * that groups member points — GeoNames postal, OSM `addr:postcode` — owes the same law, and a second hand-rolled copy
63
- * is where they drift.
70
+ * The medoid stays on a real observation, so a single-member group is exactly its own point
71
+ * and a multi-member group is one of its members.
72
+ * The bound applies only while the members are distinct, so duplicate points are collapsed first.
73
+ *
74
+ * Separate counts for N rows at one coordinate would weight that value by how many settlements
75
+ * inherited it. {@link MedoidSupport.distinctPoints} reports how many points the answer rested on.
76
+ *
77
+ * Distance is squared-Euclidean in degrees rather than haversine.
78
+ * At the scale a postcode spans, both methods produce the same ranking.
79
+ *
80
+ * Squared-Euclidean distance keeps trigonometry out of a per-group inner loop.
81
+ *
82
+ * Ties go to the earliest member, so the result is a pure function of input order.
83
+ * Rebuilt extract IDs depend on that property.
84
+ *
85
+ * Exported for reuse by every postcode source that groups member points:
86
+ * GeoNames postal and OSM `addr:postcode`.
87
+ * Both sources owe the same law.
88
+ * A second hand-rolled copy would let them drift.
64
89
  */
65
90
  export declare function medoidPoint(points: readonly PostcodePoint[]): PostcodePoint;
91
+ /**
92
+ * {@link medoidPoint} with the group size it rested on, for a caller that must
93
+ * record how thin the answer was.
94
+ */
95
+ export declare function medoidWithSupport(points: readonly PostcodePoint[]): MedoidSupport;
66
96
  export interface GeonamesPostalIngestResult {
67
97
  /**
68
98
  * Distinct postcodes inserted across all countries.
@@ -72,16 +102,26 @@ export interface GeonamesPostalIngestResult {
72
102
  * Per-country distinct-postcode counts.
73
103
  */
74
104
  byCountry: Record<string, number>;
105
+ /**
106
+ * Per-country count of inserted codes the dump listed on several rows that all refer to one point.
107
+ *
108
+ * The coordinate rests on a single value no matter how many settlements sit under the code.
109
+ * Reported because the point is still the best the source offers.
110
+ *
111
+ * A consumer weighing postal coverage needs to know how much of it is this.
112
+ */
113
+ singlePointByCountry: Record<string, number>;
75
114
  /**
76
115
  * Countries whose `<CC>.txt` was missing under the postal dir (skipped, reported).
77
116
  */
78
117
  missing: string[];
79
118
  }
80
119
  /**
81
- * Fold GeoNames postcodes for `countries` into an open unified/postcode ingest DB: one `spr` row per distinct
82
- * normalized postcode (placetype `postalcode`, medoid centroid, degenerate bbox), the normalized form as `name`, and
83
- * the display form as an extra `names` row when it differs. The caller owns the FTS rebuild (rows ride the standard
84
- * freeze phase).
120
+ * Fold GeoNames postcodes for `countries` into an open unified/postcode ingest DB: one `spr` row
121
+ * per distinct normalized postcode (placetype `postalcode`, medoid centroid, degenerate bbox),
122
+ * the normalized form as `name`, and the display form as an extra `names` row when it differs.
123
+ *
124
+ * The caller owns the FTS rebuild (rows ride the standard freeze phase).
85
125
  */
86
126
  export declare function ingestGeonamesPostal(db: DatabaseClient<WOFDatabase>, countries: readonly string[], postalDir: PathBuilderLike): Promise<GeonamesPostalIngestResult>;
87
127
  //# sourceMappingURL=postal.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postal.d.ts","sourceRoot":"","sources":["../../lib/geonames/postal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAIH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAQ,KAAK,eAAe,EAAE,MAAM,SAAS,CAAA;AAGpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AAQ1C;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEzD;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAErD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,aAAa,EAAE,GAAG,aAAa,CA+B3E;AAED,MAAM,WAAW,0BAA0B;IAC1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAA;IAChB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACjC;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CA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,MAAM,CAAC,CAAA;IAC5C;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACzC,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,EAC/B,SAAS,EAAE,SAAS,MAAM,EAAE,EAC5B,SAAS,EAAE,eAAe,GACxB,OAAO,CAAC,0BAA0B,CAAC,CAgFrC"}
@@ -3,121 +3,157 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  *
6
- * #920 — fold GeoNames POSTAL codes into a WOF/unified postcode extract as first-class
7
- * `postalcode` places, for the countries whose WOF postalcode repos don't exist (the
8
- * namesake-tail locales: FI/CZ/SK/SI/DK/NO/HR/PL and any future gap).
9
- *
10
- * Why: the night-31 taxonomy measured the cross-locale resolve tail as NAMESAKE COLLISION
11
- * (FI 300/1k … PL 75/1k offender rows), and the controlled experiment showed postcode-extract
12
- * coverage alone collapses it (FI 300→1, CZ 131→4): a resolvable postcode node feeds the
13
- * resolver's coordinate-first sibling-postcode candidate injection, which binds the locality
14
- * pick to its postcode neighborhood. The implementation already ships; it was coverage-starved.
15
- *
16
- * Two hard-won laws from the experiment are enforced HERE, in code, not in a runbook:
17
- *
18
- * 1. **The name law (#920 format law):** a postcode row's `name` is stored in the
19
- * SANITIZED-QUERY token shape — every non-letter/number stripped — because that is what
20
- * `sanitizeFTSQuery` reduces the parsed token to at lookup time. Stored `"110 00"` (CZ) or
21
- * `"11-041"` (PL) can never match the query `"11000"`/`"11041"`; the spaced CZ build
22
- * measured WORSE than no coverage (+13 namesake rows) because its bigrams partial-matched
23
- * WRONG codes. The display form is preserved as an alt row in `names`.
24
- * 2. **Medoid centroids:** GeoNames postal is one row per (postcode, settlement); the naive
25
- * mean-of-members centroid displaced tighter village coordinates on already-correct rows
26
- * (the p50-tax that ni-failed SK/SI/HR at 1.10–1.94 km CI). The MEDOID — the member point
27
- * nearest the mean — keeps the coordinate on a real settlement.
28
- *
29
- * Package home for the same reason as `geonames-aliases.ts`: `build-unified-wof
30
- * --geonames-postal-countries`, any standalone fold, and the `mailwoman gazetteer` commands
31
- * share ONE implementation. GeoNames postal dump = `download.geonames.org/export/zip/<CC>.zip`
32
- * → `<CC>.txt` (TSV: country, postcode, place, admin1, code1, admin2, code2, admin3, code3,
33
- * lat, lon, accuracy). License CC BY 4.0 — attribution rides the extract's `meta` provenance and
34
- * the model card like the existing GeoNames alias fold.
6
+ * Fold GeoNames postcode rows into a WOF or unified postcode extract as first-class `postalcode`
7
+ * places for countries whose WOF postalcode repos do not exist.
8
+ *
9
+ * Two laws are enforced here in code rather than in a runbook.
10
+ *
11
+ * 1. The name law. A postcode row's `name` is stored in the sanitized-query token shape with
12
+ * every non-letter and non-number stripped. `sanitizeFTSQuery` reduces the parsed token to
13
+ * that shape at lookup time. A stored `"110 00"` or `"11-041"` can never match the
14
+ * query `"11000"` or `"11041"`. The display form is preserved as an alt row in `names`.
15
+ * 2. The medoid law. A postcode whose rows contain scattered points has no single true center.
16
+ * Their average puts the code somewhere no address is. The medoid is the member point
17
+ * nearest the group's mean.
18
+ *
19
+ * `build-unified-wof --geonames-postal-countries`, standalone folds and the `mailwoman
20
+ * gazetteer` commands share one implementation. The GeoNames postal dump is
21
+ * `download.geonames.org/export/zip/<CC>.zip` → `<CC>.txt`, a headerless TSV of country,
22
+ * postcode, place, admin1, code1, admin2, code2, admin3, code3, lat, lon and accuracy.
23
+ * The license is CC BY 4.0. Attribution appears in the extract's `meta` provenance and model card.
35
24
  */
36
- import { pathExists } from "@mailwoman/core/fs/readers";
25
+ import { readUnquotedTSV } from "@mailwoman/core/fs/delimited";
26
+ import { pathExists } from "@mailwoman/core/fs/readers/stat";
37
27
  import { GEONAMES_POSTAL_ID_BASE } from "@mailwoman/core/resolver/synthetic-id-ranges";
38
- import { join } from "path-ts";
39
- import { TSVSpliterator } from "spliterator";
28
+ import { resolvePathBuilder } from "path-ts";
40
29
  /**
41
- * Column count of a GeoNames postal-code TSV row. Short rows are truncated or blank and are skipped. See the
42
- * allCountries.zip readme for the field list.
30
+ * Column count of a GeoNames postal-code TSV row.
31
+ *
32
+ * Short rows are truncated or blank and are skipped.
33
+ * See the allCountries.zip readme for the field list.
43
34
  */
44
35
  const GEONAMES_POSTAL_COLUMNS = 11;
45
36
  /**
46
- * The #920 name law: reduce a postcode to the sanitized-query token shape — strip every non-letter/number — so the
47
- * stored name matches what `sanitizeFTSQuery` produces from the parsed postcode token. `"110 00"` → `"11000"`,
48
- * `"11-041"` → `"11041"`, `"AD500"` → `"AD500"`.
37
+ * Reduce a postcode to the sanitized-query token shape, stripping every non-letter and non-number,
38
+ * so the stored name matches what `sanitizeFTSQuery` produces from the parsed postcode token.
39
+ *
40
+ * `"110 00"` → `"11000"`, `"11-041"` → `"11041"`, `"AD500"` → `"AD500"`.
49
41
  */
50
42
  export function normalizePostcodeName(raw) {
51
43
  return raw.replaceAll(/[^\p{L}\p{N}]/gu, "");
52
44
  }
53
45
  /**
54
- * The #920 MEDOID law: pick the member point nearest the group's mean, never the mean itself.
46
+ * Collapse a group to its distinct points before any geometric consensus reads it.
47
+ *
48
+ * Rows sharing a coordinate to the digit provide one coordinate value.
49
+ * GeoNames computes a postal coordinate by matching the code against the names
50
+ * of places and admin divisions.
51
+ *
52
+ * It averages neighboring codes when the match fails.
53
+ * One computed value can reach every row that matched it.
54
+ *
55
+ * Uses exact equality rather than a proximity radius.
56
+ * `collapseCoincident` answers whether ranked candidates are the same physical
57
+ * place within `COINCIDENT_PLACE_KM`.
58
+ *
59
+ * Two surveyed settlements 200 m apart remain two points here.
60
+ */
61
+ function collapseDuplicatePoints(points) {
62
+ const seen = new Set();
63
+ const out = [];
64
+ for (const p of points) {
65
+ const key = `${p[0]},${p[1]}`;
66
+ if (seen.has(key))
67
+ continue;
68
+ seen.add(key);
69
+ out.push(p);
70
+ }
71
+ return out;
72
+ }
73
+ /**
74
+ * Pick the member point nearest the group's mean, never the mean itself.
75
+ *
76
+ * The medoid stays on a real observation, so a single-member group is exactly its own point
77
+ * and a multi-member group is one of its members.
78
+ * The bound applies only while the members are distinct, so duplicate points are collapsed first.
79
+ *
80
+ * Separate counts for N rows at one coordinate would weight that value by how many settlements
81
+ * inherited it. {@link MedoidSupport.distinctPoints} reports how many points the answer rested on.
55
82
  *
56
- * A postcode whose evidence is several scattered points has no single "true" centre, and the tempting answer — average
57
- * them — puts the code somewhere no address is. The night-31 experiment measured that as a p50 tax severe enough to
58
- * fail SK/SI/HR at 1.10–1.94 km CI: the mean displaced coordinates that were already correct. The medoid stays on a
59
- * real observation, so a single-member group is exactly its own point and a multi-member group is one of its members.
83
+ * Distance is squared-Euclidean in degrees rather than haversine.
84
+ * At the scale a postcode spans, both methods produce the same ranking.
60
85
  *
61
- * Distance is squared-Euclidean in DEGREES, not haversine. At the scale a postcode spans, the ranking the two produce
62
- * is the same, and this one carries no trig into a per-group inner loop. Ties go to the earliest member, which makes
63
- * the result a pure function of the input order — the property a rebuilt extract's ids depend on.
86
+ * Squared-Euclidean distance keeps trigonometry out of a per-group inner loop.
64
87
  *
65
- * Exported (rather than inlined at each ingest) because it is the second half of the #920 pair: every postcode source
66
- * that groups member points — GeoNames postal, OSM `addr:postcode` — owes the same law, and a second hand-rolled copy
67
- * is where they drift.
88
+ * Ties go to the earliest member, so the result is a pure function of input order.
89
+ * Rebuilt extract IDs depend on that property.
90
+ *
91
+ * Exported for reuse by every postcode source that groups member points:
92
+ * GeoNames postal and OSM `addr:postcode`.
93
+ * Both sources owe the same law.
94
+ * A second hand-rolled copy would let them drift.
68
95
  */
69
96
  export function medoidPoint(points) {
70
- const first = points[0];
71
- if (!first)
72
- throw new Error("medoidPoint: no member points");
73
- if (points.length === 1)
74
- return first;
97
+ return medoidWithSupport(points).point;
98
+ }
99
+ /**
100
+ * {@link medoidPoint} with the group size it rested on, for a caller that must
101
+ * record how thin the answer was.
102
+ */
103
+ export function medoidWithSupport(points) {
104
+ if (!points.length)
105
+ throw new Error("medoidWithSupport: no member points");
106
+ const distinct = collapseDuplicatePoints(points);
107
+ const only = distinct[0];
108
+ if (distinct.length === 1) {
109
+ return { point: only, rows: points.length, distinctPoints: 1 };
110
+ }
75
111
  let sumLat = 0;
76
112
  let sumLon = 0;
77
- for (const p of points) {
113
+ for (const p of distinct) {
78
114
  sumLat += p[0];
79
115
  sumLon += p[1];
80
116
  }
81
- const meanLat = sumLat / points.length;
82
- const meanLon = sumLon / points.length;
83
- let best = first;
117
+ const meanLat = sumLat / distinct.length;
118
+ const meanLon = sumLon / distinct.length;
119
+ let best = only;
84
120
  let bestD = Infinity;
85
- for (const p of points) {
121
+ for (const p of distinct) {
86
122
  const d = (p[0] - meanLat) ** 2 + (p[1] - meanLon) ** 2;
87
123
  if (d < bestD) {
88
124
  bestD = d;
89
125
  best = p;
90
126
  }
91
127
  }
92
- return best;
128
+ return { point: best, rows: points.length, distinctPoints: distinct.length };
93
129
  }
94
130
  /**
95
- * Fold GeoNames postcodes for `countries` into an open unified/postcode ingest DB: one `spr` row per distinct
96
- * normalized postcode (placetype `postalcode`, medoid centroid, degenerate bbox), the normalized form as `name`, and
97
- * the display form as an extra `names` row when it differs. The caller owns the FTS rebuild (rows ride the standard
98
- * freeze phase).
131
+ * Fold GeoNames postcodes for `countries` into an open unified/postcode ingest DB: one `spr` row
132
+ * per distinct normalized postcode (placetype `postalcode`, medoid centroid, degenerate bbox),
133
+ * the normalized form as `name`, and the display form as an extra `names` row when it differs.
134
+ *
135
+ * The caller owns the FTS rebuild (rows ride the standard freeze phase).
99
136
  */
100
137
  export async function ingestGeonamesPostal(db, countries, postalDir) {
101
138
  const sprInsert = db.prepare(`INSERT OR REPLACE INTO spr (id, parent_id, name, placetype, country, latitude, longitude, min_latitude, min_longitude, max_latitude, max_longitude, is_current, is_deprecated, is_ceased, is_superseded, is_superseding, lastmodified) VALUES (?, -1, ?, 'postalcode', ?, ?, ?, ?, ?, ?, ?, 1, 0, 0, 0, 0, 0)`);
102
139
  const namesInsert = db.prepare(`INSERT INTO names (id, name, placetype, country, language, lastmodified) VALUES (?, ?, 'postalcode', ?, '', 0)`);
103
140
  let nextID = GEONAMES_POSTAL_ID_BASE;
104
141
  const byCountry = {};
142
+ const singlePointByCountry = {};
105
143
  const missing = [];
106
144
  let inserted = 0;
107
145
  for (const country of countries) {
108
146
  const cc = country.toUpperCase();
109
- const file = join(postalDir, `${cc}.txt`);
147
+ const file = resolvePathBuilder(postalDir, `${cc}.txt`);
110
148
  if (!(await pathExists(file))) {
111
149
  missing.push(cc);
112
150
  console.error(` GeoNames postal ${cc}: ${file} missing — download from download.geonames.org/export/zip/${cc}.zip; skipped`);
113
151
  continue;
114
152
  }
115
- // Group member settlement points per NORMALIZED code; remember one display form.
116
153
  const members = new Map();
117
- // Streamed: a national dump is a caller-supplied size — GB's is 177 MB, and only the caller
118
- // knows which country is next. `header: false` is required; the GeoNames postal dump is
119
- // headerless, so row 1 would be consumed as column names and its postcode lost.
120
- for await (const cols of TSVSpliterator.fromAsync(file, { header: false })) {
154
+ // The dump is headerless, so row 1 would otherwise be consumed as column headings and its postcode lost.
155
+ // `header: false` is required.
156
+ for await (const cols of readUnquotedTSV(file)) {
121
157
  if (cols.length < GEONAMES_POSTAL_COLUMNS)
122
158
  continue;
123
159
  const display = cols[1].trim();
@@ -131,9 +167,13 @@ export async function ingestGeonamesPostal(db, countries, postalDir) {
131
167
  members.set(name, m);
132
168
  }
133
169
  db.exec("BEGIN");
170
+ let singlePoint = 0;
134
171
  for (const [name, m] of members) {
135
- // Medoid: the member point nearest the mean — stays on a real settlement (the p50-tax law).
136
- const best = medoidPoint(m.pts);
172
+ const support = medoidWithSupport(m.pts);
173
+ const best = support.point;
174
+ if (support.distinctPoints === 1 && support.rows > 1) {
175
+ singlePoint++;
176
+ }
137
177
  const id = nextID++;
138
178
  sprInsert.run(id, name, cc, best[0], best[1], best[0], best[1], best[0], best[1]);
139
179
  namesInsert.run(id, name, cc);
@@ -144,8 +184,10 @@ export async function ingestGeonamesPostal(db, countries, postalDir) {
144
184
  }
145
185
  db.exec("COMMIT");
146
186
  byCountry[cc] = members.size;
147
- console.error(` GeoNames postal ${cc}: ${members.size.toLocaleString()} distinct codes (medoid centroids)`);
187
+ singlePointByCountry[cc] = singlePoint;
188
+ console.error(` GeoNames postal ${cc}: ${members.size.toLocaleString()} distinct codes (medoid centroids), ` +
189
+ `${singlePoint.toLocaleString()} resting on one repeated point`);
148
190
  }
149
- return { inserted, byCountry, missing };
191
+ return { inserted, byCountry, singlePointByCountry, missing };
150
192
  }
151
193
  //# sourceMappingURL=postal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"postal.js","sourceRoot":"","sources":["../../lib/geonames/postal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8CAA8C,CAAA;AAEtF,OAAO,EAAE,IAAI,EAAwB,MAAM,SAAS,CAAA;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAI5C;;;GAGG;AACH,MAAM,uBAAuB,GAAG,EAAE,CAAA;AAElC;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,GAAW;IAChD,OAAO,GAAG,CAAC,UAAU,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAA;AAC7C,CAAC;AAOD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,WAAW,CAAC,MAAgC;IAC3D,MAAM,KAAK,GAAG,MAAM,CAAC,CAAC,CAAC,CAAA;IAEvB,IAAI,CAAC,KAAK;QAAE,MAAM,IAAI,KAAK,CAAC,+BAA+B,CAAC,CAAA;IAE5D,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAA;IAErC,IAAI,MAAM,GAAG,CAAC,CAAA;IACd,IAAI,MAAM,GAAG,CAAC,CAAA;IAEd,KAAK,MAA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AAE,EAAE,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;YACnC,CAAC;YAED,QAAQ,EAAE,CAAA;QACX,CAAC;QAED,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QACjB,SAAS,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAA;QAC5B,oBAAoB,CAAC,EAAE,CAAC,GAAG,WAAW,CAAA;QAEtC,OAAO,CAAC,KAAK,CACZ,qBAAqB,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,sCAAsC;YAC9F,GAAG,WAAW,CAAC,cAAc,EAAE,gCAAgC,CAChE,CAAA;IACF,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,CAAA;AAC9D,CAAC"}
@@ -5,4 +5,4 @@
5
5
  */
6
6
  export * from "#geonames/aliases";
7
7
  export * from "#geonames/postal";
8
- //# sourceMappingURL=index.js.map
8
+ //# sourceMappingURL=geonames.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geonames.d.ts","sourceRoot":"","sources":["../lib/geonames.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
@@ -5,4 +5,4 @@
5
5
  */
6
6
  export * from "#geonames/aliases";
7
7
  export * from "#geonames/postal";
8
- //# sourceMappingURL=index.d.ts.map
8
+ //# sourceMappingURL=geonames.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"geonames.js","sourceRoot":"","sources":["../lib/geonames.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,mBAAmB,CAAA;AACjC,cAAc,kBAAkB,CAAA"}
package/out/index.d.ts CHANGED
@@ -3,9 +3,10 @@
3
3
  * @license AGPL-3.0
4
4
  * @author Teffen Ellis, et al.
5
5
  */
6
- export type { FindPlaceQuery, GeoBbox, GeoPoint, PlaceCandidate, PlaceLookup, WOFPlacetype } from "#types";
6
+ export type { FindPlaceQuery, PlaceCandidate, PlaceLookup, WOFPlacetype } from "#types";
7
7
  export type { AncestorsTable, CoincidentRolesTable, ConcordancesTable, GeojsonTable, NamesTable, PlaceAbbrTable, PlacePopulationTable, PlaceSearchTable, SprTable, WOFDatabase, } from "#schema";
8
- export { WOFSQLitePlaceLookup, type RankingWeights, type WOFSQLitePlaceLookupOpts } from "#lookup";
8
+ export { WOFSQLitePlaceLookup, type WOFSQLitePlaceLookupOpts } from "#lookup";
9
+ export { type RankingWeights } from "#ranking-weights";
9
10
  export { CANDIDATE_ANCESTOR_COLUMNS, CANDIDATE_ANCESTOR_TABLE, CANDIDATE_INTERVAL_TABLE, createCandidateAncestorTable, createCandidateIntervalTable, intervalContains, MAX_ANCESTOR_DEPTH, } from "#candidate/ancestors/schema";
10
11
  export type { CandidateAncestorsDatabase, CandidateAncestorTable, CandidateIntervalTable, IntervalLabel, } from "#candidate/ancestors/schema";
11
12
  export { CANDIDATE_FTS_TABLE, createCandidateFTS } from "#candidate/fts";
@@ -21,17 +22,17 @@ export { WOFPostalCityAliasLookup, type PostalCityAlias, type WOFPostalCityAlias
21
22
  export type { PostalCityAliasDatabase, PostalCityAliasTable } from "#postal/city/alias/schema";
22
23
  export { POSTAL_CITY_CANDIDATE_COLUMNS, POSTAL_CITY_CANDIDATE_TABLE, createPostalCityCandidateTable, } from "#postal/city/candidate-schema";
23
24
  export type { PostalCityCandidateDatabase, PostalCityCandidateTable } from "#postal/city/candidate-schema";
24
- export { ADDRESS_CONVENTION_TABLE, BUILTIN_STRATEGY_NAMES, SeedConventionSource, WORLD_DEFAULT, mergeConventions, resolveConvention, type Convention, type ConventionSource, type ResolvedConvention, type ScoringWeights, type Strategy, } from "#convention/index";
25
+ export { ADDRESS_CONVENTION_TABLE, BUILTIN_STRATEGY_NAMES, SeedConventionSource, WORLD_DEFAULT, mergeConventions, resolveConvention, type Convention, type ConventionSource, type ResolvedConvention, type ScoringWeights, type Strategy, } from "#convention";
25
26
  export { SqliteConventionSource } from "#sqlite/convention-source";
26
- export { WOFPostcodeLookup, type PostcodePlace } from "#postcode-point-lookup";
27
- export { PLACE_BBOX_TABLE, PLACE_SEARCH_TABLE, buildPlaceSearchFTS, placeBboxExists, placeSearchFTSExists, type BuildPlaceSearchFTSOpts, type BuildPlaceSearchFTSResult, } from "#fts/index";
28
- export { PLACETYPE_DEPTH, ancestorLineage, placetypeDepth, type AncestorPlaceRow } from "#ancestry/index";
27
+ export { WOFPostcodeLookup } from "#postcode-point-lookup";
28
+ export { PLACE_BBOX_TABLE, PLACE_SEARCH_TABLE, buildPlaceSearchFTS, placeBboxExists, placeSearchFTSExists, type BuildPlaceSearchFTSOpts, type BuildPlaceSearchFTSResult, } from "#fts";
29
+ export { PLACETYPE_DEPTH, ancestorLineage, placetypeDepth, type AncestorPlaceRow } from "#ancestry";
29
30
  export { WOFReverseGeocoder, type ContainmentKind, type ReverseGeocodeOpts, type ReverseGeocodeResult, type WOFReverseGeocoderOpts, } from "#reverse";
30
31
  export { AddressPointInterpolator } from "#address/point/interpolation";
31
- export { AddressPointSqliteLookup } from "#address/point/index";
32
+ export { AddressPointSqliteLookup } from "#address/point";
32
33
  export { STREET_CENTROID_COLUMNS, createStreetCentroidIndexes, createStreetCentroidTable, } from "#street/centroid/schema";
33
34
  export type { StreetCentroidDatabase, StreetCentroidTable } from "#street/centroid/schema";
34
- export { StreetCentroidSqliteLookup } from "#street/centroid/index";
35
+ export { StreetCentroidSqliteLookup } from "#street/centroid";
35
36
  export { StreetInterpolator, type InterpolatedHit, type InterpolationMethod, type InterpolationQuery, } from "#interpolation";
36
37
  export { deriveSchemaName, pickExtractForPlacetype, resolveExtracts, type ResolvedExtract, type ExtractConfig, } from "#extracts";
37
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,YAAY,EAAE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