Add tile layer and style for land use

This commit is contained in:
Maciej Ziarkowski 2019-12-02 15:10:45 +00:00
parent ad69ef798e
commit 51a2a3a1d8
3 changed files with 55 additions and 0 deletions

View File

@ -250,4 +250,50 @@
<PolygonSymbolizer fill="#ffe8a9" />
</Rule>
</Style>
<Style name="landuse">
<Rule>
<Filter>[current_landuse_order] = "Agriculture And Fisheries"</Filter>
<PolygonSymbolizer fill="#52403C" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Recreation And Leisure"</Filter>
<PolygonSymbolizer fill="#ffbfbf" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Transport"</Filter>
<PolygonSymbolizer fill="#b3de69" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Utilities And Infrastructure"</Filter>
<PolygonSymbolizer fill="#cccccc" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Residential"</Filter>
<PolygonSymbolizer fill="#4a54a6" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Community Services"</Filter>
<PolygonSymbolizer fill="#73ccd1" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Retail"</Filter>
<PolygonSymbolizer fill="#ff8c00" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Industry And Business"</Filter>
<PolygonSymbolizer fill="#f5f58f" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Vacant And Derelict"</Filter>
<PolygonSymbolizer fill="#ffffff" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Defence"</Filter>
<PolygonSymbolizer fill="#898944" />
</Rule>
<Rule>
<Filter>[current_landuse_order] = "Mixed Use"</Filter>
<PolygonSymbolizer fill="#e5050d" />
</Rule>
</Style>
</Map>

View File

@ -139,6 +139,7 @@ class ColouringMap extends Component<ColouringMapProps, ColouringMapState> {
planning: 'conservation_area',
sustainability: 'sust_dec',
type: 'building_attachment_form',
use: 'landuse'
};
const tileset = tilesetByCat[cat];
// pick revision id to bust browser cache

View File

@ -108,6 +108,14 @@ const BUILDING_LAYER_DEFINITIONS = {
WHERE
g.geometry_id = b.geometry_id
) as building_attachment_form`,
landuse: `(
SELECT
b.current_landuse_order,
g.geometry_geom
FROM geometries as g
JOIN buildings as b
ON g.geometry_id = b.geometry_id
) as current_landuse_order`,
};
const GEOMETRY_FIELD = 'geometry_geom';