vehicles 0.6.1 → 0.8.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 (186) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop_todo.yml +164 -0
  3. data/CHANGELOG.md +274 -0
  4. data/README.md +55 -10
  5. data/data/PROVENANCE-vehicles.md +12 -0
  6. data/data/plates/PROVENANCE.md +5 -4
  7. data/data/plates/_decode/at-districts.yml +287 -0
  8. data/data/plates/_decode/ch-cantons.yml +110 -0
  9. data/data/plates/_decode/cn-issuing-offices.yml +463 -0
  10. data/data/plates/_decode/cn-provinces.yml +614 -0
  11. data/data/plates/_decode/cz-kraj.yml +159 -0
  12. data/data/plates/_decode/dk-serial-blocks.yml +327 -0
  13. data/data/plates/_decode/fr-departements.yml +191 -0
  14. data/data/plates/_decode/gb-age-identifiers.yml +170 -0
  15. data/data/plates/_decode/gb-memory-tags.yml +202 -0
  16. data/data/plates/_decode/gr-prefectures.yml +1408 -0
  17. data/data/plates/_decode/hr-cities.yml +315 -0
  18. data/data/plates/_decode/ie-counties.yml +227 -0
  19. data/data/plates/_decode/in-state-codes.yml +169 -0
  20. data/data/plates/_decode/is-districts-1938.yml +116 -0
  21. data/data/plates/_decode/it-provinces.yml +348 -0
  22. data/data/plates/_decode/jp-office-marks.yml +960 -0
  23. data/data/plates/_decode/jp-use-marks.yml +205 -0
  24. data/data/plates/_decode/kr-authority-marks.yml +146 -0
  25. data/data/plates/_decode/kr-use-syllables.yml +194 -0
  26. data/data/plates/_decode/lu-series-order.yml +638 -0
  27. data/data/plates/_decode/mx-entity-series.yml +380 -0
  28. data/data/plates/_decode/my-index-marks.yml +271 -0
  29. data/data/plates/_decode/no-counties-1913.yml +148 -0
  30. data/data/plates/_decode/no-districts.yml +901 -0
  31. data/data/plates/_decode/pl-powiats.yml +567 -0
  32. data/data/plates/_decode/pt-trailer-services.yml +96 -0
  33. data/data/plates/_decode/ro-counties.yml +213 -0
  34. data/data/plates/_decode/se-diplomatic.yml +220 -0
  35. data/data/plates/_decode/si-regions.yml +123 -0
  36. data/data/plates/_decode/sk-districts.yml +314 -0
  37. data/data/plates/_decode/th-registration-elements.yml +208 -0
  38. data/data/plates/_decode/ua-regions.yml +393 -0
  39. data/data/plates/_decode/za-licence-marks.yml +215 -0
  40. data/data/plates/_meta/classes.yml +1 -0
  41. data/data/plates/_meta/separators.yml +102 -0
  42. data/data/plates/ad.yml +961 -0
  43. data/data/plates/ar.yml +762 -0
  44. data/data/plates/at.yml +1424 -0
  45. data/data/plates/au-act.yml +472 -0
  46. data/data/plates/au-nsw.yml +282 -0
  47. data/data/plates/au-nt.yml +431 -0
  48. data/data/plates/au-qld.yml +272 -0
  49. data/data/plates/au-sa.yml +248 -0
  50. data/data/plates/au-tas.yml +302 -0
  51. data/data/plates/au-vic.yml +215 -0
  52. data/data/plates/au-wa.yml +309 -0
  53. data/data/plates/be.yml +1840 -0
  54. data/data/plates/br.yml +1152 -0
  55. data/data/plates/ca-ab.yml +430 -0
  56. data/data/plates/ca-bc.yml +697 -0
  57. data/data/plates/ca-mb.yml +499 -0
  58. data/data/plates/ca-nb.yml +537 -0
  59. data/data/plates/ca-nl.yml +743 -0
  60. data/data/plates/ca-ns.yml +808 -0
  61. data/data/plates/ca-nt.yml +610 -0
  62. data/data/plates/ca-nu.yml +280 -0
  63. data/data/plates/ca-on.yml +881 -0
  64. data/data/plates/ca-pe.yml +592 -0
  65. data/data/plates/ca-qc.yml +1036 -0
  66. data/data/plates/ca-sk.yml +256 -0
  67. data/data/plates/ca-yt.yml +656 -0
  68. data/data/plates/ch.yml +1273 -0
  69. data/data/plates/cn.yml +1431 -0
  70. data/data/plates/cy.yml +688 -0
  71. data/data/plates/cz.yml +1179 -0
  72. data/data/plates/de.yml +553 -118
  73. data/data/plates/dk.yml +1647 -0
  74. data/data/plates/ee.yml +1275 -0
  75. data/data/plates/es.yml +228 -32
  76. data/data/plates/fi.yml +1271 -0
  77. data/data/plates/fr.yml +1265 -0
  78. data/data/plates/gb.yml +1188 -0
  79. data/data/plates/gr.yml +721 -0
  80. data/data/plates/hr.yml +860 -0
  81. data/data/plates/hu.yml +959 -0
  82. data/data/plates/ie.yml +775 -0
  83. data/data/plates/in.yml +1172 -0
  84. data/data/plates/is.yml +667 -0
  85. data/data/plates/it.yml +1317 -0
  86. data/data/plates/jp.yml +3650 -0
  87. data/data/plates/kr.yml +1375 -0
  88. data/data/plates/li.yml +1010 -0
  89. data/data/plates/lt.yml +879 -0
  90. data/data/plates/lu.yml +842 -0
  91. data/data/plates/lv.yml +924 -0
  92. data/data/plates/mc.yml +1024 -0
  93. data/data/plates/mt.yml +854 -0
  94. data/data/plates/mx.yml +1372 -0
  95. data/data/plates/my.yml +685 -0
  96. data/data/plates/nl.yml +44 -0
  97. data/data/plates/no.yml +1018 -0
  98. data/data/plates/nz.yml +1699 -0
  99. data/data/plates/pl.yml +1296 -0
  100. data/data/plates/pt.yml +847 -0
  101. data/data/plates/ro.yml +785 -0
  102. data/data/plates/se.yml +1091 -0
  103. data/data/plates/si.yml +1105 -0
  104. data/data/plates/sk.yml +1439 -0
  105. data/data/plates/sm.yml +1119 -0
  106. data/data/plates/th.yml +1150 -0
  107. data/data/plates/ua.yml +1672 -0
  108. data/data/plates/us-ak.yml +763 -0
  109. data/data/plates/us-al.yml +457 -0
  110. data/data/plates/us-ar.yml +427 -0
  111. data/data/plates/us-as.yml +454 -0
  112. data/data/plates/us-az.yml +430 -0
  113. data/data/plates/us-ca.yml +892 -0
  114. data/data/plates/us-co.yml +452 -0
  115. data/data/plates/us-ct.yml +427 -0
  116. data/data/plates/us-dc.yml +614 -0
  117. data/data/plates/us-de.yml +551 -0
  118. data/data/plates/us-fl.yml +319 -96
  119. data/data/plates/us-ga.yml +644 -0
  120. data/data/plates/us-gu.yml +658 -0
  121. data/data/plates/us-hi.yml +585 -0
  122. data/data/plates/us-ia.yml +438 -0
  123. data/data/plates/us-id.yml +531 -0
  124. data/data/plates/us-il.yml +516 -0
  125. data/data/plates/us-in.yml +324 -0
  126. data/data/plates/us-ks.yml +351 -0
  127. data/data/plates/us-ky.yml +770 -0
  128. data/data/plates/us-la.yml +568 -0
  129. data/data/plates/us-ma.yml +379 -0
  130. data/data/plates/us-md.yml +536 -0
  131. data/data/plates/us-me.yml +445 -0
  132. data/data/plates/us-mi.yml +408 -0
  133. data/data/plates/us-mn.yml +411 -0
  134. data/data/plates/us-mo.yml +356 -0
  135. data/data/plates/us-mp.yml +402 -0
  136. data/data/plates/us-ms.yml +432 -0
  137. data/data/plates/us-mt.yml +619 -0
  138. data/data/plates/us-nc.yml +602 -0
  139. data/data/plates/us-nd.yml +419 -0
  140. data/data/plates/us-ne.yml +483 -0
  141. data/data/plates/us-nh.yml +394 -0
  142. data/data/plates/us-nj.yml +547 -0
  143. data/data/plates/us-nm.yml +574 -0
  144. data/data/plates/us-nv.yml +655 -0
  145. data/data/plates/us-ny.yml +592 -0
  146. data/data/plates/us-oh.yml +404 -0
  147. data/data/plates/us-ok.yml +513 -0
  148. data/data/plates/us-or.yml +392 -0
  149. data/data/plates/us-pa.yml +506 -0
  150. data/data/plates/us-pr.yml +507 -0
  151. data/data/plates/us-ri.yml +445 -0
  152. data/data/plates/us-sc.yml +605 -0
  153. data/data/plates/us-sd.yml +428 -0
  154. data/data/plates/us-tn.yml +471 -0
  155. data/data/plates/us-tx.yml +535 -0
  156. data/data/plates/us-ut.yml +384 -0
  157. data/data/plates/us-va.yml +567 -0
  158. data/data/plates/us-vi.yml +489 -0
  159. data/data/plates/us-vt.yml +458 -0
  160. data/data/plates/us-wa.yml +484 -0
  161. data/data/plates/us-wi.yml +509 -0
  162. data/data/plates/us-wv.yml +446 -0
  163. data/data/plates/us-wy.yml +523 -0
  164. data/data/plates/va.yml +604 -0
  165. data/data/plates/za.yml +1141 -0
  166. data/data/vehicles.json +160653 -105090
  167. data/lib/vehicles/configuration.rb +17 -3
  168. data/lib/vehicles/dataset.rb +73 -18
  169. data/lib/vehicles/fuzzy.rb +115 -0
  170. data/lib/vehicles/http.rb +48 -0
  171. data/lib/vehicles/make.rb +36 -6
  172. data/lib/vehicles/mcp_server.rb +5 -5
  173. data/lib/vehicles/model.rb +21 -2
  174. data/lib/vehicles/plates/series.rb +172 -18
  175. data/lib/vehicles/plates/template_fill.rb +188 -0
  176. data/lib/vehicles/plates/templates.rb +162 -0
  177. data/lib/vehicles/plates.rb +12 -0
  178. data/lib/vehicles/providers/hosted_provider.rb +28 -55
  179. data/lib/vehicles/validators/vehicle_make_validator.rb +3 -1
  180. data/lib/vehicles/validators/vehicle_model_validator.rb +1 -1
  181. data/lib/vehicles/version.rb +1 -1
  182. data/lib/vehicles.rb +32 -16
  183. data/rakelib/data_refresh.rake +109 -0
  184. data/rakelib/plates_refresh.rake +29 -0
  185. data/sig/vehicles.rbs +18 -0
  186. metadata +164 -2
