git clone git@github.com:MashSoftware/place-api.git
cd place-api
vagrant up
vagrant ssh
cd /vagrant
export FLASK_APP=mash_place_api/__init__.py
export FLASK_DEBUG=1
sudo su - postgres
createuser -d -E -i -l -P -r -s vagrant
Enter password 'vagrant'
exit
createdb
psql -c "CREATE EXTENSION postgis;"
Copy Shapefiles into the /data
directory and then:
vagrant ssh
cd /vagrant
./script/load.sh
Tables will be created with the name of the shapefile input file. Geometries will be reprojected from the OSGB 1936 / British National Grid (BNG) coordinate reference system (SRID/EPSG: 27700) to WGS84 (SRID/EPSG: 4326), for greater compatibility with GIS products and web mapping libraries. Source data can be obtained from Ordnance Survey OpenData products.
python3 -m flask run --host=0.0.0.0
Go to http://localhost:5000/
This API is defined using OpenAPI Specification 2.0 compliant swagger.json
code.
Currently available boundary data is listed here: https://mash-place-api.herokuapp.com/boundaries/
There is an optional user interface available that consumes this API to help with discovering and visualising the data and also as an example of using web mapping tools: https://github.com/MashSoftware/place-ui