Merge pull request #1220 from colouring-cities/interface/construction-updates

Interface/construction updates
This commit is contained in:
Mike Simpson 2023-08-02 15:51:38 +01:00 committed by GitHub
commit 27fd9dccd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 930 additions and 31 deletions

View File

@ -270,6 +270,14 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true,
verify: true,
},
construction_core_material_source_type: {
edit: true,
verify: true,
},
construction_core_material_source_links: {
edit: true,
verify: true,
},
construction_secondary_materials: {
edit: false,
},
@ -277,6 +285,116 @@ export const buildingAttributesConfig = valueType<DataFieldConfig>()({ /* eslint
edit: true,
verify: true,
},
construction_roof_covering_source_type: {
edit: true,
verify: true,
},
construction_roof_covering_source_links: {
edit: true,
verify: true,
},
construction_structural_system: {
edit: true,
verify: true,
},
construction_structural_system_source_type: {
edit: true,
verify: true,
},
construction_structural_system_source_links: {
edit: true,
verify: true,
},
construction_foundation: {
edit: true,
verify: true,
},
construction_foundation_source_type: {
edit: true,
verify: true,
},
construction_foundation_source_links: {
edit: true,
verify: true,
},
construction_roof_shape: {
edit: true,
verify: true,
},
construction_roof_shape_source_type: {
edit: true,
verify: true,
},
construction_roof_shape_source_links: {
edit: true,
verify: true,
},
construction_irregularities: {
edit: true,
verify: true,
},
construction_irregularities_source_type: {
edit: true,
verify: true,
},
construction_irregularities_source_links: {
edit: true,
verify: true,
},
construction_decorative_features: {
edit: true,
verify: true,
},
construction_decorative_feature_materials: {
edit: true,
verify: true,
},
construction_decorative_feature_source_type: {
edit: true,
verify: true,
},
construction_decorative_feature_source_links: {
edit: true,
verify: true,
},
construction_external_wall: {
edit: true,
verify: true,
},
construction_external_wall_source_type: {
edit: true,
verify: true,
},
construction_external_wall_source_links: {
edit: true,
verify: true,
},
construction_internal_wall: {
edit: true,
verify: true,
},
construction_internal_wall_source_type: {
edit: true,
verify: true,
},
construction_internal_wall_source_links: {
edit: true,
verify: true,
},
construction_ground_floor: {
edit: true,
verify: true,
},
construction_ground_floor_source_type: {
edit: true,
verify: true,
},
construction_ground_floor_source_links: {
edit: true,
verify: true,
},
planning_portal_link: {
edit: true,
verify: true,

View File

@ -1,6 +1,6 @@
import React, { Fragment } from 'react';
import { dataFields } from '../../config/data-fields-config';
import { commonSourceTypes, dataFields } from '../../config/data-fields-config';
import DataEntry from '../data-components/data-entry';
import SelectDataEntry from '../data-components/select-data-entry';
import withCopyEdit from '../data-container';
@ -9,6 +9,8 @@ import Verification from '../data-components/verification';
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 { LogicalDataEntry } from '../data-components/logical-data-entry/logical-data-entry';
const ConstructionMaterialsOptions = [
'Wood',
@ -21,23 +23,205 @@ const ConstructionMaterialsOptions = [
'Other Man-Made Material'
];
const RoofCoveringOptions = [
'Slate',
'Clay Tile',
'Wood',
'Asphalt',
'Iron or Steel',
'Other Metal',
'Other Natural Material',
'Other Man-Made Material'
];
/**
* Construction view/edit section
*/
const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) => {
return (
<Fragment>
<DataEntryGroup name="Structural system">
<SelectDataEntry
title={dataFields.construction_structural_system.title}
slug="construction_structural_system"
value={props.building.construction_structural_system}
tooltip={dataFields.construction_structural_system.tooltip}
options={dataFields.construction_structural_system.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_structural_system"
allow_verify={props.user !== undefined && props.building.construction_structural_system !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_structural_system")}
user_verified_as={props.user_verified.construction_structural_system}
verified_count={props.building.verified.construction_structural_system}
/>
<SelectDataEntry
title={dataFields.construction_structural_system_source_type.title}
slug="construction_structural_system_source_type"
value={props.building.construction_structural_system_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_structural_system_source_type.tooltip}
placeholder={dataFields.construction_structural_system_source_type.example}
options={dataFields.construction_structural_system_source_type.items}
/>
{(props.building.construction_structural_system_source_type == commonSourceTypes[0] ||
props.building.construction_structural_system_source_type == commonSourceTypes[1] ||
props.building.construction_structural_system_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_structural_system_source_links.title}
slug="construction_structural_system_source_links"
value={props.building.construction_structural_system_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_structural_system_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<SelectDataEntry
title={dataFields.construction_foundation.title}
slug="construction_foundation"
value={props.building.construction_foundation}
tooltip={dataFields.construction_foundation.tooltip}
options={dataFields.construction_foundation.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_foundation"
allow_verify={props.user !== undefined && props.building.construction_foundation !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_foundation")}
user_verified_as={props.user_verified.construction_foundation}
verified_count={props.building.verified.construction_foundation}
/>
<SelectDataEntry
title={dataFields.construction_foundation_source_type.title}
slug="construction_foundation_source_type"
value={props.building.construction_foundation_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_foundation_source_type.tooltip}
placeholder={dataFields.construction_foundation_source_type.example}
options={dataFields.construction_foundation_source_type.items}
/>
{(props.building.construction_foundation_source_type == commonSourceTypes[0] ||
props.building.construction_foundation_source_type == commonSourceTypes[1] ||
props.building.construction_foundation_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_foundation_source_links.title}
slug="construction_foundation_source_links"
value={props.building.construction_foundation_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_foundation_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<SelectDataEntry
title={dataFields.construction_roof_shape.title}
slug="construction_roof_shape"
value={props.building.construction_roof_shape}
tooltip={dataFields.construction_roof_shape.tooltip}
options={dataFields.construction_roof_shape.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_roof_shape"
allow_verify={props.user !== undefined && props.building.construction_roof_shape !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_roof_shape")}
user_verified_as={props.user_verified.construction_roof_shape}
verified_count={props.building.verified.construction_roof_shape}
/>
<SelectDataEntry
title={dataFields.construction_roof_shape_source_type.title}
slug="construction_roof_shape_source_type"
value={props.building.construction_roof_shape_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_roof_shape_source_type.tooltip}
placeholder={dataFields.construction_roof_shape_source_type.example}
options={dataFields.construction_roof_shape_source_type.items}
/>
{(props.building.construction_roof_shape_source_type == commonSourceTypes[0] ||
props.building.construction_roof_shape_source_type == commonSourceTypes[1] ||
props.building.construction_roof_shape_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_roof_shape_source_links.title}
slug="construction_roof_shape_source_links"
value={props.building.construction_roof_shape_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_roof_shape_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<SelectDataEntry
title={dataFields.construction_irregularities.title}
slug="construction_irregularities"
value={props.building.construction_irregularities}
tooltip={dataFields.construction_irregularities.tooltip}
options={dataFields.construction_irregularities.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_irregularities"
allow_verify={props.user !== undefined && props.building.construction_irregularities !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_irregularities")}
user_verified_as={props.user_verified.construction_irregularities}
verified_count={props.building.verified.construction_irregularities}
/>
<SelectDataEntry
title={dataFields.construction_irregularities_source_type.title}
slug="construction_irregularities_source_type"
value={props.building.construction_irregularities_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_irregularities_source_type.tooltip}
placeholder={dataFields.construction_irregularities_source_type.example}
options={dataFields.construction_irregularities_source_type.items}
/>
{(props.building.construction_irregularities_source_type == commonSourceTypes[0] ||
props.building.construction_irregularities_source_type == commonSourceTypes[1] ||
props.building.construction_irregularities_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_irregularities_source_links.title}
slug="construction_irregularities_source_links"
value={props.building.construction_irregularities_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_irregularities_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup>
<DataEntryGroup name="Materials">
<SelectDataEntry
title={dataFields.construction_core_material.title}
@ -56,24 +240,187 @@ const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) =>
user_verified={props.user_verified.hasOwnProperty("construction_core_material")}
user_verified_as={props.user_verified.construction_core_material}
verified_count={props.building.verified.construction_core_material}
/>
/>
<SelectDataEntry
title={dataFields.construction_secondary_materials.title}
disabled={true}
slug="construction_secondary_materials"
value={props.building.construction_secondary_materials}
tooltip={dataFields.construction_secondary_materials.tooltip}
options={ConstructionMaterialsOptions}
title={dataFields.construction_core_material_source_type.title}
slug="construction_core_material_source_type"
value={props.building.construction_core_material_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_core_material_source_type.tooltip}
placeholder={dataFields.construction_core_material_source_type.example}
options={dataFields.construction_core_material_source_type.items}
/>
{(props.building.construction_core_material_source_type == commonSourceTypes[0] ||
props.building.construction_core_material_source_type == commonSourceTypes[1] ||
props.building.construction_core_material_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_core_material_source_links.title}
slug="construction_core_material_source_links"
value={props.building.construction_core_material_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_core_material_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<SelectDataEntry
title={dataFields.construction_external_wall.title}
slug="construction_external_wall"
value={props.building.construction_external_wall}
tooltip={dataFields.construction_external_wall.tooltip}
options={dataFields.construction_external_wall.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_external_wall"
allow_verify={props.user !== undefined && props.building.construction_external_wall !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_external_wall")}
user_verified_as={props.user_verified.construction_external_wall}
verified_count={props.building.verified.construction_external_wall}
/>
<SelectDataEntry
title={dataFields.construction_external_wall_source_type.title}
slug="construction_external_wall_source_type"
value={props.building.construction_external_wall_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_external_wall_source_type.tooltip}
placeholder={dataFields.construction_external_wall_source_type.example}
options={dataFields.construction_external_wall_source_type.items}
/>
{(props.building.construction_external_wall_source_type == commonSourceTypes[0] ||
props.building.construction_external_wall_source_type == commonSourceTypes[1] ||
props.building.construction_external_wall_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_external_wall_source_links.title}
slug="construction_external_wall_source_links"
value={props.building.construction_external_wall_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_external_wall_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<SelectDataEntry
title={dataFields.construction_internal_wall.title}
slug="construction_internal_wall"
value={props.building.construction_internal_wall}
tooltip={dataFields.construction_internal_wall.tooltip}
options={dataFields.construction_internal_wall.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_internal_wall"
allow_verify={props.user !== undefined && props.building.construction_internal_wall !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_internal_wall")}
user_verified_as={props.user_verified.construction_internal_wall}
verified_count={props.building.verified.construction_internal_wall}
/>
<SelectDataEntry
title={dataFields.construction_internal_wall_source_type.title}
slug="construction_internal_wall_source_type"
value={props.building.construction_internal_wall_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_internal_wall_source_type.tooltip}
placeholder={dataFields.construction_internal_wall_source_type.example}
options={dataFields.construction_internal_wall_source_type.items}
/>
{(props.building.construction_internal_wall_source_type == commonSourceTypes[0] ||
props.building.construction_internal_wall_source_type == commonSourceTypes[1] ||
props.building.construction_internal_wall_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_internal_wall_source_links.title}
slug="construction_internal_wall_source_links"
value={props.building.construction_internal_wall_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_internal_wall_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<SelectDataEntry
title={dataFields.construction_ground_floor.title}
slug="construction_ground_floor"
value={props.building.construction_ground_floor}
tooltip={dataFields.construction_ground_floor.tooltip}
options={dataFields.construction_ground_floor.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_ground_floor"
allow_verify={props.user !== undefined && props.building.construction_ground_floor !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_ground_floor")}
user_verified_as={props.user_verified.construction_ground_floor}
verified_count={props.building.verified.construction_ground_floor}
/>
<SelectDataEntry
title={dataFields.construction_ground_floor_source_type.title}
slug="construction_ground_floor_source_type"
value={props.building.construction_ground_floor_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_ground_floor_source_type.tooltip}
placeholder={dataFields.construction_ground_floor_source_type.example}
options={dataFields.construction_ground_floor_source_type.items}
/>
{(props.building.construction_ground_floor_source_type == commonSourceTypes[0] ||
props.building.construction_ground_floor_source_type == commonSourceTypes[1] ||
props.building.construction_ground_floor_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_ground_floor_source_links.title}
slug="construction_ground_floor_source_links"
value={props.building.construction_ground_floor_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_ground_floor_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
<hr/>
<SelectDataEntry
title={dataFields.construction_roof_covering.title}
slug="construction_roof_covering"
value={props.building.construction_roof_covering}
tooltip={dataFields.construction_roof_covering.tooltip}
options={RoofCoveringOptions}
options={dataFields.construction_roof_covering.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
@ -85,15 +432,106 @@ const ConstructionView: React.FunctionComponent<CategoryViewProps> = (props) =>
user_verified={props.user_verified.hasOwnProperty("construction_roof_covering")}
user_verified_as={props.user_verified.construction_roof_covering}
verified_count={props.building.verified.construction_roof_covering}
/>
</DataEntryGroup>
<DataEntryGroup name="Construction sectors">
<DataEntry
title="Construction system type"
slug=""
value=""
mode='view'
/>
<SelectDataEntry
title={dataFields.construction_roof_covering_source_type.title}
slug="construction_roof_covering_source_type"
value={props.building.construction_roof_covering_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_roof_covering_source_type.tooltip}
placeholder={dataFields.construction_roof_covering_source_type.example}
options={dataFields.construction_roof_covering_source_type.items}
/>
{(props.building.construction_roof_covering_source_type == commonSourceTypes[0] ||
props.building.construction_roof_covering_source_type == commonSourceTypes[1] ||
props.building.construction_roof_covering_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_roof_covering_source_links.title}
slug="construction_roof_covering_source_links"
value={props.building.construction_roof_covering_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_roof_covering_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</DataEntryGroup>
<DataEntryGroup name="Decorative features">
<LogicalDataEntry
slug='construction_decorative_features'
title={dataFields.construction_decorative_features.title}
value={props.building.construction_decorative_features}
onChange={props.onSaveChange}
mode={props.mode}
copy={props.copy}
/>
<Verification
slug="construction_decorative_features"
allow_verify={props.user !== undefined && props.building.construction_decorative_features !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_decorative_features")}
user_verified_as={props.user_verified.construction_decorative_features}
verified_count={props.building.verified.construction_decorative_features}
/>
{
props.building.construction_decorative_features &&
<>
<SelectDataEntry
title={dataFields.construction_decorative_feature_materials.title}
slug="construction_decorative_feature_materials"
value={props.building.construction_decorative_feature_materials}
tooltip={dataFields.construction_decorative_feature_materials.tooltip}
options={dataFields.construction_decorative_feature_materials.items}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
/>
<Verification
slug="construction_decorative_feature_materials"
allow_verify={props.user !== undefined && props.building.construction_decorative_feature_materials !== null && !props.edited}
onVerify={props.onVerify}
user_verified={props.user_verified.hasOwnProperty("construction_decorative_feature_materials")}
user_verified_as={props.user_verified.construction_decorative_feature_materials}
verified_count={props.building.verified.construction_decorative_feature_materials}
/>
<SelectDataEntry
title={dataFields.construction_decorative_feature_source_type.title}
slug="construction_decorative_feature_source_type"
value={props.building.construction_decorative_feature_source_type}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_decorative_feature_source_type.tooltip}
placeholder={dataFields.construction_decorative_feature_source_type.example}
options={dataFields.construction_decorative_feature_source_type.items}
/>
{(props.building.construction_decorative_feature_source_type == commonSourceTypes[0] ||
props.building.construction_decorative_feature_source_type == commonSourceTypes[1] ||
props.building.construction_decorative_feature_source_type == null) ? <></> :
<>
<MultiDataEntry
title={dataFields.construction_decorative_feature_source_links.title}
slug="construction_decorative_feature_source_links"
value={props.building.construction_decorative_feature_source_links}
mode={props.mode}
copy={props.copy}
onChange={props.onChange}
tooltip={dataFields.construction_decorative_feature_source_links.tooltip}
placeholder="https://..."
editableEntries={true}
isUrl={true}
/>
</>
}
</>
}
</DataEntryGroup>
</Fragment>
);

View File

@ -587,10 +587,23 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
construction_core_material: {
category: Category.Construction,
title: "Core material",
title: "What is the main structural material thought to be?",
tooltip: "The main structural material",
example: "",
},
construction_core_material_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of main structural material data",
example: "",
items: commonSourceTypes
},
construction_core_material_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for main structural material data source(s)",
example: ["", "", ""],
},
construction_secondary_materials: {
category: Category.Construction,
@ -601,9 +614,263 @@ export const dataFields = { /* eslint-disable @typescript-eslint/camelcase */
construction_roof_covering: {
category: Category.Construction,
title: "Main roof covering",
tooltip: 'Main roof covering material',
title: "What is the main roof covering?",
tooltip: '',
example: "",
items: [
'Slate',
'Clay Tile',
'Wood',
'Asphalt',
'Iron or Steel',
'Other Metal',
'Other Natural Material',
'Other Man-Made Material'
]
},
construction_roof_covering_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of roof covering data",
example: "",
items: commonSourceTypes
},
construction_roof_covering_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for roof covering data source(s)",
example: ["", "", ""],
},
construction_structural_system: {
category: Category.Construction,
title: "What type of structural system does the building appear to have?",
tooltip: "Refer to GEM Taxonomy [<a href='https://github.com/gem/gem_taxonomy'>LINK</a>]",
example: "Solid masonry walls supporting the roof",
items: [
"Solid masonry walls supporting the roof",
"A lateral load resisting structure (e.g. concrete or wooden frame)",
"Other"
]
},
construction_structural_system_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of structural system data",
example: "",
items: commonSourceTypes
},
construction_structural_system_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for structural system data source(s)",
example: ["", "", ""],
},
construction_foundation: {
category: Category.Construction,
title: "What is the foundation system thought to be",
tooltip: "Refer to GEM Taxonomy [<a href='https://taxonomy.openquake.org/terms/foundation-system'>LINK</a>]",
example: "Deep Foundations with lateral support",
items: [
"Shallow foundations with no lateral support",
"Shallow foundations with lateral support",
"Deep foundations with no lateral support",
"Deep Foundations with lateral support",
"Other"
]
},
construction_foundation_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of foundation system data",
example: "",
items: commonSourceTypes
},
construction_foundation_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for foundation system data source(s)",
example: ["", "", ""],
},
construction_roof_shape: {
category: Category.Construction,
title: "What kind of roof shape does the building have?",
tooltip: "Refer to GEM Taxonomy [<a href='https://taxonomy.openquake.org/terms/roof-shape'>LINK</a>]",
example: "Pitched with gable ends",
items: [
"What kind of roof shape does the building have?",
"Pitched with gable ends",
"Pitched and hipped",
"Pitched with dormers",
"Monopitch",
"Sawtooth",
"Curved",
"Complex regular",
"Complex irregular",
"Other"
]
},
construction_roof_shape_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of roof shape data",
example: "",
items: commonSourceTypes
},
construction_roof_shape_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for roof shape data source(s)",
example: ["", "", ""],
},
construction_irregularities: {
category: Category.Construction,
title: "Are there any structural irregularities in the shape of the building?",
tooltip: "i.e. Is one side higher than other? - Refer to GEM Taxonomy [<a href='https://github.com/gem/gem_taxonomy'>LINK</a>]",
example: "No irregularities",
items: [
"Vertical irregularities",
"Horizontal irregularities",
"No irregularities"
]
},
construction_irregularities_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of irregularity data",
example: "",
items: commonSourceTypes
},
construction_irregularities_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for irregularity data source(s)",
example: ["", "", ""],
},
construction_decorative_features: {
category: Category.Construction,
title: "Are there decorative features/mouldings integrated into the facade ?",
example: true,
tooltip: "",
},
construction_decorative_feature_materials: {
category: Category.Construction,
title: "What are these decorative features mainly made of?",
tooltip: "",
example: "Concrete",
items: [
"Wood",
"Clay",
"Concrete",
"Glass",
"Metal",
"Other"
]
},
construction_decorative_feature_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of roof shape data",
example: "",
items: commonSourceTypes
},
construction_decorative_feature_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for roof shape data source(s)",
example: ["", "", ""],
},
construction_internal_wall: {
category: Category.Construction,
title: "What is the main internal wall material thought to be?",
tooltip: '',
example: "",
items: [
'Brick',
'Stone',
'Concrete blocks',
'Concrete slabs/panels',
'Wood',
'Metal',
'Adobe/Earth',
'Glass',
'Plastic',
'Stucco on light framing',
'Vegetative (straw, matting etc)',
'Cement based boards',
]
},
construction_internal_wall_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of internal wall data",
example: "",
items: commonSourceTypes
},
construction_internal_wall_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for internal wall data source(s)",
example: ["", "", ""],
},
construction_external_wall: {
category: Category.Construction,
title: "What is the main external wall material thought to be?",
tooltip: '',
example: "",
items: [
'Brick',
'Stone',
'Concrete blocks',
'Concrete slabs/panels',
'Wood',
'Metal',
'Adobe/Earth',
'Glass',
'Plastic',
'Stucco on light framing',
'Vegetative (straw, matting etc)',
'Cement based boards',
]
},
construction_external_wall_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of external wall data",
example: "",
items: commonSourceTypes
},
construction_external_wall_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for external wall data source(s)",
example: ["", "", ""],
},
construction_ground_floor: {
category: Category.Construction,
title: "What is the main ground floor material thought to be?",
tooltip: '',
example: "",
items: [
'Masonry',
'Earthen',
'Concrete',
'Wood',
'Metal',
'Other',
]
},
construction_ground_floor_source_type: {
category: Category.Construction,
title: "Source type",
tooltip: "Source of ground floor material data",
example: "",
items: commonSourceTypes
},
construction_ground_floor_source_links: {
category: Category.Construction,
title: "Source links",
tooltip: "URL(s) for ground floor material data source(s)",
example: ["", "", ""],
},
sust_breeam_rating: {

View File

@ -0,0 +1,38 @@
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_structural_system;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_structural_system_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_structural_system_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_foundation;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_foundation_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_foundation_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_roof_shape;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_roof_shape_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_roof_shape_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_irregularities;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_irregularities_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_irregularities_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_roof_covering_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_roof_covering_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_features;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_feature_materials;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_feature_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_decorative_feature_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_internal_wall;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_internal_wall_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_internal_wall_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_external_wall;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_external_wall_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_external_wall_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_ground_floor;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_ground_floor_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_ground_floor_source_links;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_core_material_source_type;
ALTER TABLE buildings DROP COLUMN IF EXISTS construction_core_material_source_links;

View File

@ -0,0 +1,38 @@
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_structural_system text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_structural_system_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_structural_system_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_foundation text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_foundation_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_foundation_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_roof_shape text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_roof_shape_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_roof_shape_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_irregularities text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_irregularities_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_irregularities_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_roof_covering_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_roof_covering_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_features boolean;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_feature_materials text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_feature_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_decorative_feature_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_internal_wall text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_internal_wall_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_internal_wall_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_external_wall text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_external_wall_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_external_wall_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_ground_floor text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_ground_floor_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_ground_floor_source_links text[];
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_core_material_source_type text;
ALTER TABLE buildings ADD COLUMN IF NOT EXISTS construction_core_material_source_links text[];