Modify files for adding colouring map attribute

This commit is contained in:
MeldaS 2020-04-01 12:18:44 +01:00
parent e503ee4dcc
commit 32bfb490be
4 changed files with 54 additions and 1 deletions

View File

@ -123,6 +123,40 @@
<PolygonSymbolizer fill="#980043" />
</Rule>
</Style>
<Style name="construction_core_material">
<Rule>
<Filter>[construction_core_material] = "Wood"</Filter>
<PolygonSymbolizer fill="#96613b" />
</Rule>
<Rule>
<Filter>[construction_core_material] = "Stone"</Filter>
<PolygonSymbolizer fill="#ffffe3" />
</Rule>
<Rule>
<Filter>[construction_core_material] = "Brick"</Filter>
<PolygonSymbolizer fill="#f5d96b" />
</Rule>
<Rule>
<Filter>[construction_core_material] = "Steel"</Filter>
<PolygonSymbolizer fill="#beffe8" />
</Rule>
<Rule>
<Filter>[construction_core_material] = "Reinforced Concrete"</Filter>
<PolygonSymbolizer fill="#fca89d" />
</Rule>
<Rule>
<Filter>[construction_core_material] = "Other Metal"</Filter>
<PolygonSymbolizer fill="#5c8970" />
</Rule>
<Rule>
<Filter>[construction_core_material] = "Other Natural Material"</Filter>
<PolygonSymbolizer fill="#b5a859" />
</Rule>
<Rule>
<Filter>[construction_core_material] = "Other Man-Made Material"</Filter>
<PolygonSymbolizer fill="#c48a85" />
</Rule>
</Style>
<Style name="date_year">
<Rule>
<Filter>[date_year] &gt;= 2000</Filter>

View File

@ -81,7 +81,16 @@ const LEGEND_CONFIG = {
},
construction: {
title: 'Construction',
elements: []
elements: [
{ color: "#96613b", text: "Wood" },
{ color: "#ffffe3", text: "Stone" },
{ color: "#f5d96b", text: "Brick" },
{ color: "#beffe8", text: "Steel" },
{ color: "#fca89d", text: "Reinforced Concrete" },
{ color: "#5c8970", text: "Other Metal" },
{ color: "#b5a859", text: "Other Natural Material" },
{ color: "#c48a85", text: "Other Man-Made Material" }
]
},
team: {
title: 'Team',

View File

@ -131,6 +131,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
const tilesetByCat = {
age: 'date_year',
size: 'size_height',
construction: 'construction_core_material',
location: 'location',
like: 'likes',
planning: 'conservation_area',

View File

@ -55,6 +55,15 @@ const BUILDING_LAYER_DEFINITIONS = {
buildings as b
WHERE g.geometry_id = b.geometry_id
) as size_height`,
construction_core_material: `(
SELECT
b.core_materials,
g.geometry_geom
FROM
geometries as g,
buildings as b
WHERE g.geometry_id = b.geometry_id
) as core_materials`,
location: `(
SELECT
(