data/data/plates/es.yml CHANGED
@@ -1,8 +1,10 @@
1
- # plates/es.yml — Spain (PRD-PLATES gate L0 pilot).
1
+ # plates/es.yml — Spain (PRD-PLATES gate L0 pilot; PROVINCIAL-HISTORY REDATE
2
+ # PASS, 2026-08-02, to the L1 evidence standard).
2
3
  #
3
- # EVERY format, colour and letter-exclusion claim in this file comes from
4
- # Real Decreto 2822/1998 (Reglamento General de Vehículos) ANEXO XVIII, read
5
- # in BOTH texts, because they differ and the difference IS the era boundary:
4
+ # EVERY format, colour and letter-exclusion claim for the CURRENT series comes
5
+ # from Real Decreto 2822/1998 (Reglamento General de Vehículos) ANEXO XVIII,
6
+ # read in BOTH texts, because they differ and the difference IS the era
7
+ # boundary:
6
8
  #
7
9
  # * ORIGINAL text, BOE-A-1999-1826, in force 26-07-1999 — its Anexo XVIII
8
10
  # I.A.a) still describes the PROVINCIAL ordinary-car system
@@ -24,6 +26,33 @@
24
26
  # folklore-prone boundary: the instrument is dated, published and its entry
25
27
  # into force is stated by BOE itself as 17-09-2000. No averaging required.
