Skip to content

A tech demo built on top of Play Framework 2.0 that imports the CodePoint Open UK postcode dataset and offers a Geocoding RESTful API and a postcode map.

Notifications You must be signed in to change notification settings

zjinys/camelcode

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CamelCode

A tech demo built on top of Play Framework 2.0 that imports the CodePoint Open UK postcode dataset and offers a Geocoding RESTful API and a map.

Prerequisites: MongoDB and Play Framework 2.0.

Setup

Edit conf/application.conf and point it to a MongoDB installation, and execute

play run

Then put the CodePoint Open CSVs (scroll halfway down, 20mb) in the codepointopen directory.

After they are processed, they will be moved to the codepointopen/done directory.

Then visit http://localhost:9000/ and you should see the welcome screen. Visit http://localhost:9000/servermetrics for server metrics.

JSON

GET http://localhost:9000/latlng/POSTCODE to geocode a UK postcode. Response will be JSON:

{"latitude":51.505615,"longitude":-2.6120315}

Technology

License

Licensed under the WTFPL.

This data contains Ordnance Survey data © Crown copyright and database right 2011. Code-Point Open contains Royal Mail data © Royal Mail copyright and database right 2011. Code-Point Open and ONSPD contains National Statistics data © Crown copyright and database right 2011.

OS data may be used under the terms of the OS OpenData licence.

Todo

  • Fix distance calculation, Morphia does't do geoNear yet (grmbl)
  • Add add a map using Leaflet displaying all UK postcodes (need to think how to dynamically add layers depending on zoom level)

Screenshots

Welcome Page Map

About

A tech demo built on top of Play Framework 2.0 that imports the CodePoint Open UK postcode dataset and offers a Geocoding RESTful API and a postcode map.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published