Commit 0a5bf578 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.
<?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:address -->
<Style name="address">
<Rule>
<Filter>[address_status] = 0
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#f00"/>
<LineSymbolizer stroke="#a00000" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 11
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#c63"/>
<LineSymbolizer stroke="#a25028" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 101
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#fc0"/>
<LineSymbolizer stroke="#deb200" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1001
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#ff0"/>
<LineSymbolizer stroke="#d3d600" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 111
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#280099"/>
<LineSymbolizer stroke="#1a0066" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1011
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#00b8ff"/>
<LineSymbolizer stroke="#0076a2" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1101
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#33a3a3"/>
<LineSymbolizer stroke="#226d6e" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1111
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#009900"/>
<LineSymbolizer stroke="#006600" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 10
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#cc8f71"/>
<LineSymbolizer stroke="#a2755f" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 100
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#ffefb1"/>
<LineSymbolizer stroke="#ded098" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1000
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#ffffa4"/>
<LineSymbolizer stroke="#d5d69e" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 110
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#553e99"/>
<LineSymbolizer stroke="#493f66" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1010
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#afe9ff"/>
<LineSymbolizer stroke="#6a93a2" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1100
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#7aa3a3"/>
<LineSymbolizer stroke="#5d6e6e" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 1110
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#679967"/>
<LineSymbolizer stroke="#596659" stroke-width="1"/>
</Rule>
<Rule>
<Filter>[address_status] = 99
</Filter>
&maxscale_zoom12;
<PolygonSymbolizer fill-opacity="1" fill="#fff"/>
<LineSymbolizer stroke="#000" stroke-width="1"/>
</Rule>
</Style>
<Style name="nodes">
<!-- Zoom 18 -->
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom18;
<MarkersSymbolizer fill="#c63" stroke="#a25028" width="5" height="5"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom18;
<MarkersSymbolizer fill="#fc0" stroke="#deb200" width="5" height="5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom18;
<MarkersSymbolizer fill="#ff0" stroke="#d3d600" width="5" height="5"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom18;
<MarkersSymbolizer fill="#280099" stroke="#1a0066" width="5" height="5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom18;
<MarkersSymbolizer fill="#00b8ff" stroke="#0076a2" width="5" height="5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom18;
<MarkersSymbolizer fill="#33a3a3" stroke="#226d6e" width="5" height="5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom18;
<MarkersSymbolizer fill="#009900" stroke="#006600" width="5" height="5"/>
</Rule>
<!--Zoom 17 -->
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom17;
&minscale_zoom17;
<MarkersSymbolizer fill="#c63" stroke="#a25028" width="4" height="4"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom17;
&minscale_zoom17;
<MarkersSymbolizer fill="#fc0" stroke="#deb200" width="4" height="4"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom17;
&minscale_zoom17;
<MarkersSymbolizer fill="#ff0" stroke="#d3d600" width="4" height="4"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom17;
&minscale_zoom17;
<MarkersSymbolizer fill="#280099" stroke="#1a0066" width="4" height="4"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom17;
&minscale_zoom17;
<MarkersSymbolizer fill="#00b8ff" stroke="#0076a2" width="4" height="4"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom17;
&minscale_zoom17;
<MarkersSymbolizer fill="#33a3a3" stroke="#226d6e" width="4" height="4"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom17;
&minscale_zoom17;
<MarkersSymbolizer fill="#009900" stroke="#006600" width="4" height="4"/>
</Rule>
<!--Zoom 16 -->
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<MarkersSymbolizer fill="#c63" stroke="#a25028" width="3" height="3"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<MarkersSymbolizer fill="#fc0" stroke="#deb200" width="3" height="3"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<MarkersSymbolizer fill="#ff0" stroke="#d3d600" width="3" height="3"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<MarkersSymbolizer fill="#280099" stroke="#1a0066" width="3" height="3"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<MarkersSymbolizer fill="#00b8ff" stroke="#0076a2" width="3" height="3"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<MarkersSymbolizer fill="#33a3a3" stroke="#226d6e" width="3" height="3"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom16;
&minscale_zoom16;
<MarkersSymbolizer fill="#009900" stroke="#006600" width="3" height="3"/>
</Rule>
<!--Zoom 15 -->
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<MarkersSymbolizer fill="#c63" stroke="#a25028" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<MarkersSymbolizer fill="#fc0" stroke="#deb200" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<MarkersSymbolizer fill="#ff0" stroke="#d3d600" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<MarkersSymbolizer fill="#280099" stroke="#1a0066" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<MarkersSymbolizer fill="#00b8ff" stroke="#0076a2" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<MarkersSymbolizer fill="#33a3a3" stroke="#226d6e" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom15;
&minscale_zoom15;
<MarkersSymbolizer fill="#009900" stroke="#006600" width="2" height="2"/>
</Rule>
<!--Zoom 14 -->
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<MarkersSymbolizer fill="#c63" stroke="#a25028" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<MarkersSymbolizer fill="#fc0" stroke="#deb200" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<MarkersSymbolizer fill="#ff0" stroke="#d3d600" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<MarkersSymbolizer fill="#280099" stroke="#1a0066" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<MarkersSymbolizer fill="#00b8ff" stroke="#0076a2" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<MarkersSymbolizer fill="#33a3a3" stroke="#226d6e" width="2" height="2"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom14;
&minscale_zoom14;
<MarkersSymbolizer fill="#009900" stroke="#006600" width="2" height="2"/>
</Rule>
<!--Zoom 13 -->
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<MarkersSymbolizer fill="#c63" stroke="#a25028" width="1.5" height="1.5"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<MarkersSymbolizer fill="#fc0" stroke="#deb200" width="1.5" height="1.5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<MarkersSymbolizer fill="#ff0" stroke="#d3d600" width="1.5" height="1.5"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<MarkersSymbolizer fill="#280099" stroke="#1a0066" width="1.5" height="1.5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<MarkersSymbolizer fill="#00b8ff" stroke="#0076a2" width="1.5" height="1.5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<MarkersSymbolizer fill="#33a3a3" stroke="#226d6e" width="1.5" height="1.5"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom13;
&minscale_zoom13;
<MarkersSymbolizer fill="#009900" stroke="#006600" width="1.5" height="1.5"/>
</Rule>
<!--Zoom 12 -->
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom12;
&minscale_zoom12;
<MarkersSymbolizer fill="#c63" stroke="#a25028" width="1" height="1"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom12;
&minscale_zoom12;
<MarkersSymbolizer fill="#fc0" stroke="#deb200" width="1" height="1"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom12;
&minscale_zoom12;
<MarkersSymbolizer fill="#ff0" stroke="#d3d600" width="1" height="1"/>
</Rule>
<Rule>
<Filter>[housenumber] = 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom12;
&minscale_zoom12;
<MarkersSymbolizer fill="#280099" stroke="#1a0066" width="1" height="1"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] = 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom12;
&minscale_zoom12;
<MarkersSymbolizer fill="#00b8ff" stroke="#0076a2" width="1" height="1"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] = 'NONE'</Filter>
&maxscale_zoom12;
&minscale_zoom12;
<MarkersSymbolizer fill="#33a3a3" stroke="#226d6e" width="1" height="1"/>
</Rule>
<Rule>
<Filter>[housenumber] != 'NONE'
and [street] != 'NONE'
and [postcode] != 'NONE'</Filter>
&maxscale_zoom12;
&minscale_zoom12;
<MarkersSymbolizer fill="#009900" stroke="#006600" width="1" height="1"/>
</Rule>
</Style>
<!-- Render the buildings with Address_Information -->
<Layer name="address" status="on" srs="&osm2pgsql_projection;">
<StyleName>address</StyleName>
<Datasource>
<Parameter name="table">
(
SELECT way,address_status FROM exp_building
) AS foo
</Parameter>
&datasource-settings;
</Datasource>
</Layer>
<!-- Nodes -->
<Layer name="nodes" status="on" srs="&osm2pgsql_projection;">
<StyleName>nodes</StyleName>
<Datasource>
<Parameter name="table">
(
SELECT way,
COALESCE(tags->'addr:housenumber', 'NONE') AS housenumber,
COALESCE(tags->'addr:street', 'NONE') AS street,
COALESCE(tags->'addr:postcode', 'NONE') AS postcode,
COALESCE(tags->'building', 'NONE') AS building,
COALESCE(tags->'amenity', 'NONE') AS amenity
FROM &prefix;_point
WHERE (tags ? 'building')
OR (tags ? 'addr:housenumber') OR (tags ? 'addr:street') OR (tags ? 'addr:postcode')
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;
]>