26
28
  #
29
+ # THE PROVINCIAL HISTORY IS NOW INSTRUMENT-DATED TOO (redate pass). The
30
+ # earlier release of this file carried the INSTRUMENT WINDOW of RD 2822/1998
31
+ # (1999-2000) as the es-provincial period — an instrument date shipped as a
32
+ # series start, the exact defect the L1 period_evidence discipline exists to
33
+ # prevent, and one that produced a user-visible falsehood (a format that ran
34
+ # for three decades displayed as a two-year series). The primaries are now
35
+ # secured, all on boe.es (BOE + Gazeta facsimiles), all fetched 2026-08-02:
36
+ #
37
+ # * DECRETO 2046/1971, de 13 de agosto (BOE núm. 214, 07-09-1971,
38
+ # BOE-A-1971-1149) — rewrites Código de la Circulación arts. 230-234.
39
+ # New art. 231.I is the SUFFIX-LETTERS REFORM, verbatim: "la contraseña
40
+ # de la provincia donde se matricule el vehículo: Un número de cuatro
41
+ # cifras, que irá desde el 0000 al 9999, y una o dos letras de una serie,
42
+ # que comienza por la letra A y termina por las letras ZZ". Disposición
43
+ # final: in force "a los treinta días naturales de su publicación" =
44
+ # 7 OCTOBER 1971 — the folkloric "1971"/"October 1971" start, now dated
45
+ # to the day by its instrument. (Corrección de errores, BOE-A-1971-1472,
46
+ # checked: it does not touch the plate articles.)
47
+ # * The NUMERIC-ONLY provincial era behind it: RD 17-09-1900 (Gaceta 263,
48
+ # 20-09-1900) creates per-province registration; RO 24-05-1907 (Gaceta
49
+ # 160, 09-06-1907) prescribes the first plate FORMAT (contraseña + guión
50
+ # + number, black on white); re-enacted by the Reglamentos of 23-07-1918
51
+ # and 15-06-1926 and by the Código de la Circulación arts. 230-233
52
+ # (Decreto 25-09-1934, in force 01-11-1934 per BOE-A-1934-9025); closed
53
+ # by Decreto 2046/1971 (disposición transitoria primera keeps the old
54
+ # plates valid indefinitely).
55
+ #
27
56
  # COLOUR POLICY: Anexo XVIII Cuadro 3 specifies, per colour, a FOUR-CORNER
28
57
  # CIE chromaticity box plus a MINIMUM luminance factor. That constrains a
29
58
  # GAMUT, not a value — so no single hex is a sourced claim. Each design below
@@ -76,6 +105,7 @@ series:
76
105
  categories: [car, van, truck, bus, motorcycle]
77
106
  period: { start: 2000 } # Orden de 15-09-2000, in force 17-09-2000
78
107
  period_evidence: instrument-in-force
108
+ matching: strict
79
109
  format:
80
110
  pattern: "9999 LLL"
81
111
  regex: '\A\d{4} [A-Z]{3}\z'
@@ -154,33 +184,64 @@ series:
154
184
  flag and the E sign "no será necesario que lleven en su parte posterior el
155
185
  signo distintivo de la nacionalidad española previsto en la señal V-7".
156
186
  DIMENSION CORRECTION worth recording: the statute says 520 x 110 mm, not the
157
- 500 x 110 that circulates in secondary sources.
187
+ 500 x 110 that circulates in secondary sources. START-DATE FOLKLORE FLAG
188
+ (redate pass): the legal start is 17-09-2000 (disposición final única:
189
+ "el día siguiente al de su publicación", BOE 223 of 16-09-2000; BOE Análisis
190
+ concurs) — a SUNDAY. The widely repeated "18 September 2000" is the first
191
+ working day, an issuance-practice date; both are true statements about
192
+ different things, and the instrument date is the one recorded here.
158
193
 
159
194
  # =========================================================================
160
- # THE PRE-2000 PROVINCIAL SERIES.
195
+ # THE 1971-2000 PROVINCIAL SUFFIX-LETTERS SERIES (redated; was 1999-2000).
161
196
  # =========================================================================
162
197
  - id: es-provincial
163
198
  class: standard
164
199
  categories: [car, van, truck, bus, motorcycle]
165
- period: { start: 1999, end: 2000 }
166
- period_evidence: instrument-window
200
+ period: { start: 1971, end: 2000 }
201
+ period_evidence: instrument-dated-both-ends
202
+ matching: strict
167
203
  format:
168
204
  pattern: "LL-9999-LL"
169
205
  regex: '\A[A-Z]{1,2}-\d{4}-[A-Z]{1,2}\z'
170
- regex_strict: '\A(?:AB|AL|AV|BA|BI|BU|CA|CC|CE|CO|CR|CS|CU|GC|GI|GR|GU|HU|IB|LE|LO|LU|MA|ML|MU|NA|OU|PO|SA|SE|SG|SO|SS|TE|TF|TO|VA|VI|ZA|A|B|C|H|J|L|M|O|P|S|T|V|Z)-\d{4}-[A-Z]{1,2}\z'
206
+ regex_strict: '\A(?:AB|AL|AV|BA|BI|BU|CA|CC|CE|CO|CR|CS|CU|GC|GE|GI|GR|GU|HU|IB|LE|LO|LU|MA|ML|MU|NA|OR|OU|PM|PO|SA|SE|SG|SH|SO|SS|TE|TF|TO|VA|VI|ZA|A|B|C|H|J|L|M|O|P|S|T|V|Z)-\d{4}-[A-Z]{1,2}\z'
171
207
  charset:
172
208
  notes: >-
173
- Anexo XVIII I.A.a) as ORIGINALLY enacted, verbatim: "tres grupos de
174
- caracteres, constituidos por la contraseña de la provincia donde se
175
- matricula el vehículo; un número de cuatro cifras, que irá desde el 0000 al
176
- 9999, y una o dos letras de una serie, que comienza por la letra A y
177
- termina por las letras ZZ, sin emplearse aquellas letras del alfabeto que
178
- puedan dar lugar a confusión." Note the trailing letter group here starts at
179
- A (not BBB) and is ONE OR TWO letters, and that the excluded letters are
180
- NOT enumerated in this text — hence regex_strict keeps [A-Z]{1,2} for that
181
- group and constrains only the province contraseña, which IS enumerated
182
- (Anexo XVIII II.A, 52 codes).
183
- separator_note: "Anexo XVIII prescribes three groups and their mm spacing (Cuadro 1 rows 'ordinaria ... con siglas de provincia'), not a separator glyph; the hyphen is the conventional printed rendering."
209
+ TWO ENUMERATING INSTRUMENTS, three decades apart, SAME WORDING. Código de
210
+ la Circulación art. 231.I as rewritten by Decreto 2046/1971 (in force
211
+ 07-10-1971), verbatim: "la contraseña de la provincia donde se matricule
212
+ el vehículo: Un número de cuatro cifras, que irá desde el 0000 al 9999, y
213
+ una o dos letras de una serie, que comienza por la letra A y termina por
214
+ las letras ZZ, sin emplearse aquellas letras del alfabeto que puedan dar
215
+ lugar a confusión." Anexo XVIII I.A.a) of RD 2822/1998 as ORIGINALLY
216
+ enacted re-states it near-verbatim. Note the trailing letter group starts
217
+ at A (not BBB) and is ONE OR TWO letters, and that the excluded letters
218
+ are NOT enumerated in either text — hence regex_strict keeps [A-Z]{1,2}
219
+ for that group and constrains only the province contraseña, which IS
220
+ enumerated twice: art. 233 as rewritten 1971 (includes GE Gerona, OR
221
+ Orense, PM Baleares, SH Sahara) and Anexo XVIII II.A 1998 (52 codes;
222
+ GI, OU, IB replace GE, OR, PM after the province renames; no SH).
223
+ regex_strict is the UNION of both lists — 56 codes — because plates under
224
+ every one of them were lawfully issued inside this period. The SH reading
225
+ comes from a degraded facsimile ("Sahara ... SH" in the BOE scan) and is
226
+ flagged for the verifier.
227
+ progression: >-
228
+ Within a province the four digits cycle 0000-9999, then the trailing letter
229
+ group advances one step in a series the statute itself orders: "comienza
230
+ por la letra A y termina por las letras ZZ" — SINGLE letters first (M-1234-A),
231
+ TWO letters after Z was exhausted (M-1234-AB), which is why the suffix
232
+ count is an intra-series progression and not a separate series. Each
233
+ province advanced at its own registration rate, so the same suffix letter
234
+ maps to different years in different provinces — suffix decoding is
235
+ per-province or nothing. The Orden of 15-09-2000's preamble confirms the
236
+ exhaustion dynamic: the system "está próximo a agotarse en las provincias
237
+ de Madrid y Barcelona".
238
+ separator_note: >-
239
+ The GUIÓN IS STATUTORY in this era: the dimensions table of art. 232 as
240
+ rewritten by Decreto 2046/1971 carries an explicit "Longitud del guión"
241
+ row (as did its 1907, 1918, 1926 and 1934 predecessors for the numeric
242
+ era). The 1999 Anexo XVIII re-enactment prescribes group spacing in mm
243
+ without naming the glyph; the hyphen in the pattern is the statutory
244
+ printed separator, not a convention.
184
245
  design:
185
246
  plate: { w: 520, h: 110, unit: mm, reflective_surface: { w: 510, h: 100 } }
