Merge pull request #551 from mz8i/feature/434-activate-height

Activate height to apex colour map
This commit is contained in:
Maciej Ziarkowski 2020-01-16 15:08:08 +00:00 committed by GitHub
commit c610dad31c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 58 additions and 7 deletions

View File

@ -89,6 +89,44 @@
<PolygonSymbolizer fill="#800026" />
</Rule>
</Style>
<Style name="size_height">
<Rule>
<Filter>[size_height] &lt; 5.55</Filter>
<PolygonSymbolizer fill="#f7f4f9" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 5.55 and [size_height] &lt; 7.73</Filter>
<PolygonSymbolizer fill="#e7e1ef" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 7.73 and [size_height] &lt; 1.138</Filter>
<PolygonSymbolizer fill="#d4b9da" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 1.138 and [size_height] &lt; 1.845</Filter>
<PolygonSymbolizer fill="#c994c7" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 1.845 and [size_height] &lt; 3.505</Filter>
<PolygonSymbolizer fill="#df65b0" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 3.505 and [size_height] &lt; 8.930</Filter>
<PolygonSymbolizer fill="#e7298a" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 8.930 and [size_height] &lt; 15.179</Filter>
<PolygonSymbolizer fill="#ce1256" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 15.179 and [size_height] &lt; 99.999</Filter>
<PolygonSymbolizer fill="#980043" />
</Rule>
<Rule>
<Filter>[size_height] &gt;= 99.999</Filter>
<PolygonSymbolizer fill="#67001f" />
</Rule>
</Style>
<Style name="date_year">
<Rule>
<Filter>[date_year] &gt;= 2000</Filter>

View File

@ -67,13 +67,17 @@ const LEGEND_CONFIG = {
]
},
size: {
title: 'Number of storeys',
title: 'Height to apex',
elements: [
{ color: '#ffffcc', text: '≥40' },
{ color: '#fed976', text: '2039' },
{ color: '#fd8d3c', text: '1019' },
{ color: '#e31a1c', text: '69' },
{ color: '#800026', text: '15' },
{ color: '#f7f4f9', text: '0-5.55'},
{ color: '#e7e1ef', text: '5.55-7.73'},
{ color: '#d4b9da', text: '7.73-1.138'},
{ color: '#c994c7', text: '1.138-1.845'},
{ color: '#df65b0', text: '1.845-3.505'},
{ color: '#e7298a', text: '3.505-8.930'},
{ color: '#ce1256', text: '8.930-15.179'},
{ color: '#980043', text: '15.179-99.999'},
{ color: '#67001f', text: '≥99.999'}
]
},
construction: {

View File

@ -133,7 +133,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
const cat = this.props.category;
const tilesetByCat = {
age: 'date_year',
size: 'size_storeys',
size: 'size_height',
location: 'location',
like: 'likes',
planning: 'conservation_area',

View File

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