Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Nature and grid build database

This database is a demo how to use the common modules and generate the Nature and Grid related dbdata files.
This database is a demo how to use the common modules and load the Nature and Grid related dbdata files.


## Commands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Product specific database build settings.
#

$product = :"build-nature-and-grid" # The product these settings are for.
$product = :"example" # The product these settings are for.

#-------------------------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

cluster_tables

run_sql "load_dataset_24.sql"
run_sql "build_and_store.sql"
run_sql "load_dataset_25.sql"

synchronize_serials

Expand Down
11 changes: 11 additions & 0 deletions source/database/example/src/data/sql/load_dataset_25.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--
-- Nature
--
{import_common_into_schema 'database-modules/nature_areas/dataset_25.sql', 'nature'}
{import_common_into_schema 'database-modules/nature_habitats_and_species/supplied_25.sql', 'nature'}

--
-- Grid
--
{import_common_into_schema 'database-modules/grid/dataset_25.sql', 'grid'}
{import_common_into_schema 'database-modules/grid_receptors_to/single-zoom-level/dataset_25.sql', 'grid'}
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,14 @@ CREATE EXTENSION postgis;
--
CREATE SCHEMA nature;

-- Habitats and species
{import_common_into_schema 'database-modules/nature_areas/', 'nature'}
{import_common_into_schema 'database-modules/nature_habitats_and_species/', 'nature'}
{import_common_into_schema 'database-modules/build_nature/', 'nature'}


--
-- Grid
--
CREATE SCHEMA grid;

-- Receptors and hexagons
{import_common_into_schema 'database-modules/grid/', 'grid'}
{import_common_into_schema 'database-modules/build_grid/', 'grid'}

-- Receptors-to lookup tables
{import_common_into_schema 'database-modules/grid_receptors_to/single-zoom-level.sql', 'grid'}
{import_common_into_schema 'database-modules/build_grid_receptors_to/', 'grid'}

-- Update the default RESULT_ZOOM_LEVELS value if desired
-- Now set to 3 so the demo builds a bit faster than building the zoom-level 1 grid (the default value)
UPDATE system.constants SET value = 3 WHERE key = 'RESULT_ZOOM_LEVELS';