186
247
  plate_variants:
@@ -200,22 +261,135 @@ series:
200
261
  consolidated Cuadro 1 still carries four "con siglas de provincia" rows
201
262
  today, footnoted "Placas de matrícula con arreglo a lo establecido en las
202
263
  disposiciones transitorias de la Orden de 15 de septiembre de 2000".
264
+ design_history: >-
265
+ The dimensions above are the 1999 Cuadro 1 values, which govern the era's
266
+ tail and every replacement plate made since. For 1971-1999 the governing
267
+ text was the Código de la Circulación as rewritten by Decreto 2046/1971:
268
+ art. 230.II, verbatim, "El fondo de las placas será reflectante, de color
269
+ blanco para los automóviles y rojo para los remolques y semirremolques.
270
+ Las letras y números serán de color negro mate" — so white REFLECTIVE
271
+ ground with black matte characters is a 1971 statutory fact, not a
272
+ 1980s-retrofit folklore date. Art. 232's table gives the era's placa larga
273
+ as 490 x 100 mm (not 520 x 110, which arrived with RD 2822/1998); the
274
+ 490 x 100 reading is from the BOE facsimile's partially degraded table and
275
+ is flagged for the verifier.
203
276
  region_encoding: "plates/_decode/es-provinces.yml"
204
277
  sources:
205
- - "https://www.boe.es/buscar/doc.php?id=BOE-A-1999-1826 # ORIGINAL RD 2822/1998 text, Anexo XVIII I.A.a): province contraseña + 4 digits + 1-2 letters (A..ZZ); BOE Análisis block: 'Fecha de entrada en vigor: 26/07/1999'"
206
- - "https://www.boe.es/buscar/doc.php?id=BOE-A-2000-16805 # the Orden that replaced it, in force 17-09-2000, plus both disposiciones transitorias (voluntary re-plating; mandatory new dimensions on replacement)"
207
- - "https://www.boe.es/buscar/pdf/1999/BOE-A-1999-1826-consolidado.pdf # Anexo XVIII II.A: the 52 province contraseñas; Cuadro 1 'con siglas de provincia' rows"
278
+ - "https://www.boe.es/buscar/doc.php?id=BOE-A-1971-1149 # Decreto 2046/1971, de 13 de agosto (BOE 214, 07-09-1971): art. 231.I = the suffix-letters format verbatim; art. 230.II colours; art. 232 dimensions + guión; art. 233 the 1971 contraseña list (GE, OR, PM, SH); disposición final = in force 30 días naturales after publication -> 07-10-1971; DT 1.ª old numeric plates keep validity. Facsimile: https://www.boe.es/boe/dias/1971/09/07/pdfs/A14559-14572.pdf — accessed 2026-08-02"
279
+ - "https://www.boe.es/buscar/doc.php?id=BOE-A-1971-1472 # Corrección de errores of Decreto 2046/1971 (BOE 275, 17-11-1971) — READ AND CHECKED: fixes arts. 146/165/208-209/24x only; the plate articles stand as published. Accessed 2026-08-02"
280
+ - "https://www.boe.es/buscar/doc.php?id=BOE-A-1999-1826 # ORIGINAL RD 2822/1998 text, Anexo XVIII I.A.a): province contraseña + 4 digits + 1-2 letters (A..ZZ) re-enacted; BOE Análisis block: 'Fecha de entrada en vigor: 26/07/1999'"
281
+ - "https://www.boe.es/buscar/doc.php?id=BOE-A-2000-16805 # the Orden that ENDED new issuance in this format: disposición final única 'entrará en vigor el día siguiente al de su publicación' (BOE 223, 16-09-2000) -> in force 17-09-2000, stated by BOE's own Análisis; plus both disposiciones transitorias (voluntary re-plating; mandatory new dimensions on replacement). Accessed 2026-08-02"
282
+ - "https://www.boe.es/buscar/pdf/1999/BOE-A-1999-1826-consolidado.pdf # Anexo XVIII II.A: the 52 province contraseñas of the 1998 list; Cuadro 1 'con siglas de provincia' rows"
208
283
  notes: >-
