Skip to content

Commit

Permalink
Update docs with new PIP details
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtaylor committed Aug 11, 2022
1 parent 01ec934 commit 1d7a015
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ It should be rerun whenever there's a new release of the Postcode Directory, whi

It needs a directory containing [`whosonfirst-data-postalcode-gb`](https://github.com/whosonfirst-data/whosonfirst-data-postalcode-gb), and the most recent ONS Postcode Directory as a single CSV file.

It also needs a running [PIP server](https://github.com/whosonfirst/go-whosonfirst-pip-v2) containing the UK admin data, for building the Who’s on First hierarchy from coordinates provided in the ONS data. It defaults to finding this at `http://localhost:8080`, but can be set with a flag.
It also needs a running [PIP HTTP server](https://github.com/whosonfirst/go-whosonfirst-spatial-www) containing the UK admin data, for building the Who’s on First hierarchy from coordinates provided in the ONS data. It defaults to finding this at `http://localhost:8080/api/point-in-polygon`, but can be set with a flag.

It will ignore the coordinates from Northern Irish postcodes (starting with BT) as these are under more restrictive licensing conditions than the rest of the UK, so aren't suitable for inclusion in Who’s on First. It will use the inception/cessation data, however.

Expand Down Expand Up @@ -40,7 +40,7 @@ After executing, copy the ONS directory CSV into `/mnt/wof`. To bring up the PIP

```shell
cd /mnt/wof
./wof-pip-server whosonfirst-data-admin-gb/data/
./wof-spatial-server -spatial-database-uri 'rtree:///?strict=false' /mnt/wof/whosonfirst-data-admin-gb
```

And in another window perform the sync with something like:
Expand Down Expand Up @@ -68,5 +68,6 @@ Some tips:

- https://github.com/whosonfirst-data/whosonfirst-data-postalcode-gb
- https://github.com/whosonfirst-data/whosonfirst-data-admin-gb
- https://github.com/whosonfirst/go-whosonfirst-pip-v2
- https://github.com/whosonfirst/go-whosonfirst-spatial-www
- https://github.com/whosonfirst/go-whosonfirst-spatial-pip
- http://geoportal.statistics.gov.uk
12 changes: 8 additions & 4 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ sudo mkdir -p "$MOUNT_DIR"
sudo mount -t tmpfs -o size=90%,nr_inodes=0 wof "$MOUNT_DIR"
sudo chown $(whoami):$(whoami) "$MOUNT_DIR"

# Install Golang PPA so we have latest
sudo add-apt-repository -y ppa:longsleep/golang-backports
sudo update

# Add stuff for building, and other useful utils
sudo apt install -y build-essential git golang tmux unzip jq

Expand All @@ -24,8 +28,8 @@ DOWNLOAD_URL=$(curl -sL "https://api.github.com/repos/whosonfirst/wof-sync-os-po
curl -sL "${DOWNLOAD_URL}" -o wof-sync-os-postcodes
chmod +x wof-sync-os-postcodes

git clone https://github.com/whosonfirst/go-whosonfirst-pip-v2
cd go-whosonfirst-pip-v2
make tools
cp bin/wof-pip-server ..
git clone https://github.com/whosonfirst/go-whosonfirst-spatial-www
cd go-whosonfirst-spatial-www
make cli
cp bin/server ../wof-spatial-server
cd ..

0 comments on commit 1d7a015

Please sign in to comment.