Add listed buildings to planning map and legend
This commit is contained in:
parent
f68343f03e
commit
3c157f079f
@ -206,6 +206,33 @@
|
||||
<PolygonSymbolizer fill="#73ebaf" />
|
||||
</Rule>
|
||||
</Style>
|
||||
<Style name="planning_combined">
|
||||
<Rule>
|
||||
<Filter>[planning_type] = "Grade I Listed"</Filter>
|
||||
<PolygonSymbolizer fill="#c72e08"/>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[planning_type] = "Grade II* Listed"</Filter>
|
||||
<PolygonSymbolizer fill="#e69800"/>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[planning_type] = "Grade II Listed"</Filter>
|
||||
<PolygonSymbolizer fill="#9ebbc9"/>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[planning_type] = "Locally Listed"</Filter>
|
||||
<PolygonSymbolizer fill="#ffbea1"/>
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[planning_type] = "Scheduled Monument"</Filter>
|
||||
<PolygonSymbolizer fill="#ffffff"/>
|
||||
<LineSymbolizer />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<Filter>[planning_type] = "In Conservation Area"</Filter>
|
||||
<PolygonSymbolizer fill="#aaaaaa"/>
|
||||
</Rule>
|
||||
</Style>
|
||||
<Style name="sust_dec">
|
||||
<Rule>
|
||||
<Filter>[sust_dec] = A</Filter>
|
||||
|
@ -107,7 +107,12 @@ const LEGEND_CONFIG = {
|
||||
planning: {
|
||||
title: 'Planning',
|
||||
elements: [
|
||||
{ color: '#73ebaf', text: 'within conservation area' },
|
||||
{ color: '#c72e08', text: 'Grade I listed'},
|
||||
{ color: '#e69800', text: 'Grade II* listed'},
|
||||
{ color: '#9ebbc9', text: 'Grade II listed'},
|
||||
{ color: '#ffbea1', text: 'Locally listed'},
|
||||
{ color: '#ffffff', border: '1px solid #000000', text: 'Scheduled monument'},
|
||||
{ color: '#aaaaaa', text: 'In conservation area'}
|
||||
]
|
||||
},
|
||||
community: {
|
||||
@ -206,7 +211,7 @@ class Legend extends React.Component<LegendProps, LegendState> {
|
||||
elements.map((item) => (
|
||||
|
||||
<li key={item.color} >
|
||||
<span className="key" style={ { background: item.color } }>-</span>
|
||||
<span className="key" style={ { background: item.color, border: item.border } }>-</span>
|
||||
{ item.text }
|
||||
</li>
|
||||
|
||||
|
@ -133,7 +133,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
|
||||
size: 'size_height',
|
||||
location: 'location',
|
||||
like: 'likes',
|
||||
planning: 'conservation_area',
|
||||
planning: 'planning_combined',
|
||||
sustainability: 'sust_dec',
|
||||
type: 'building_attachment_form',
|
||||
use: 'landuse'
|
||||
|
@ -87,6 +87,28 @@ const BUILDING_LAYER_DEFINITIONS = {
|
||||
g.geometry_id = b.geometry_id
|
||||
AND b.likes_total > 0
|
||||
) as likes`,
|
||||
planning_combined: `(
|
||||
SELECT
|
||||
g.geometry_geom,
|
||||
(
|
||||
CASE
|
||||
WHEN b.planning_list_cat = 'Listed Building' and b.planning_list_grade = 'I' THEN 'Grade I Listed'
|
||||
WHEN b.planning_list_cat = 'Listed Building' and b.planning_list_grade = 'II*' THEN 'Grade II* Listed'
|
||||
WHEN b.planning_list_cat = 'Listed Building' and b.planning_list_grade = 'II' THEN 'Grade II Listed'
|
||||
WHEN b.planning_in_local_list THEN 'Locally Listed'
|
||||
WHEN b.planning_list_cat = 'Scheduled Monument' THEN 'Scheduled Monument'
|
||||
WHEN b.planning_in_conservation_area THEN 'In Conservation Area'
|
||||
ELSE 'None'
|
||||
END
|
||||
) as planning_type
|
||||
FROM geometries as g
|
||||
JOIN buildings as b
|
||||
ON g.geometry_id = b.geometry_id
|
||||
WHERE
|
||||
b.planning_in_conservation_area
|
||||
OR b.planning_in_local_list
|
||||
OR b.planning_list_cat is not null
|
||||
) as planning_combined`,
|
||||
conservation_area: `(
|
||||
SELECT
|
||||
g.geometry_geom
|
||||
|
Loading…
Reference in New Issue
Block a user