209
- THE PROVINCIAL SYSTEM — Spain's only region-decodable series. PERIOD CAVEAT,
210
- stated plainly: start/end here record the INSTRUMENT WINDOW in which this
211
- format was the enacted ordinary-car format (RD 2822/1998 in force 26-07-1999;
212
- superseded for new registrations 17-09-2000), NOT the life of the system. The
213
- province + 4 digits + 1-2 letters shape is much older — commonly given as
214
- 1971 — but no primary for that start was secured in this pass, so it is a
215
- recorded gap rather than an invented date, and the id is deliberately
216
- `es-provincial` and not `es-provincial-1971`. Plates already issued remain
284
+ THE PROVINCIAL SUFFIX-LETTERS SYSTEM, 1971-2000 — Spain's only
285
+ region-decodable modern series, REDATED in the 2026-08-02 pass. Start:
286
+ Decreto 2046/1971 published BOE 07-09-1971, in force at 30 días naturales =
287
+ 7 OCTOBER 1971 (its own disposición final; the commonly repeated "October
288
+ 1971" is thereby confirmed and dated to the day). End for NEW registrations:
289
+ Orden de 15-09-2000, in force 17-09-2000 (disposición final única + BOE
290
+ Análisis). FOLKLORE FLAG, recorded not averaged: the enthusiast web and
291
+ Wikipedia commonly give 18 September 2000 — 17-09-2000 was a SUNDAY, so the
292
+ first national-series plates were ISSUED Monday the 18th; that is an
293
+ issuance-practice date, not the legal boundary, and the instrument date
294
+ stands. The former release of this entry carried period 1999-2000 (the RD
295
+ 2822/1998 instrument window) with the honest caveat that no 1971 primary was
296
+ secured; the primary is now secured and the period is corrected. The id
297
+ stays `es-provincial` (not `es-provincial-1971`) under the id contract
298
+ (PRD-QUALITY I-5/I-6): amend, never rename. Plates already issued remain
217
299
  valid indefinitely and are re-issued on request; RGV Art. 27.2 lets an owner
218
300
  swap a provincial plate for a national one on a change of province.
301
+ REMAINING GAPS at point of use: (1) the instruments that switched GE->GI,
302
+ OR->OU and PM->IB on plates after the 1992/1997/1998 province renames were
303
+ not chased — the 1998 Anexo XVIII list is the pinned post-rename authority;
304
+ (2) SH (Sahara) issuance necessarily ended with Spain's 1976 withdrawal, but
305
+ no instrument closing the code was located; (3) the per-province single- to
306
+ two-letter switchover dates are administrative allocation, published nowhere
307
+ located in this pass.
308
+
309
+ # =========================================================================
310
+ # THE NUMERIC-ONLY PROVINCIAL ERA, 1900-1971 (new in the redate pass).
311
+ # One recall-only series for seven decades of one continuous per-province
312
+ # numbering scheme whose surface details (code list, digit count) were
313
+ # revised by successive instruments — the era boundary INSIDE the era is
314
+ # soft, so a regex hit here is a shape claim, never a validity claim.
315
+ # =========================================================================
316
+ - id: es-provincial-numeric
317
+ class: standard
318
+ categories: [car, van, truck, bus, motorcycle]
319
+ period: { start: 1900, end: 1971 }
320
+ period_evidence: instrument-dated-both-ends
321
+ matching: recall-only
322
+ format:
323
+ pattern: "LL-999999"
324
+ regex: '\A[A-Z]{1,3}-\d{1,6}\z'
325
+ pattern_note: >-
326
+ REPRESENTATIVE ONLY, and the regex is deliberately wide — hence
327
+ recall-only. The contraseña ran ONE TO THREE letters: the 1907 list
328
+ includes three-letter codes (Albacete ALB, Cáceres CAC, Castellón CAS,
329
+ Segovia SEG, Teruel TER), trimmed in later lists. The number is the
330
+ province's permit order number with NO fixed width — it grew with the
331
+ province's registrations, from 1 digit to 6 (art. 233 of the 1934 Código
332
+ contemplates "cinco o más cifras" and Madrid exceeded 600000 before
333
+ 1971). No single regex is the grammar of any one year of this era.
334
+ progression: >-
335
+ Strictly sequential per province: the number is "el número de orden del
336
+ permiso de circulación" (1918 art. 13.d, 1926 art. 15.d, 1934 art. 232
337
+ — the 1907 text says "de la licencia"). Province + number therefore
338
+ encodes registration order within the province, which is why period
339
+ photographs can be dated by plate number against provincial totals —
340
+ an inference for the encyclopedia, not for this dataset.
341
+ separator_note: >-
342
+ The guión is statutory throughout: 1907 concl. 3.ª "separado por un
343
+ guión", and every subsequent dimensions table (1918, 1926, 1934) carries
344
+ a "Longitud del guión" row.
345
+ design:
346
+ background: { color: "#FFFFFF", finish: painted, hex_basis: observed, note: "no colour spec exists for this era beyond the words; no reflectivity requirement — reflectante arrives with Decreto 2046/1971" }
347
+ foreground: "#000000"
348
+ band: { side: none }
349
+ note: >-
350
+ BLACK ON WHITE FOR THE WHOLE ERA, by four successive instruments: 1907
351
+ concl. 3.ª "Las letras de la contraseña y el número se pintarán en negro
352
+ sobre fondo blanco"; 1918 art. 13.e) and 1926 art. 15.e) "caracteres
353
+ negros sobre fondo blanco"; 1934 art. 232 "caracteres latinos negros, de
354
+ trazo de ancho uniforme, sobre fondo blanco liso". Verified against the
355
+ primaries because mid-century dark plates are a neighbouring-country
356
+ pattern (PT, FR) that misattaches to Spain in collector folklore. The
357
+ 1934 Código also fixes character metrics (art. 233 table) and a
358
+ two-line rear layout option once the number reaches five digits
359
+ ("podrá colocarse en la placa posterior la contraseña de la provincia
360
+ centrada y encima del número", plate height then min 260 mm).
361
+ region_encoding: "plates/_decode/es-provinces.yml"
362
+ region_encoding_note: >-
363
+ PERIOD-DISCIPLINE CAVEAT: the decode table is the 1998 Anexo XVIII list.
364
+ This era's lists differ per instrument (1907, 1918, 1926, 1934 art. 232,
365
+ 1971 art. 233): three-letter codes until at latest 1926, no Gran
366
+ Canaria/Tenerife split in 1907, Sahara SH in the 1971 list. Historical
367
+ decode rows are L4 work (PRD-PLATES §7) — recorded gap.
368
+ sources:
369
+ - "https://www.boe.es/datos/pdfs/BOE/1900/263/A01141-01142.pdf # RD 17-09-1900 (Gaceta de Madrid 263, 20-09-1900, pp. 1141-1142), 'Reglamento para el servicio de coches automóviles por las carreteras': per-province authorization + 'En el Gobierno civil de cada provincia habrá un registro general de este servicio' (art. 6); vehicle inscriptions required but NO plate format prescribed. Accessed 2026-08-02"
370
+ - "https://www.boe.es/gazeta/dias/1907/06/09/pdfs/GMD-1907-160.pdf # RO 24-05-1907 (Gaceta 160, 09-06-1907): THE FIRST PLATE FORMAT — concl. 3.ª two plates, 'la contraseña de la provincia, y á continuación y separado por un guión el número de orden de la licencia', black on white; concl. 5.ª the first contraseña list (1-3 letters); concl. 6.ª dimensions. Its preamble states pre-1907 display was non-uniform ('exige uniformar el criterio'). Accessed 2026-08-02"
371
+ - "https://www.boe.es/datos/pdfs/BOE/1918/205/A00231-00237.pdf # RD 23-07-1918 (Gaceta 205, 24-07-1918), Reglamento art. 13.d)-f): same composition, revised code list, black on white. Locator page: https://www.boe.es/buscar/doc.php?id=BOE-A-1918-3950 — accessed 2026-08-02"
372
+ - "https://www.boe.es/datos/pdfs/BOE/1926/170/A01642-01654.pdf # RD 15-06-1926 (Gaceta 170, 19-06-1926), Reglamento art. 15.a)-g): two plates, contraseña + guión + permit number, black on white, revised list incl. Ceuta and Melilla. Locator: https://www.boe.es/buscar/doc.php?id=BOE-A-1926-6136 — accessed 2026-08-02"
373
+ - "https://www.boe.es/datos/pdfs/BOE/1934/269/A02634-02677.pdf # Código de la Circulación (Decreto 25-09-1934, Gaceta 269, 26-09-1934), arts. 230-233: the era's final numeric-format text, quoted in design.note above. Locator: https://www.boe.es/buscar/doc.php?id=BOE-A-1934-8197 — accessed 2026-08-02"
374
+ - "https://www.boe.es/buscar/doc.php?id=BOE-A-1934-9025 # Orden circular (Gaceta 294, 21-10-1934): the Código's entry into force is 1 November 1934. Accessed 2026-08-02"
375
+ - "https://www.boe.es/buscar/doc.php?id=BOE-A-1971-1149 # Decreto 2046/1971: ENDS the era at its own entry into force, 07-10-1971; DT 1.ª, verbatim: 'Los automóviles, remolques y semirremolques, matriculados en la fecha de entrada en vigor de este Decreto, conservarán la contraseña y número de su matrícula indefinidamente'. Accessed 2026-08-02"
376
+ notes: >-
377
+ THE NUMERIC-ONLY PROVINCIAL ERA (PP-NNNNNN), 1900-1971, modelled as ONE
378
+ recall-only series because it is one continuous per-province sequential
379
+ numbering — a vehicle registered in 1905 kept its number under every later
380
+ reglamento — while its surface rules shifted instrument by instrument.
381
+ PERIOD HONESTY, stated at point of use: 1900 dates the REGISTRATION regime
382
+ (RD 17-09-1900); the earliest plates displayed province + number
383
+ NON-UNIFORMLY, as the 1907 preamble itself testifies; the prescribed
384
+ FORMAT begins with RO 24-05-1907. A consumer needing the format-instrument
385
+ window should read 1907, and both dates are pinned above. The era closes
386
+ on 07-10-1971 (Decreto 2046/1971 in force), with old plates valid
387
+ indefinitely (DT 1.ª) — so numeric plates remained ON THE ROAD for decades
388
+ past 1971, exactly as provincial suffix plates remain today. The 1900
389
+ start also honours the lint's period rail (first national plates 1893;
390
+ Spain 1900). Entry-into-force of the 1900 Reglamento itself is not stated
391
+ in its text (no vacatio clause located) — recorded gap; its Gaceta
392
+ publication is 20-09-1900.
219
393
 
220
394
  # =========================================================================
221
395
  # ORDINARY SPECIAL SERIES — prefix letter + 4 digits + 3 letters, all from
@@ -226,6 +400,7 @@ series:
226
400
  categories: [tractor, machine]
227
401
  period: { start: 1999 }
228
402
  period_evidence: instrument-in-force
403
+ matching: strict
229
404
  format:
230
405
  pattern: "E9999LLL"
231
406
  regex: '\AE\d{4}[A-Z]{3}\z'
@@ -257,6 +432,7 @@ series:
257
432
  categories: [trailer, semitrailer]
258
433
  period: { start: 1999 }
259
434
  period_evidence: instrument-in-force
435
+ matching: strict
260
436
  format:
261
437
  pattern: "R9999LLL"
262
438
  regex: '\AR\d{4}[A-Z]{3}\z'
@@ -278,13 +454,20 @@ series:
278
454
  plate on the right bearing the towing vehicle's registration (Anexo XVIII
279
455
  III.4). Trailers and semi-trailers share one series here because Anexo XVIII
280
456
  treats them in one subparagraph with one prefix letter — contrast the
281
- Netherlands, where W and O split them.
457
+ Netherlands, where W and O split them. PREDECESSOR RECORDED AS A GAP (redate
458
+ pass): the Código as rewritten by Decreto 2046/1971 already gave trailers a
459
+ dedicated format — art. 231.II, verbatim, "la letra R, un número que irá
460
+ desde el 1 al 999.999 y la contraseña de la provincia donde se matricule el
461
+ vehículo", on a red reflective ground (art. 230.II) — i.e. R-NNNNNN-PP,
462
+ 1971-1999. Not authored as a series in this pass (historical depth is L4);
463
+ pinned here so the id can be cut later without disturbing this one.
282
464
 
