Commit 9b5189d2 authored by Felix Delattre's avatar Felix Delattre

cleaned up and aded readme and license

parent f4323330
This diff is collapsed.
============================
OpenBuildingMap Raster Tiles
============================
This repository contains the raster tiles rendering for the OpenBuildingMap.
Copyright and copyleft
----------------------
Copyright (C) 2020
* Helmholtz-Zentrum Potsdam Deutsches GeoForschungsZentrum GFZ
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at
your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero
General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see http://www.gnu.org/licenses/.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
See the `LICENSE <./LICENSE>`__ for the full license text.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
<Style name="buildings-lz">
<Rule>
<Filter>[bridge] = 'yes'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#31508a" stroke-width="2"/>
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [railway] = 'rail'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#000" stroke-width="2"/>
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [railway] = 'subway'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#000" stroke-width="2"/>
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [construction] != ''</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#f00" stroke-width="2"/>
</Rule>
</Style>
<!-- Tags with building= ' '-->
<Style name="buildings">
<Rule>
<Filter>[building] = 'bridge'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#31508a" stroke-width="2"/>
</Rule>
<Rule>
<Filter>[building] = 'bridge' and [railway] = 'rail'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#000" stroke-width="2"/>
</Rule>
<Rule>
<Filter>[building] = 'bridge' and [railway] = 'subway'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#000" stroke-width="2"/>
</Rule>
<Rule>
<Filter>[building] = 'bridge' and [construction] != ''</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#f00" stroke-width="2"/>
</Rule>
</Style>
<!-- Style for render lines -->
<Style name="lines">
<Rule>
<Filter>[bridge] = 'yes'</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#31508a" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5" />
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [railway] = 'rail'</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#000" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5" />
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [railway] = 'subway'</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#000" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5" />
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [construction] != ''</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#f00" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5"/>
</Rule>
</Style>
<!-- Layer for render lines -->
<Layer name="lines" status="on" srs="&osm2pgsql_projection;">
<StyleName>lines</StyleName>
<Datasource>
<Parameter name="table">
(
SELECT way,
tags->'bridge' AS bridge,
tags->'railway' AS railway,
tags->'construction' AS construction
FROM &prefix;_line
ORDER BY z_order
) AS foo
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
<!-- Render only select building types starting at z10. -->
<Layer name="buildings-lz" status="on" srs="&osm2pgsql_projection;">
<StyleName>buildings-lz</StyleName>
<Datasource>
<Parameter name="table">
(
SELECT way,
tags->'building' AS building,
tags->'railway' AS railway,
tags->'bridge' AS bridge,
tags->'construction' AS construction
FROM &prefix;_polygon
ORDER BY z_order, cast(tags->'way_area' AS float) DESC
) AS foo
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
<!-- Render the other building types. Some sql filtering is needed to exclude
any type not already specifically rendered in buildings-lz. -->
<Layer name="buildings" status="on" srs="&osm2pgsql_projection;">
<StyleName>buildings</StyleName>
<Datasource>
<Parameter name="table">
(
select way,
tags->'building' AS building,
tags->'railway' AS railway,
tags->'construction' AS construction
FROM &prefix;_polygon
ORDER BY z_order, cast(tags->'way_area' AS float) DESC
) AS foo
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
<!-- Link zur Legende: https://obmwiki.gem.gfz-potsdam.de/doku.php?id=obm:color:bridges -->
<!-- Polygon-Style-->
<Style name="polygons-bridge">
<Rule>
<Filter>[bridge] = 'yes' or [building] = 'bridge'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#31508a" stroke-width="2"/>
</Rule>
<Rule>
<Filter>([building] = 'bridge' or [bridge] = 'yes') and [railway] = 'rail'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#000" stroke-width="2"/>
</Rule>
<Rule>
<Filter>([building] = 'bridge' or [bridge] = 'yes') and [railway] = 'subway'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#000" stroke-width="2"/>
</Rule>
<Rule>
<Filter>([building] = 'bridge' or [bridge] = 'yes') and [construction] != ''</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1.0" fill="#9d5b86"/>
<LineSymbolizer stroke="#f00" stroke-width="2"/>
</Rule>
</Style>
<!-- Style for render lines -->
<Style name="lines-bridge">
<Rule>
<Filter>[bridge] = 'yes'</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#31508a" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5" />
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [railway] = 'rail'</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#000" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5" />
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [railway] = 'subway'</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#000" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5" />
</Rule>
<Rule>
<Filter>[bridge] = 'yes' and [construction] != ''</Filter>
&maxscale_zoom12;
<LineSymbolizer stroke="#f00" stroke-width="7" />
<LineSymbolizer stroke="#9d5b86" stroke-width="5"/>
</Rule>
</Style>
<!-- Render polygons -->
<Layer name="polygons-bridge" status="on" srs="&osm2pgsql_projection;">
<StyleName>polygons-bridge</StyleName>
<Datasource>
<Parameter name="table">
(
SELECT way,
tags->'building' AS building,
tags->'railway' AS railway,
tags->'bridge' AS bridge,
tags->'construction' AS construction
FROM &prefix;_polygon
ORDER BY z_order, cast(tags->'way_area' AS float) DESC
) AS foo
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
<!-- Layer for render lines -->
<Layer name="lines-bridge" status="on" srs="&osm2pgsql_projection;">
<StyleName>lines-bridge</StyleName>
<Datasource>
<Parameter name="table">
(
SELECT way,
tags->'bridge' AS bridge,
tags->'railway' AS railway,
tags->'construction' AS construction
FROM &prefix;_line
ORDER BY z_order
) AS foo
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
</Map>
......@@ -2,7 +2,7 @@
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
%entities;
<!ENTITY my-layer SYSTEM "inc/layers/building.xml.inc">
<!ENTITY my-layer SYSTEM "inc/layers/obm-building-use.xml.inc">
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
......
......@@ -2,7 +2,7 @@
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
%entities;
<!ENTITY my-layer SYSTEM "inc/layers/building-use.xml.inc">
<!ENTITY my-layer SYSTEM "inc/layers/obm-building.xml.inc">
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
......
......@@ -2,10 +2,10 @@
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
%entities;
<!ENTITY my-layer SYSTEM "inc/layers/all-obm-buildings.xml.inc">
<!ENTITY my-layer SYSTEM "inc/layers/obm-buildings-all.xml.inc">
]>
<!-- <Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0"> -->
<Map background-image="&symbols;all-obm-buildings-background.png" srs="&srs900913;" minimum-version="2.0.0">
<Map background-image="&symbols;obm-buildings-all-background.png" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&my-layer;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-tunnels;
&layer-bridges;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "obm-inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-obm-building-colour;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "obm-inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-obm-building-material;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "obm-inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-obm-building-use-cologne;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "obm-inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-obm-buildings-cologne;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "obm-inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-obm-buildings-damage;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "obm-inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-obm-education;
</Map>
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map [
<!ENTITY % entities SYSTEM "obm-inc/entities.xml.inc">
%entities;
]>
<Map background-color="transparent" srs="&srs900913;" minimum-version="2.0.0">
&fontset-settings;
&layer-obm-healthcare;
</Map>
<!-- Link zur Legende: https://obmwiki.gem.gfz-potsdam.de/doku.php?id=obm:color:buildingcolour -->
<Style name="building-colour">
<Rule>
<Filter>[buildingcolour] = 'white'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#fff"/>
<LineSymbolizer stroke="#bbb" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'yellow'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#fc0"/>
<LineSymbolizer stroke="#ba9500" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'red'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#b84700"/>
<LineSymbolizer stroke="#983900" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'brown'
or [buildingcolour] = '#85552e'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#85552e"/>
<LineSymbolizer stroke="#664300" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'grey'
or [buildingcolour] = 'gray'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#666"/>
<LineSymbolizer stroke="#3f3f3f" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'beige'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#c0a080"/>
<LineSymbolizer stroke="#9b8167" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'silver'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#aaa"/>
<LineSymbolizer stroke="#888" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'lightyellow'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#fff76c"/>
<LineSymbolizer stroke="#d3cc59" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'black'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#000"/>
<LineSymbolizer stroke="#3f3f3f" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'green'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#5c8526"/>
<LineSymbolizer stroke="#496a1e" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'orange'
or [buildingcolour] = '#ec8859'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#ec8859"/>
<LineSymbolizer stroke="#a25028" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'blue'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#0047ff"/>
<LineSymbolizer stroke="#002ea2" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'cream'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#ffffcc"/>
<LineSymbolizer stroke="#dbdbaf" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingcolour] = 'maroon'</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#800000"/>
<LineSymbolizer stroke="#6c1c36" stroke-width="1"/>
</Rule>
</Style>
<!-- Render only select building types starting at z10. -->
<Layer name="building-colour" status="on" srs="&osm2pgsql_projection;">
<StyleName>building-colour</StyleName>
<Datasource>
<Parameter name="table">
(
SELECT way, tags->'building:colour' AS buildingcolour
FROM &prefix;_polygon
ORDER BY z_order, cast(tags->'way_area' AS float) DESC
) AS foo
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
<
<!-- Link zur Legende: https://obmwiki.gem.gfz-potsdam.de/doku.php?id=obm:color:buildingmaterial -->
<Style name="building-material">
<Rule>
<Filter>[buildingmaterial] != ''</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#f00"/>
<LineSymbolizer stroke="#c00000" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'wood'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#85552e"/>
<LineSymbolizer stroke="#664300" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'brick'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#b84700"/>
<LineSymbolizer stroke="#983900" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'plaster'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#966"/>
<LineSymbolizer stroke="#503636" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'concrete'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#666"/>
<LineSymbolizer stroke="#3f3f3f" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'glass'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#09c"/>
<LineSymbolizer stroke="#006080" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'stone'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#606"/>
<LineSymbolizer stroke="#40003f" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'metal'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#366"/>
<LineSymbolizer stroke="#254949" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'tin'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#699"/>
<LineSymbolizer stroke="#4c7272" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'timber_framing'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#639"/>
<LineSymbolizer stroke="#442266" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'slate'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#c9f"/>
<LineSymbolizer stroke="#8d1dff" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'steel'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#069"/>
<LineSymbolizer stroke="#003956" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'sandstone'</Filter>
&maxscale_zoom10;
<PolygonSymbolizer fill-opacity="1" fill="#960"/>
<LineSymbolizer stroke="#664300" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[buildingmaterial] = 'mdf'</Filter>