项目作者: MashSoftware

项目描述 :
Mash Place API
高级语言: Python
项目地址: git://github.com/MashSoftware/place-api.git
创建时间: 2016-07-06T09:28:10Z
项目社区:https://github.com/MashSoftware/place-api

开源协议:MIT License

下载


Mash Place API

Build Status
Requirements Status

Getting Started

  1. git clone git@github.com:MashSoftware/place-api.git
  2. cd place-api
  3. vagrant up

Post-Installation

  1. vagrant ssh
  2. cd /vagrant
  3. export FLASK_APP=mash_place_api/__init__.py
  4. export FLASK_DEBUG=1
  5. sudo su - postgres
  6. createuser -d -E -i -l -P -r -s vagrant

Enter password ‘vagrant’

  1. exit
  2. createdb
  3. psql -c "CREATE EXTENSION postgis;"

Loading Data

Copy Shapefiles into the /data directory and then:

  1. vagrant ssh
  2. cd /vagrant
  3. ./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.

Running

  1. python3 -m flask run --host=0.0.0.0

Go to http://localhost:5000/

Specification

This API is defined using OpenAPI Specification 2.0 compliant swagger.json code.

What’s available?

Currently available boundary data is listed here: https://mash-place-api.herokuapp.com/boundaries/

Mash Place UI

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