Geopostcoder
Reverse-geocode lat,lng to UK postcodes, using Ordnance Survey OpenData and PostGIS
Install / Use
/learn @gavinheavyside/GeopostcoderREADME
GeoPostCoder
Loading Code-Point Open data into your database
First order and download the Code Point Open files from the Ordnance Survey and unpack them locally. You should get a Data/CSV directory containing a file for each postcode prefix. In total there were about 1.68 million rows (Q1 2013).
Create your database and install PostGIS extensions (assuming Postgres 9.1+, PostGIS 2+, and sufficient DB privileges).
$ createdb geopostcoder
$ psql -c "CREATE EXTENSION postgis" geopostcoder
Then you can load the Code-Point Open data into your db:
$ cat /cpo-download/Data/CSV/*.csv | script/load_code_point_open -d <database>
Running a local server
copy config/database.yml.example to config/database.yml, and edit it to
match your database name
Install the necessary gems by running bundle install, then start the server
with thin start.
Point your browser at http://localhost:3000, and try out reverse geocoding some latitudes and longitudes to UK postcodes.
License
GeoPostCoder is released under the MIT License.
Related Skills
node-connect
338.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
83.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
338.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
83.4kCommit, push, and open a PR
