Loads the **Road Network File** (92-500-X) into the cached NAR database as its own tables, `RnfSegments` and `RnfStreets`. Nothing in `Addresses` is touched. Once imported, `"rnf"` becomes available as a [geocode()] tier, which places a civic number on the street segment whose address range contains it.
Arguments
- version
NAR version whose database receives the tables, passed to [nar_connection()]. Default `"latest"`.
- release
Two-digit RNF release year, e.g. `"25"`. Default `"latest"`, which asks the server which releases exist.
- refresh
Logical. Re-import even when the tables are already present.
- shp
Path to an already-extracted `lrnf000r<YY>a_e.shp`. Defaults to `getOption("rnf_shp")`, and downloading the release when that is unset.
What is imported
**Named segments that carry an address range**, 1.4M of the file's 2.25M. The rest is kept only as counts in `nar_metadata`: an unnamed segment cannot be reached by an address query, and a named one with no range carries nothing to interpolate along. Range presence is very uneven by province – 89.2 Saskatchewan's – so this is where the tier's coverage is decided, and it is decided by the file rather than by anything here.
Why a separate table
The same reasoning as [rqa_import()]. RNF is a different product with a different geometry – centrelines, not points – and folding its ranges into `Addresses` would fabricate address records StatCan never published. Kept apart, the file also stays *measurable* against NAR, which is the only reason anything is known about how good its ranges are.
`nar_schema_version()` is deliberately not bumped. The tables are optional and additive, and a bump would force every user to re-download NAR.
Accuracy
Measured against 200,000 NAR building points, and recorded in full in `system.file("notes", "road-network-file.md", package = "cangeocode")`. The short form: interpolation along the segment, with a 5 setback from each end and a 13 m offset to the correct side, lands a median 24.3 m and a 90th percentile 93.3 m from NAR's own building point. That is about six times worse than `nar_interpolate`, which is why the tier belongs below it, and about as good as the online geolocator at the median with a shorter tail.
Examples
if (FALSE) { # \dontrun{
rnf_import()
con <- nar_connection()
geocode("1234 Rue Untel, Saguenay QC",
method = c("nar", "nar_interpolate", "rnf"), con = con)
} # }
