diff --git a/app/map_styles/polygon.xml b/app/map_styles/polygon.xml index 652f698d..eba544a0 100644 --- a/app/map_styles/polygon.xml +++ b/app/map_styles/polygon.xml @@ -973,4 +973,143 @@ + + + diff --git a/app/src/api/services/autofill.ts b/app/src/api/services/autofill.ts index f0e1c285..32bd43f9 100644 --- a/app/src/api/services/autofill.ts +++ b/app/src/api/services/autofill.ts @@ -21,6 +21,7 @@ function getLanduseGroupOptions(value: string, all: boolean = false) { landuse_id AS id, description AS value FROM reference_tables.buildings_landuse_group + ORDER BY description ` ); } diff --git a/app/src/frontend/building/data-containers/typology.tsx b/app/src/frontend/building/data-containers/typology.tsx index 3a8e33e0..7ccc6854 100644 --- a/app/src/frontend/building/data-containers/typology.tsx +++ b/app/src/frontend/building/data-containers/typology.tsx @@ -11,6 +11,7 @@ import { CategoryViewProps } from './category-view-props'; import InfoBox from '../../components/info-box'; import { DataEntryGroup } from '../data-components/data-entry-group'; import { MultiDataEntry } from '../data-components/multi-data-entry/multi-data-entry'; +import { useDisplayPreferences } from '../../displayPreferences-context'; const AttachmentFormOptions = [ "Detached", @@ -23,9 +24,37 @@ const AttachmentFormOptions = [ * Type view/edit section */ const TypeView: React.FunctionComponent = (props) => { + const { darkLightTheme } = useDisplayPreferences(); + + const switchToClassificationMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('typology_classification') + } + const switchToStylePeriodMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('typology_style_period') + } + const switchToDynamicClassificationMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('typology_dynamic_classification') + } + const switchToAttachmentMapStyle = (e) => { + e.preventDefault(); + props.onMapColourScale('building_attachment_form') + } + return ( + {(props.mapColourScale == "typology_classification") ? + + : + + } = (props) => { } + {(props.mapColourScale == "typology_style_period") ? + + : + + } = (props) => { user_verified_as={props.user_verified.typology_style_period} verified_count={props.building.verified.typology_style_period} /> +
+ For building age by year see Age & History. +
= (props) => { }
- + + {(props.mapColourScale == "typology_dynamic_classification") ? + + : + + } = (props) => { } + {(props.mapColourScale == "building_attachment_form") ? + + : + + } https://www.smog.chalmers.se/ 'Space Matrix' for further information.", - example: "High rise: Not part of a group/cluster", + example: "8+ storeys: Detached", items: [ 'Low-rise: Not part of a group/cluster (1-3 core floors- excluding extensions)', 'Low-rise: Part of dense block/row/terrace', @@ -1498,24 +1498,20 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ category: Category.Typology, title: "Which description best suits the building's architectural style/historical period?", tooltip: "", - example: "High rise: Not part of a group/cluster", + example: "Georgian (1714-1837)", items: [ 'Roman (43AD-410)', - 'Early Medieval (410-1066)', - 'Mid- Late Medieval (1066-1485)', + 'Medieval (410-1485)', 'Tudor (1485-1603)', 'Stuart (1603 -1714)', - 'Georgian/William IV (1714-1837)', + 'Georgian (1714-1837)', 'Victorian (1837-1901)', 'Edwardian (1901-1914)', - 'World War I (1914-18)', - 'Interwar (1918-39)', - 'World War II (1939-45)', + 'WWI - WWII (1914-45)',, 'Post war (1945-1975)', 'Postmodern (1975-1990)', '1990s', - '2000s/2010s', - '2020s', + '2000s', ] }, typology_style_period_source_type: { @@ -1535,11 +1531,12 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */ category: Category.Typology, title: "Which description best suits the building's plot?", tooltip: "HINT: Based on a dynamic classification system for urban tissue developed by Brenda Case Scheer. For further information see: https://www.researchgate.net/publication/242150847_The_Anatomy_of_Sprawl.", - example: "High rise: Not part of a group/cluster", + example: "Large plots with internal roads", items: [ - 'Small fairly regular plot part of repetitive domestic streets', - 'Irregular shaped plots built along the edge of long established routes (e.g high streets)', - 'Large plot with internal access roads (e.g. infrastructure hubs/large institution such as hospitals/universities/airports)', + 'Repetitive small, domestic plots', + 'Linear non-domestic, i.e. high streets', + 'Large plots with internal roads', + 'Other' ] }, typology_dynamic_classification_source_type: { diff --git a/app/src/frontend/config/tileserver-config.ts b/app/src/frontend/config/tileserver-config.ts index 990536ef..73c2d4b7 100644 --- a/app/src/frontend/config/tileserver-config.ts +++ b/app/src/frontend/config/tileserver-config.ts @@ -24,7 +24,10 @@ export type BuildingMapTileset = 'dynamics_demolished_count' | 'disaster_severity' | 'team' | - 'survival_status'; + 'survival_status'| + 'typology_classification'| + 'typology_style_period' | + 'typology_dynamic_classification'; export type SpecialMapTileset = 'base_light' | 'base_night' | 'base_night_outlines' | 'highlight' | 'number_labels' | 'base_boroughs'; diff --git a/app/src/frontend/map/legend.css b/app/src/frontend/map/legend.css index 2b95cfbe..e412cace 100644 --- a/app/src/frontend/map/legend.css +++ b/app/src/frontend/map/legend.css @@ -57,7 +57,7 @@ padding: 0.5rem 0.25rem; margin: 0.25rem 0.5rem; width: auto; - font-size: 18px; + font-size: 17px; border: 1px solid; border-radius: 4px; } diff --git a/app/src/tiles/dataDefinition.ts b/app/src/tiles/dataDefinition.ts index b440ca5d..a10cff9f 100644 --- a/app/src/tiles/dataDefinition.ts +++ b/app/src/tiles/dataDefinition.ts @@ -281,6 +281,27 @@ const LAYER_QUERIES = { FROM buildings WHERE jsonb_array_length(demolished_buildings) > 0 OR dynamics_has_demolished_buildings = FALSE`, + typology_classification: ` + SELECT + geometry_id, + typology_classification + FROM + buildings + WHERE typology_classification IS NOT NULL`, + typology_style_period: ` + SELECT + geometry_id, + typology_style_period + FROM + buildings + WHERE typology_style_period IS NOT NULL`, + typology_dynamic_classification: ` + SELECT + geometry_id, + typology_dynamic_classification + FROM + buildings + WHERE typology_dynamic_classification IS NOT NULL`, }; const GEOMETRY_FIELD = 'geometry_geom';