Skip to content

Scripts to load the spatial data (shapefiles) into the Flood Map for Planning Postgresql database

License

Notifications You must be signed in to change notification settings

DEFRA/fmp-data-load

Repository files navigation

Flood Map for Planning. Spatial database load scripts

The Flood Map for Planning service asseses the flood risk of a proposed development.

This repository contains Unix scripts to load the spatial data (shapefiles) into the Flood Map for Planning Postgresql database.

Development Environment

Local Installation

Local system dependencies

Data

All spatial data for this project is available from the data.gov.uk website.

Download the data as Shapefiles and store in a data directory.

Please note that the application requires the "WIYBY" versions of floodzone 2 and 3, which have been tiled into 5km square tiles.

Environment variables

The following environment variables must be set before the scripts are run. An example file is contained in the etc directory.

FMP database host

FMP_DB_HOST

FMP database port

FMP_DB_PORT

FMP database instance

FMP_DB_NAME

FMP database schema

FMP_DB_SCHEMA

FMP database user

FMP_DB_USER

FMP database password

FMP_DB_PASSWORD

FMP source data directory

FMP_GDB_ROOT

FMP source data file name suffix (used for switching between national and non-national subsets).

FMP_GDB_POSTFIX

FMP spatial index name

FMP_GENERATE_SPATIAL_INDEX

FMP load Scripts root directory

FMP_SCRIPTS_ROOT

FMP data file version eg v201711

FMP_FILE_VERSION

Running the scripts

Open the folder for the dataset that you want to load.

Edit the ogr2ogr command to reflect the exact file name of the shapefile.

Execute the load

./load-data.sh

Contributing to this project

If you have an idea you'd like to contribute please log an issue.

All contributions should be submitted via a pull request.

License

THIS INFORMATION IS LICENSED UNDER THE CONDITIONS OF THE OPEN GOVERNMENT LICENCE found at:

http://www.nationalarchives.gov.uk/doc/open-government-licence/version/3

The following attribution statement MUST be cited in your products and applications when using this information.

Contains public sector information licensed under the Open Government license v3

About the license

The Open Government Licence (OGL) was developed by the Controller of Her Majesty's Stationery Office (HMSO) to enable information providers in the public sector to license the use and re-use of their information under a common open licence.

It is designed to encourage use and re-use of information freely and flexibly, with only a few conditions.

About

Scripts to load the spatial data (shapefiles) into the Flood Map for Planning Postgresql database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •