From f130578836b5f7b5b92094271a74234d2bb68482 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 11 Jan 2022 17:51:07 +0100 Subject: [PATCH 1/4] Add ability to mark constructions as garden buildings --- migrations/023.garden_buildings.down.sql | 2 ++ migrations/023.garden_buildings.up.sql | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 migrations/023.garden_buildings.down.sql create mode 100644 migrations/023.garden_buildings.up.sql diff --git a/migrations/023.garden_buildings.down.sql b/migrations/023.garden_buildings.down.sql new file mode 100644 index 00000000..8e23b73d --- /dev/null +++ b/migrations/023.garden_buildings.down.sql @@ -0,0 +1,2 @@ +DELETE FROM reference_tables.landuse_classifications WHERE landuse_id = 'U071X'; +DELETE FROM reference_tables.buildings_landuse_group WHERE landuse_id = 'U071X'; diff --git a/migrations/023.garden_buildings.up.sql b/migrations/023.garden_buildings.up.sql new file mode 100644 index 00000000..bb340fb7 --- /dev/null +++ b/migrations/023.garden_buildings.up.sql @@ -0,0 +1,14 @@ +-- equivalent to 015 migration +INSERT INTO reference_tables.landuse_classifications +(landuse_id, description, level, parent_id, is_used) +VALUES +-- group +('U071X','Garden buildings','group','U070',True); + + +-- equivalent to 016 migration +INSERT INTO reference_tables.buildings_landuse_group +(landuse_id, description, parent_order_id) +VALUES +-- group +('U071X','Garden buildings','U070'); From 1bf1edd2ae612413d44b8f6678f6ac11dd8f2c45 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Tue, 11 Jan 2022 17:51:07 +0100 Subject: [PATCH 2/4] Add ability to mark buildings as unknown Also, make residential a bit stronger. --- app/map_styles/polygon.xml | 6 +++- .../frontend/config/category-maps-config.ts | 5 ++-- migrations/024.unknown_buildings.down.sql | 4 +++ migrations/024.unknown_buildings.up.sql | 30 +++++++++++++++++++ 4 files changed, 42 insertions(+), 3 deletions(-) create mode 100644 migrations/024.unknown_buildings.down.sql create mode 100644 migrations/024.unknown_buildings.up.sql diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index c89b49c2..e881b428 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -517,6 +517,10 @@ [current_landuse_order] = "Minerals" + + [current_landuse_order] = "Unknown buildings" + + [current_landuse_order] = "Recreation And Leisure" @@ -531,7 +535,7 @@ [current_landuse_order] = "Residential" - + [current_landuse_order] = "Community Services" diff --git a/app/src/frontend/config/category-maps-config.ts b/app/src/frontend/config/category-maps-config.ts index 51149177..c32673a1 100644 --- a/app/src/frontend/config/category-maps-config.ts +++ b/app/src/frontend/config/category-maps-config.ts @@ -193,7 +193,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} = elements: [ { color: '#e5050d', text: 'Mixed Use' }, { subtitle: 'Single use:'}, - { color: '#4a54a6', text: 'Residential' }, + { color: '#252aa6', text: 'Residential' }, { color: '#ff8c00', text: 'Retail' }, { color: '#f5f58f', text: 'Industry & Business' }, { color: '#73ccd1', text: 'Community Services' }, @@ -203,7 +203,8 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} = { color: '#898944', text: 'Defence' }, { color: '#fa667d', text: 'Agriculture' }, { color: '#53f5dd', text: 'Minerals' }, - { color: '#ffffff', text: 'Vacant & Derelict' } + { color: '#ffffff', text: 'Vacant & Derelict' }, + { color: '#6c6f8e', text: 'Unknown buildings' } ] }, }], diff --git a/migrations/024.unknown_buildings.down.sql b/migrations/024.unknown_buildings.down.sql new file mode 100644 index 00000000..482b95e5 --- /dev/null +++ b/migrations/024.unknown_buildings.down.sql @@ -0,0 +1,4 @@ +DELETE FROM reference_tables.landuse_classifications WHERE landuse_id = 'U14X'; +DELETE FROM reference_tables.buildings_landuse_order WHERE landuse_id = 'U14X'; +DELETE FROM reference_tables.landuse_classifications WHERE landuse_id = 'U072X'; +DELETE FROM reference_tables.buildings_landuse_group WHERE landuse_id = 'U072X'; diff --git a/migrations/024.unknown_buildings.up.sql b/migrations/024.unknown_buildings.up.sql new file mode 100644 index 00000000..6d97a49a --- /dev/null +++ b/migrations/024.unknown_buildings.up.sql @@ -0,0 +1,30 @@ +-- equivalent to 015 migration +INSERT INTO reference_tables.landuse_classifications +(landuse_id, description, level, parent_id, is_used) +VALUES +-- order +('U14X','Unknown buildings','order',NULL,True); + + +-- equivalent to 016 migration +INSERT INTO reference_tables.buildings_landuse_order +(landuse_id, description) +VALUES +-- order +('U14X','Unknown buildings'); + + +-- equivalent to 015 migration +INSERT INTO reference_tables.landuse_classifications +(landuse_id, description, level, parent_id, is_used) +VALUES +-- group +('U072X','Unknown, likely residential','group','U14X',True); + + +-- equivalent to 016 migration +INSERT INTO reference_tables.buildings_landuse_group +(landuse_id, description, parent_order_id) +VALUES +-- group +('U072X','Unknown, likely residential','U14X'); \ No newline at end of file From f97fba7f3d6ee3b009d1ee176dacc3172226a16a Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Sat, 15 Jan 2022 13:53:32 +0100 Subject: [PATCH 3/4] Better name for buildings without marked state --- ...dings.down.sql => 024.unclassified_buildings.down.sql} | 0 ...buildings.up.sql => 024.unclassified_buildings.up.sql} | 8 ++++---- 2 files changed, 4 insertions(+), 4 deletions(-) rename migrations/{024.unknown_buildings.down.sql => 024.unclassified_buildings.down.sql} (100%) rename migrations/{024.unknown_buildings.up.sql => 024.unclassified_buildings.up.sql} (73%) diff --git a/migrations/024.unknown_buildings.down.sql b/migrations/024.unclassified_buildings.down.sql similarity index 100% rename from migrations/024.unknown_buildings.down.sql rename to migrations/024.unclassified_buildings.down.sql diff --git a/migrations/024.unknown_buildings.up.sql b/migrations/024.unclassified_buildings.up.sql similarity index 73% rename from migrations/024.unknown_buildings.up.sql rename to migrations/024.unclassified_buildings.up.sql index 6d97a49a..f2c45a36 100644 --- a/migrations/024.unknown_buildings.up.sql +++ b/migrations/024.unclassified_buildings.up.sql @@ -3,7 +3,7 @@ INSERT INTO reference_tables.landuse_classifications (landuse_id, description, level, parent_id, is_used) VALUES -- order -('U14X','Unknown buildings','order',NULL,True); +('U14X','Unclassified buildings','order',NULL,True); -- equivalent to 016 migration @@ -11,7 +11,7 @@ INSERT INTO reference_tables.buildings_landuse_order (landuse_id, description) VALUES -- order -('U14X','Unknown buildings'); +('U14X','Unclassified buildings'); -- equivalent to 015 migration @@ -19,7 +19,7 @@ INSERT INTO reference_tables.landuse_classifications (landuse_id, description, level, parent_id, is_used) VALUES -- group -('U072X','Unknown, likely residential','group','U14X',True); +('U072X','Unclassified, likely residential','group','U14X',True); -- equivalent to 016 migration @@ -27,4 +27,4 @@ INSERT INTO reference_tables.buildings_landuse_group (landuse_id, description, parent_order_id) VALUES -- group -('U072X','Unknown, likely residential','U14X'); \ No newline at end of file +('U072X','Unclassified, likely residential','U14X'); From c30c3b6e1cc2959d7fddba319fe98971b58cbf10 Mon Sep 17 00:00:00 2001 From: Mateusz Konieczny Date: Mon, 17 Jan 2022 19:03:22 +0100 Subject: [PATCH 4/4] Finish rename --- app/map_styles/polygon.xml | 2 +- app/src/frontend/config/category-maps-config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index e881b428..92ff1a6f 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -518,7 +518,7 @@ - [current_landuse_order] = "Unknown buildings" + [current_landuse_order] = "Unclassified buildings" diff --git a/app/src/frontend/config/category-maps-config.ts b/app/src/frontend/config/category-maps-config.ts index c32673a1..9bc12599 100644 --- a/app/src/frontend/config/category-maps-config.ts +++ b/app/src/frontend/config/category-maps-config.ts @@ -204,7 +204,7 @@ export const categoryMapsConfig: {[key in Category]: CategoryMapDefinition[]} = { color: '#fa667d', text: 'Agriculture' }, { color: '#53f5dd', text: 'Minerals' }, { color: '#ffffff', text: 'Vacant & Derelict' }, - { color: '#6c6f8e', text: 'Unknown buildings' } + { color: '#6c6f8e', text: 'Unclassified buildings' } ] }, }],