---
id: "fr_rfn_line_code"
kind: "datatype"
status: "draft"
is_pii: false
name: "French railway line code (code ligne RFN)"
regexp: "^\\d{6}$"
categories: ["transport"]
country: ["FR"]
langs: ["common"]
quality: 90
url: "https://registry.apicrafter.io/datatype/fr_rfn_line_code"
---

# French railway line code (code ligne RFN) (`fr_rfn_line_code`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Six-digit code of a line of the French national rail network (réseau ferré national) in the datasets of SNCF Réseau: 830000 Paris-Lyon à Marseille-St-Charles, 420000 Paris-Montparnasse à Brest, 570000 Paris-Austerlitz à Bordeaux-St-Jean, 005000 Paris à Strasbourg (LGV). A position on the line is given by the code and a kilometre point. Files that store it as a number lose the leading zeros (5000).

- Parent datatype: [`id`](https://registry.apicrafter.io/datatype/id.md)
- Personal data (PII): no
- Categories: Transportation (transport)
- Countries: France (FR)
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^\d{6}$
```

## Examples

- `830000` — Ligne de Paris-Lyon à Marseille-St-Charles
- `420000` — Ligne de Paris-Montparnasse à Brest
- `005000` — Ligne de Paris à Strasbourg (LGV)
- `87543207` (invalid example) — A UIC station code (uiccode)

## Metacrafter rules

1 rules: 1 match the field name, 0 match values.

- `frrfnlinecodebyname` (field, `fr/fr_transport.yaml`)

## Supported by tools

- [`metacrafter`](https://registry.apicrafter.io/tool/metacrafter.md)

## Translations

- fr: Code ligne du réseau ferré national

## Sources

- doc: <https://ressources.data.sncf.com/explore/dataset/lignes-par-statut/>

## Quality

Score 90/100. Missing: mapping (Wikidata, Schema.org, ...).

JSON: <https://registry.apicrafter.io/api/v1/datatypes/fr_rfn_line_code.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/FR/transport/fr_rfn_line_code.yaml>