283
465
  - id: es-moped-1999
284
466
  class: moped
285
467
  categories: [moped, quadricycle]
286
468
  period: { start: 1999 }
287
469
  period_evidence: instrument-in-force
470
+ matching: strict
288
471
  format:
289
472
  pattern: "C9999LLL"
290
473
  regex: '\AC\d{4}[A-Z]{3}\z'
@@ -321,6 +504,7 @@ series:
321
504
  categories: [car, van, truck, bus, motorcycle, moped]
322
505
  period: { start: 1999 }
323
506
  period_evidence: instrument-in-force
507
+ matching: strict
324
508
  format:
325
509
  pattern: "H9999LLL"
326
510
  regex: '\AH\d{4}[A-Z]{3}\z'
@@ -351,6 +535,7 @@ series:
351
535
  categories: [car, van, motorcycle]
352
536
  period: { start: 1999 }
353
537
  period_evidence: instrument-in-force
538
+ matching: strict
354
539
  format:
355
540
  pattern: "T9999LLL"
356
541
  regex: '\AT\d{4}[A-Z]{3}\z'
@@ -390,6 +575,7 @@ series:
390
575
  categories: [car, van, truck, bus, motorcycle, moped, trailer, semitrailer]
391
576
  period: { start: 1999 }
392
577
  period_evidence: instrument-in-force
578
+ matching: strict
393
579
  format:
394
580
  pattern: "P9999LLL"
395
581
  regex: '\AP\d{4}[A-Z]{3}\z'
@@ -420,6 +606,7 @@ series:
420
606
  categories: [car, van, truck, bus, motorcycle, moped, trailer, semitrailer]
421
607
  period: { start: 1999 }
422
608
  period_evidence: instrument-in-force
609
+ matching: strict
423
610
  format:
424
611
  pattern: "S9999LLL"
425
612
  regex: '\AS\d{4}[A-Z]{3}\z'
@@ -456,6 +643,7 @@ series:
456
643
  categories: [car, van, truck, bus, motorcycle, moped, trailer, semitrailer]
457
644
  period: { start: 1999 }
458
645
  period_evidence: instrument-in-force
646
+ matching: strict
459
647
  format:
460
648
  pattern: "V9999LLL"
461
649
  regex: '\AV\d{4}[A-Z]{3}\z'
@@ -490,6 +678,7 @@ series:
490
678
  categories: [car, van, motorcycle]
491
679
  period: { start: 1999 }
492
680
  period_evidence: instrument-in-force
681
+ matching: strict
493
682
  format:
494
683
  pattern: "CD-999-999"
495
684
  regex: '\ACD[- ]\d+[- ]\d+\z'
@@ -525,6 +714,7 @@ series:
525
714
  categories: [car, van, motorcycle]
526
715
  period: { start: 1999 }
527
716
  period_evidence: instrument-in-force
717
+ matching: strict
528
718
  format:
529
719
  pattern: "OI-999-999"
530
720
  regex: '\AOI[- ]\d+[- ]\d+\z'
@@ -551,6 +741,7 @@ series:
551
741
  categories: [car, van, motorcycle]
552
742
  period: { start: 1999 }
553
743
  period_evidence: instrument-in-force
744
+ matching: strict
554
745
  format:
555
746
  pattern: "CC-999-999"
556
747
  regex: '\ACC[- ]\d+[- ]\d+\z'
@@ -577,6 +768,7 @@ series:
577
768
  categories: [car, van, motorcycle]
578
769
  period: { start: 1999 }
579
770
  period_evidence: instrument-in-force
771
+ matching: strict
580
772
  format:
581
773
  pattern: "TA-999-999"
582
774
  regex: '\ATA[- ]\d+[- ]\d+\z'
@@ -603,6 +795,7 @@ series:
603
795
  categories: [car, van, truck, bus, motorcycle, trailer]
604
796
  period: { start: 1999 }
605
797
  period_evidence: instrument-in-force
798
+ matching: strict
606
799
  format:
607
800
  pattern: "ET-999999"
608
801
  regex: '\A(?:ET|FN|EA)[- ]\d+(?:-VE)?\z'
@@ -630,6 +823,7 @@ series:
630
823
  categories: [car, van, truck, bus]
631
824
  period: { start: 1999 }
632
825
  period_evidence: instrument-in-force
826
+ matching: strict
633
827
  format:
634
828
  pattern: "FAE-999999"
635
829
  regex: '\AFAE[- ]\d+(?:-VE)?\z'
@@ -650,6 +844,7 @@ series:
650
844
  categories: [car, van, truck, bus]
651
845
  period: { start: 1999 }
652
846
  period_evidence: instrument-in-force
847
+ matching: strict
653
848
  format:
654
849
  pattern: "PME-999999"
655
850
  regex: '\A(?:PME|MF|MMA)[- ]\d+(?:-VE)?\z'
@@ -673,6 +868,7 @@ series:
673
868
  categories: [car, van, truck, motorcycle]
674
869
  period: { start: 1999 }
675
870
  period_evidence: instrument-in-force
871
+ matching: strict
676
872
  format:
677
873
  pattern: "CNP-999999"
678
874
  regex: '\A(?:CNP|PGC)[- ]\d+(?:-VE)?\z'