diff options
author | Chris Mytton <chrism@mysociety.org> | 2020-03-09 20:20:35 +0000 |
---|---|---|
committer | Chris Mytton <chrism@mysociety.org> | 2020-03-12 13:23:48 +0000 |
commit | a59ffd1675bef11c98607983608e1545c6f598bf (patch) | |
tree | 69d0478873d7c87127b0476f046bbf0e19013778 /docs/customising | |
parent | 9b9313589f19e6ba6ce337964dcfae276b2ac9ca (diff) |
Add Highways England junction lookup
This is taken from the sort-my-sign repo. It allows the user to search
for motorways names and junction numbers, e.g. "M60, Junction 2", and
then geocodes that using a SQLite database created from Highways England
markerpost locations.
Diffstat (limited to 'docs/customising')
-rw-r--r-- | docs/customising/geocoder.md | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/customising/geocoder.md b/docs/customising/geocoder.md index 4dc44b507..6e5e54c4c 100644 --- a/docs/customising/geocoder.md +++ b/docs/customising/geocoder.md @@ -30,6 +30,27 @@ a specific country or city. The options vary [depending on which geocoder you use]({{ "/customising/config/#geocoding_disambiguation" | relative_url }}). +If you're running a site in the UK and want junction lookup (e.g. "M5 junction +11a") then see the [Junction lookup](#junction-lookup) section below. + ## Detailed flow: location → map pin → drop-down menu  + +## Junction lookup + +If the site is going to be run in the UK and you'd like the ability to do +junction lookups, i.e. allow the user to search for "M60, Junction 2" and have +it geocode to the correct location, then you'll need to generate a junctions +database. + +{% highlight bash %} +$ mkdir ../data +$ wget https://www.whatdotheyknow.com/request/272238/response/675823/attach/2/Gazetteer%20All%20Mposts%20only.zip +$ unzip Gazetteer\ All\ Mposts\ only.zip +$ in2csv Gazetteer_All_Mposts_only.xlsx > markerposts.csv +$ bin/make-junctions-database markerposts.csv +{% endhighlight %} + +This will create a SQLite database at `../data/roads.sqlite`. If this is present +then it will be used by the postcode search to do a junction lookup. |