Eigener Streetmap Server

Hallo,

ich möchte versuchen, einen eigenen Streetmap-Server aufzusetzen. Für mich ist die Vielzahl der Prjokte und vorhanden Software gerade etwas verwirrend :slight_smile:
Manche Projekte scheinen schon lange nicht mehr gepflegt zu werden.

Was ist der Weg zu einem Streetmapserver?
Bzw. auf welchen Projekten baut der offizielle osm-server auf?

Als Basis OS ist bei mir CentOS7 auf einem i3 mit 16 gb vorhanden.

danke euch.

Hallo Joey24,

herzlich willkommen im Forum.

Was ist denn bitte ein Streetmap-Server? In diesem Forum hier geht es um OpenStreetMap. :slight_smile:

Wenn du uns sagst, was du damit vorhast, können wir dir vielleicht weiterhelfen.

Viele Grüße

Michael

Dies hier könnte ein Einstiegspunkt ins Thema sein: https://switch2osm.org/

Gruß Klaus

PS: Die genannten Rahmenbedingungen (CentOS7 etc.) passen dann aber nicht.

Hallo,

natürlich soll es ein eigener Server basierend auf Open Source Software mit Daten des Openstreetmap-Projektes werden (hoffentlich jetzt korrekt formuliert :slight_smile:

Habe verschiedene Tutorials angeschaut wie z. B. dieses hier http://wiki.openstreetmap.org/wiki/OnDemandTileServer, aber da wirft es mir einige Fehlermeldungen aus beim Nachbau und ich weiß auch nicht in wie weit es aktuelle Software ist z.b. osmosis oder ob es andere Lösungen gibt, wie gesagt die Vielfalt “erschlägt” mich gerade.

Danke Toc-rox für den Link, das Tutorial kannte ich noch nicht werde es mir anschauen.

Grüße Joey

Also ich kann dir nur das rendering mit Ubuntu Paketquellen empfehlen:
https://switch2osm.org/serving-tiles/building-a-tile-server-from-packages/
Da kommst du sehr schnell zum Ziel. Das läßt sich sicher auch noch anpassen.

Das aktuellste Tutorial ist m.E. das bei switch2osm. Das wird auch immer beworben, wenn jemand “auf OSM wechseln” will.

Hallo,

danke für den Tip mit switch2osm. Das Install-Howto konnte ich glaub ich ganz erfolgreich für Centos umbiegen.

Aber ich hänge an einem Fehler:

renderd[16662]: An error occurred while loading the map layer 'default': Postgis Plugin: Bad connection
Connection string: ' dbname=osm user=osm connect_timeout=4'
  encountered during parsing of layer 'landuse_gen0' in Layer at line 193 of '/usr/local/share/maps/style/OSMBright/OSMBright.xml'

liegt das an dem Db-Connect oder an dem parsing? Per psql funktioniert der connect (mit osm user)

Guck mal hier: https://github.com/openstreetmap/mod_tile/issues/91

Empfehlung daraus: would you plz test that with another style , i recommend openstreetmap-carto , i had problems with osmbright.

Vielen Dank für Eure Hilfestellungen, der Tile-Server läuft soweit, falls jemand damit was anfangen möchte, ich hab ein Installationscript angehängt, das auf einem CentOS 7 durchlaufen sollte. (Habs aber nicht ausprobiert, ist halb automatisch generiert :wink:

Jetzt hab ich noch 3 Probleme :slight_smile:

Das erste: Zur Webdarstellung ist Leaflet zwar ganz einfach zu konfigurieren, aber nicht besonders schön und bei OpenLayers steig ich gerade nicht durch, wo ich meinen eigenen Tileserver konfiguriere.

Wo konfiguriere ich Openlayers?

Danke


#!/bin/sh


## ###Repo: epel###
yum -y install epel-release
yum -y install yum-utils
yum-config-manager -y --enable centosplus


## ###Repo: nodejs###
cat <<EOF > /etc/yum.repos.d
[Nodesource.com]
name=added from: https://rpm.nodesource.com/pub/el/7/x86_64/
baseurl=https://rpm.nodesource.com/pub/el/7/x86_64/
enabled=1
includepkgs=nodejs*
EOF

cat <<EOF > /etc/yum.repos.d/NODESOURCE-GPG-SIGNING-KEY-EL
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1

mQINBFQCN9QBEADv5QYOlCWNkI/oKST/GGpQkOZjFY2cbYdHuc2j8kyM4oeNluXq
puEYMHOoQvbJ3DFPvsv+jCruL7qjkel9YzaF6e3RN2ystP4YBjxyOT7Bb5EnjNNU
6oScQJ50/+RmA4N3wzBrw5+x5KQGBfRU/k7JdDKO6SGY0zzdAo3jqp1nQ9Sf+Fmg
hsjDLVZTHorLPV3yPLb37QlvBB2YIRF+dL9l4wPAI/fGyWv+Qs7VlCZTyRAnKGbv
qN1LvlYoV9YqxaJYYJW+MQhn4706yNJAFeOZuKejEcnZTd/NBiAR91sVnsXKgW9e
yb4TZ7SqkmrJpuKJBpdPr1dgaK8dDmFh9Nlhpz6xZuYcKaDEDa5b3wymnixtwZf2
WyboChIlsHDajtXZt34xP9uUge1VHyk1o8AQUzKEpuepxxLnyXArLgvHaLhQnxPA
bQB43b4RbWYHPdB16ki2WoZX/DA4YEtfxg8GC3zXC2thMJnFburmts71iiYsxKBc
6d7O8415xrErhk2/o2+bRhf+7qBQfW0oxQSEMBYbqP3hvhG1VWc9umjbCfMgHrHo
IzI7W+GbRdbSsdpY6JNKuCftVfIKXeXk5FbUUP9NzsG/nyGFORkq9y0AKmocx3TD
w9DRG2SmKIKBOG5PQuzuXqsdUaYcFpySXdPNQG2CPtguPhQivw4qM3pQpQARAQAB
tCNOb2RlU291cmNlIDxncGctcnBtQG5vZGVzb3VyY2UuY29tPokCOAQTAQIAIgUC
VAI31AIbAwYLCQgHAwIGFQgCCQoLBBYCAwECHgECF4AACgkQXdvo1DT6dN2uaA//
UwKsmnz4MCH7Jn/vG0OinGQTfSH5uvlH68yOZmKLnhtfiqUq1gZz734S75ExxGP4
SGFYeK9CqKFgoGbpjzLLc5kvA7GdDX3E/exEjYa+GrJ9uIOUtaCKstTD5fPVj2Wf
TZtK9v1F6iYKyPHdJnSc5p7AxbLZkarF1CPJQWv2iDrg3dO3Oy41aazRwxJe9hvI
a//XavnsW2TTeo8qfQ0qrs8vzt8bxJF+PkACmqQfbXAiflCct5XEUbhbX1b8KznP
ppd5PLrvRTjHnZi/QRjky0qsUOukGiQhT6iZeiOUcLPeD+f7tA7JBZ08XXRfnLLj
mqYbIHPFG4C/AM5RXu5OdCtFrZQsJgGQEeg/UxYEz5qqNljKjRZ8XsmcyeWouKFM
LuVr1ORF6crl8lAdT3RujP2MzY8cvxJQesYKdWqk3bPXI7oG/PRReoeN86TqraYO
UeTssVlw5lmJtAH+eHt3K6TSjd0rq1RY7xWfttD7L8ECfPmBzbL54MSmKx9MBz+o
a9vOWQ2LjIbR/6DEyQiDpGhQTM+r0/SVS/kqR/j0SEHvOql+sn9sK1/qR1h3JtgI
6YF4IDXBE9s0RBCLbdxtVf3eAcbOnhkhefMtpURJLdVuU8HhMCiVUlHDUPHIuT5z
Lp+avdanIgi8Cnps/DpMI2KigEHW5mmqihXtfKj0jeE=
=9Bql
-----END PGP PUBLIC KEY BLOCK-----
EOF

rpm --import /etc/yum.repos.d/NODESOURCE-GPG-SIGNING-KEY-EL


yum -y httpd install autoconf automake bison byacc cscope ctags diffstat doxygen flex gcc gcc-c++ gcc-gfortran git indent intltool libtool patchutils rcs rpm-sign swig systemtap make harfbuzz-devel libicu-devel boost-devel cairo-devel pycairo-devel cairomm-devel libwebp-devel gdal gdal-devel libjpeg-turbo-devel proj-devel libtiff-devel postgresql-devel munin munin-node  protobuf-compiler protobuf-devel protobuf protobuf-python libpqxx-devel libxml2-devel freetype-devel libpng12-devel libtiff-devel agg-devel lua-devel libgeotiff-devel httpd-devel cmake gcc-c++ boost-devel expat-devel zlib-devel bzip2-devel postgresql-devel geos-devel proj-devel proj-epsg lua-devel gdal-python gdal-devel spatialindex spatialindex-devel python-virtualenv python-pip python-devel protobuf-compiler protobuf-devel tokyocabinet-devel geos-devel python-psycopg2 tokyocabinet protobuf protobuf-python geos geos-python postgis libcurl-devel bsdtar nodejs postgresql-server

postgresql-setup initdb
systemctl start postgresql



## ###60_osm-server_POSTGIS###
groupadd -r -g 989 osm
useradd -r -m -u 989 -g 989 osm
echo "osm" | passwd osm --stdin
su postgres -c "createuser osm --no-superuser; createdb -E UTF8 -O osm osm; psql -d osm -c 'CREATE EXTENSION postgis; ALTER TABLE geometry_columns OWNER TO osm; ALTER TABLE spatial_ref_sys OWNER TO osm;'"


## ###60_osm-server_OSM2PGSQL###
git clone git://github.com/openstreetmap/osm2pgsql.git /srv/osm-build/osm2pgsql


## ###60_osm-server_OSM2PGSQL###
mkdir /srv/osm-build/osm2pgsql/build
cd /srv/osm-build/osm2pgsql/build
cmake ..
make -j3
make install


## ###60_osm-server_MAPNIK###
git clone --branch 2.2.x https://github.com/mapnik/mapnik /srv/osm-build/mapnik


## ###60_osm-server_MAPNIK###
cd /srv/osm-build/mapnik
python scons/scons.py configure INPUT_PLUGINS=all OPTIMIZATION=3 SYSTEM_FONTS=/usr/share/fonts/dejavu
make -j3
make install
echo "/usr/local/lib" >> /etc/ld.so.conf.d/mapnik.conf
ldconfig


## ###60_osm-server_MOD_TILE###
git clone https://github.com/openstreetmap/mod_tile.git /srv/osm-build/mod_tile


## ###60_osm-server_MOD_TILE###
cd /srv/osm-build/mod_tile
./autogen.sh
./configure
make -j3
make install
make install-mod_tile


## ###60_osm-server_OSMBRIGHT###
mkdir -p /usr/local/share/maps/style
wget -qO- https://github.com/mapbox/osm-bright/archive/master.zip | bsdtar -xvf- -C /usr/local/share/maps/style
mkdir /usr/local/share/maps/style/osm-bright-master/shp
wget -qO- http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip | bsdtar -xf- -C /usr/local/share/maps/style/osm-bright-master/shp
wget -qO- http://data.openstreetmapdata.com/land-polygons-split-3857.zip | bsdtar -xf- -C /usr/local/share/maps/style/osm-bright-master/shp
mkdir /usr/local/share/maps/style/osm-bright-master/shp/ne_10m_populated_places_simple
wget -qO- http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places_simple.zip | bsdtar -xf- -C /usr/local/share/maps/style/osm-bright-master/shp/ne_10m_populated_places_simple
npm -g install carto


## ###60_osm-server_OSMBRIGHT###
cd /usr/local/share/maps/style/osm-bright-master/shp/land-polygons-split-3857
shapeindex land_polygons.shp
cd /usr/local/share/maps/style/osm-bright-master/shp/simplified-land-polygons-complete-3857
shapeindex simplified_land_polygons.shp
chown root:root /usr/local/share/maps/style
chmod 775 /usr/local/share/maps/style
cat <<EOF > /usr/local/share/maps/style/osm-bright-master/osm-bright/osm-bright.osm2pgsql.mml
{
  "Layer": [
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "file": "/usr/local/share/maps/style/osm-bright-master/shp/simplified-land-polygons-complete-3857/simplified_land_polygons.shp",
        "type": "shape",
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
      }, 
      "class": "shp", 
      "geometry": "polygon", 
      "id": "land-low", 
      "name": "land-low", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "file": "/usr/local/share/maps/style/osm-bright-master/shp/land-polygons-split-3857/land_polygons.shp",
        "type": "shape"
      },
      "class": "shp", 
      "geometry": "polygon", 
      "id": "land-high", 
      "name": "land-high", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913",
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "landuse_gen0", 
        "key_field": "", 
        "project": "osm-bright-imposm", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, way_area AS area, COALESCE(landuse, leisure, \"natural\", highway, amenity, tourism) AS type\n  FROM planet_osm_polygon\n  WHERE way_area > 100000\n  ORDER BY way_area DESC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "multipolygon", 
      "id": "landuse_gen0", 
      "name": "landuse_gen0", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "landuse_gen1", 
        "key_field": "", 
        "project": "osm-bright-imposm", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, way_area AS area, COALESCE(landuse, leisure, \"natural\", highway, amenity, tourism) AS type\n  FROM planet_osm_polygon\n  WHERE way_area > 10000\n  ORDER BY way_area DESC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "multipolygon", 
      "id": "landuse_gen1", 
      "name": "landuse_gen1", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "landuse", 
        "key_field": "", 
        "project": "osm-bright-imposm", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, way_area AS area, COALESCE(landuse, leisure, \"natural\", highway, amenity, tourism) AS type\n  FROM planet_osm_polygon\n  ORDER BY way_area DESC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "polygon", 
      "id": "landuse", 
      "name": "landuse", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "waterway", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, waterway AS type\n  FROM planet_osm_line\n  WHERE waterway IN ('river', 'canal')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "waterway_low", 
      "name": "waterway_low", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "key_field": "", 
        "table": "( SELECT way, waterway AS type\n  FROM planet_osm_line\n  WHERE waterway IN ('river', 'canal', 'stream')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "waterway_med", 
      "name": "waterway_med", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "key_field": "", 
        "table": "( SELECT way, waterway AS type\n  FROM planet_osm_line\n  WHERE waterway IN ('river', 'canal', 'stream', 'ditch', 'drain')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "waterway_high", 
      "name": "waterway_high", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "water_gen0", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, \"natural\" AS type, way_area AS area\n  FROM planet_osm_polygon\n  WHERE (\"natural\" IN ('water', 'pond')\n    OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank', 'stream'))\n    AND way_area > 10000\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "polygon", 
      "id": "water_gen0", 
      "name": "water_gen0", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "water_gen1", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, \"natural\" AS type, way_area AS area\n  FROM planet_osm_polygon\n  WHERE (\"natural\" IN ('water', 'pond')\n    OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank', 'stream'))\n    AND way_area > 1000\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "polygon", 
      "id": "water_gen1", 
      "name": "water_gen1", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "water", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, way_area AS area\n  FROM planet_osm_polygon\n  WHERE \"natural\" IN ('water', 'pond')\n    OR waterway IN ('basin', 'canal', 'mill_pond', 'pond', 'riverbank', 'stream')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "polygon", 
      "id": "water", 
      "name": "water", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "landuse_overlays", 
        "key_field": "", 
        "project": "osm-bright-imposm", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, way_area AS area, COALESCE(leisure) AS type\n  FROM planet_osm_polygon\n  WHERE leisure = 'nature_reserve'\n  ORDER BY way_area DESC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "polygon", 
      "id": "landuse_overlays", 
      "name": "landuse_overlays", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "admin", 
        "key_field": "", 
        "project": "osm-bright-imposm", 
        "table": "( SELECT way, admin_level\n  FROM planet_osm_line\n  WHERE boundary = 'administrative'\n    AND admin_level IN ('2','3','4')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "admin", 
      "name": "admin", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "key_field": "", 
        "table": "( SELECT way, \"building\" AS type\n  FROM planet_osm_polygon\n  WHERE building NOT IN ('0','false', 'no')\n  ORDER BY ST_YMin(ST_Envelope(way)) DESC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "polygon", 
      "id": "buildings", 
      "name": "buildings", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "aeroway", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, aeroway AS type\n  FROM planet_osm_line\n  WHERE aeroway IN ('apron', 'runway', 'taxiway')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "aeroway", 
      "name": "aeroway", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "tunnel", 
        "key_field": "", 
        "project": "osm-bright-master", 
        "srs": null, 
        "table": "( SELECT way, COALESCE(highway, railway) AS type, 0 AS bridge, access, render, layer, 1 as tunnel,\n  CASE\n    WHEN highway IN ('motorway', 'trunk') THEN 'motorway'\n    WHEN highway IN ('primary', 'secondary') THEN 'mainroad'\n    WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad'\n    WHEN highway IN ('service', 'track') THEN 'service'\n    WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto'\n    WHEN railway IN ('light_rail', 'subway', 'narrow_gauge', 'rail', 'tram') THEN 'railway'\n    ELSE 'other' END AS stylegroup\n  FROM (\n    SELECT *, '1_outline' AS render FROM planet_osm_line\n    WHERE tunnel NOT IN ('', '0', 'no')\n    UNION ALL\n    SELECT *, '2_line' AS render FROM planet_osm_line\n    WHERE tunnel NOT IN ('', '0', 'no')\n    UNION ALL\n    SELECT *, '3_inline' AS render FROM planet_osm_line\n    WHERE tunnel NOT IN ('', '0', 'no')\n  ) AS tunnels\n  ORDER BY layer ASC, render ASC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "tunnel", 
      "name": "tunnel", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "turning_circle_case", 
        "key_field": "", 
        "project": "osm-bright-master", 
        "srs": null, 
        "table": "( SELECT way \n  FROM planet_osm_point \n  WHERE highway = 'turning_circle'\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "point", 
      "id": "turning_circle_case", 
      "name": "turning_circle_case", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "roads_high", 
        "key_field": "", 
        "project": "osm-bright-master", 
        "srs": null, 
        "table": "( SELECT way, COALESCE(highway, railway) AS type, 0 AS tunnel, 0 AS bridge, access, 'fill' AS render,\n  CASE\n    WHEN highway IN ('motorway', 'trunk') THEN 'motorway'\n    WHEN highway IN ('primary', 'secondary') THEN 'mainroad'\n    WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad'\n    WHEN highway IN ('service', 'track') THEN 'service'\n    WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto'\n    WHEN railway IN ('light_rail', 'subway', 'narrow_gauge', 'rail', 'tram') THEN 'railway'\n    ELSE 'other' END AS stylegroup\n  FROM planet_osm_line\n  WHERE (highway IS NOT NULL OR railway IS NOT NULL)\n    AND (tunnel IS NULL OR tunnel = 'no')\n    AND (bridge IS NULL OR bridge = 'no')\n  ORDER BY z_order\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "roads_high", 
      "name": "roads_high", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "key_field": "", 
        "table": "( SELECT way, highway AS type\n  FROM planet_osm_roads\n  WHERE highway IN ('motorway', 'trunk', 'primary', 'secondary', 'motorway_link', 'trunk_link')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "roads_med", 
      "name": "roads_med", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "key_field": "", 
        "table": "( SELECT way, highway AS type, bridge, tunnel\n    FROM planet_osm_roads\n    WHERE highway IN ('motorway', 'trunk')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "roads_low", 
      "name": "roads_low", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "key_field": "", 
        "table": "( SELECT way \n  FROM planet_osm_point\n  WHERE highway = 'turning_circle'\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "point", 
      "id": "turning_circle_fill", 
      "name": "turning_circle_fill", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "bridge", 
        "key_field": "", 
        "project": "osm-bright-master", 
        "srs": null, 
        "table": "( SELECT way, COALESCE(highway, railway) AS type, 1 AS bridge, access, render, layer, 0 as tunnel,\n  CASE\n    WHEN highway IN ('motorway', 'trunk') THEN 'motorway'\n    WHEN highway IN ('primary', 'secondary') THEN 'mainroad'\n    WHEN highway IN ('motorway_link', 'trunk_link', 'primary_link', 'secondary_link', 'tertiary', 'tertiary_link', 'residential', 'unclassified', 'road', 'living_street') THEN 'minorroad'\n    WHEN highway IN ('service', 'track') THEN 'service'\n    WHEN highway IN ('path', 'cycleway', 'footway', 'pedestrian', 'steps', 'bridleway') THEN 'noauto'\n    WHEN railway IN ('light_rail', 'subway', 'narrow_gauge', 'rail', 'tram') THEN 'railway'\n    ELSE 'other' END AS stylegroup\n  FROM (\n    SELECT *, '1_outline' AS render FROM planet_osm_line\n    WHERE bridge NOT IN ('', '0', 'no')\n    UNION ALL\n    SELECT *, '2_line' AS render FROM planet_osm_line\n    WHERE bridge NOT IN ('', '0', 'no')\n    UNION ALL\n    SELECT *, '3_inline' AS render FROM planet_osm_line\n    WHERE bridge NOT IN ('', '0', 'no')\n  ) AS bridges\n  ORDER BY layer ASC, render ASC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "bridge", 
      "name": "bridge", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "file": "/usr/local/share/maps/style/osm-bright-master/shp/ne_10m_populated_places_simple/ne_10m_populated_places_simple.shp",
        "type": "shape"
      }, 
      "class": "", 
      "geometry": "point", 
      "id": "ne_places", 
      "name": "ne_places", 
      "srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "place", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, place AS type, name, z_order, population\n  FROM planet_osm_point\n  WHERE place in ('country', 'state', 'city', 'town', 'village', 'hamlet', 'suburb', 'neighbourhood', 'locality')\n  ORDER BY population DESC NULLS LAST\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "point", 
      "id": "place", 
      "name": "place", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "landuse_label", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT COALESCE(landuse, leisure, \"natural\", highway, amenity, tourism) AS type,\n    name, way_area AS area,\n    ST_PointOnSurface(way) AS way\n  FROM planet_osm_polygon\n  WHERE name IS NOT NULL\n    AND way && !bbox!\n    AND ST_IsValid(way)\n\n  UNION ALL\n\n  SELECT 'building' AS type, name, way_area AS area,\n    ST_PointOnSurface(way) AS way\n  FROM planet_osm_polygon\n  WHERE name IS NOT NULL\n    AND building NOT IN ('', 'no', '0', 'false')\n    AND way && !bbox!\n    AND ST_IsValid(way)\n  ORDER BY area DESC\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "point", 
      "id": "area_label", 
      "name": "area_label", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "motorway_label", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, highway AS type, name, ref, oneway, CHAR_LENGTH(ref) AS reflen\n    FROM planet_osm_line\n    WHERE highway IN ('motorway', 'trunk')\n      AND (name IS NOT NULL OR ref IS NOT NULL)\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "motorway_label", 
      "name": "motorway_label", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "mainroad_label", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, highway AS type, name, oneway\n  FROM planet_osm_line\n  WHERE (name IS NOT NULL OR oneway IN ('yes', 'true', '1', '-1'))\n    AND highway IN ('primary', 'secondary', 'tertiary')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "mainroad_label", 
      "name": "mainroad_label", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "minorroad_label", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, highway AS type, name, oneway\n  FROM planet_osm_line\n  WHERE (name IS NOT NULL OR oneway IN ('yes', 'true', '1', '-1'))\n    AND highway IN ('residential', 'unclassified', 'road', 'living_street', 'unknown')\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "minorroad_label", 
      "name": "minorroad_label", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }, 
    {
      "Datasource": {
        "dbname": "osm", 
        "extent": "-20037508.34 -20037508.34 20037508.34 20037508.34", 
        "geometry_field": "way", 
        "id": "waterway_label", 
        "key_field": "", 
        "project": "foss4g-2011", 
        "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
        "table": "( SELECT way, waterway AS type, name\n  FROM planet_osm_line\n  WHERE waterway IN ('canal', 'river', 'stream') \n    AND name IS NOT NULL\n) AS data", 
        "type": "postgis"
      }, 
      "class": "", 
      "geometry": "linestring", 
      "id": "waterway_label", 
      "name": "waterway_label", 
      "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", 
      "srs-name": "900913", 
      "status": "on"
    }
  ], 
  "Stylesheet": [
    "palette.mss", 
    "base.mss", 
    "roads.mss", 
    "labels.mss"
  ], 
  "attribution": "Data \u00a9 OpenStreetMap (and) contributors, ODbL",
  "bounds": [
    -180, 
    -85.0511, 
    180, 
    85.0511
  ], 
  "center": [
    0, 
    20, 
    4
  ], 
  "description": "", 
  "format": "png", 
  "interactivity": false, 
  "maxzoom": 18, 
  "minzoom": 0, 
  "name": "OSM Bright", 
  "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"
}
EOF
cat <<EOF > /etc/test.r5d.de/conf/osm-server/configure.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-

from os import path, getcwd
from collections import defaultdict
config = defaultdict(defaultdict)

config["importer"] = "osm2pgsql" # either 'imposm' or 'osm2pgsql'

# The name given to the style. This is the name it will have in the TileMill
# project list, and a sanitized version will be used as the directory name
# in which the project is stored
config["name"] = "OSM Bright"

# The absolute path to your MapBox projects directory. You should 
# not need to change this unless you have configured TileMill specially
config["path"] = path.expanduser("/usr/local/share/maps/style")

# PostGIS connection setup
# Leave empty for Mapnik defaults. The only required parameter is dbname.
config["postgis"]["host"]     = ""
config["postgis"]["port"]     = ""
config["postgis"]["dbname"]   = "osm"
config["postgis"]["user"]     = "osm"
config["postgis"]["password"] = "osm"

# Increase performance if you are only rendering a particular area by
# specifying a bounding box to restrict queries. Format is "XMIN,YMIN,XMAX,YMAX"
# in the same units as the database (probably spherical mercator meters). The
# whole world is "-20037508.34 -20037508.34 20037508.34 20037508.34".
# Leave blank to let Mapnik estimate.
config["postgis"]["extent"] = "-20037508.34,-20037508.34,20037508.34,20037508.34"

# Land shapefiles required for the style. If you have already downloaded
# these or wish to use different versions, specify their paths here.
# You will need to unzip these files before running make.py
# These OSM land shapefiles are updated daily and can be downloaded at: 
# - http://data.openstreetmapdata.com/simplified-land-polygons-complete-3857.zip
# - http://data.openstreetmapdata.com/land-polygons-split-3857.zip

config["land-high"] = path.join(getcwd(),"shp/land-polygons-split-3857/land_polygons.shp")
config["land-low"] = path.join(getcwd(),"shp/simplified-land-polygons-complete-3857/simplified_land_polygons.shp")
EOF
cd /usr/local/share/maps/style/osm-bright-master
chmod 775 /usr/local/share/maps/style/osm-bright-master/make.py
./make.py
cd /usr/local/share/maps/style/OSMBright
carto project.mml > OSMBright.xml


## ###60_osm-server_APACHE###
cat <<EOF > /usr/local/etc/renderd.conf
[renderd]
socketname=/var/run/renderd/renderd.sock
num_threads=4
tile_dir=/var/lib/mod_tile
stats_file=/var/run/renderd/renderd.stats

;[renderd01]
;iphostname=::1
;ipport=7654
;num_threads=4
;tile_dir=rados://tiles/etc/ceph/ceph.conf
;stats_file=/var/run/renderd/renderd.stats

;[renderd02]
;iphostname=::1
;ipport=7654
;num_threads=8
;tile_dir=memcached://
;stats_file=/var/run/renderd/renderd.stats

[mapnik]
plugins_dir=/usr/local/lib/mapnik/input
font_dir=/usr/share/fonts/dejavu
font_dir_recurse=1

[default]
URI=/osm_tiles/
TILEDIR=/var/lib/mod_tile
XML=/usr/local/share/maps/style/OSMBright/OSMBright.xml
HOST=localhost
TILESIZE=256
;HTCPHOST=proxy.openstreetmap.org
;** config options used by mod_tile, but not renderd **
;MINZOOM=0
;MAXZOOM=18
;TYPE=png image/png
;DESCRIPTION=This is a description of the tile layer used in the tile json request
;ATTRIBUTION=&copy;<a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and <a href=\"http://wiki.openstreetmap.org/wiki/Contributors\">contributors</a>, <a href=\"http://opendatacommons.org/licenses/odbl/\">ODbL</a>
;SERVER_ALIAS=http://localhost/
;CORS=http://www.openstreetmap.org
;ASPECTX=1
;ASPECTY=1
;SCALE=1.0

;[style2]
;URI=/osm_tiles2/
;TILEDIR=rados://tiles/etc/ceph/ceph.conf
;TILESIZE=512
;XML=/home/jburgess/osm/svn.openstreetmap.org/applications/rendering/mapnik/osm-local2.xml
;HOST=tile.openstreetmap.org
;HTCPHOST=proxy.openstreetmap.org
;** config options used by mod_tile, but not renderd **
;MINZOOM=0
;MAXZOOM=22
;TYPE=png image/png
;DESCRIPTION=This is a description of the tile layer used in the tile json request
;ATTRIBUTION=&copy;<a href=\"http://www.openstreetmap.org/\">OpenStreetMap</a> and <a href=\"http://wiki.openstreetmap.org/wiki/Contributors\">contributors</a>, <a href=\"http://opendatacommons.org/licenses/odbl/\">ODbL</a>
;SERVER_ALIAS=http://localhost/
;CORS=*
EOF

mkdir /var/run/renderd
chown osm:osm /var/run/renderd
mkdir /var/lib/mod_tile
chown osm:osm /var/lib/mod_tile
echo "LoadModule tile_module /usr/lib64/httpd/modules/mod_tile.so" > /etc/httpd/conf.modules.d/77-osm-server.conf


## ###60_osm-server_LOADDATA###
mkdir /usr/local/share/maps/planet
chown osm:osm /usr/local/share/maps/planet
wget -P /usr/local/share/maps/planet http://download.geofabrik.de/europe/germany/bayern-latest.osm.pbf
su osm -c "osm2pgsql --slim -d osm -C 5000 --number-processes 3 -S /usr/local/share/osm2pgsql/default.style /usr/local/share/maps/planet/bayern-latest.osm.pbf"


## ###60_osm-server_LEAFLET###


da ist bestimmt ein Beispiel dabei:

http://www.netzwolf.info/ol2/

grüße von lutz

Danke Dir. Leider für die 2er Version …

für Openlayers Version 3.X sollte es die meisten Hinweise vielleicht unter

http://gis.stackexchange.com

geben … such mal dort danach.

Moin,

hier ein Beispiel für OL3: http://openlayers.org/en/v3.2.1/examples/xyz.html?q=xyz

LG,

-moenk

Mich würde interessieren, warum man einen eigenen Server haben will?

Dient das der automatischen Lastverteilung?

Moin,

zum einen ist es nur fair einen eigenen Server zu haben wenn man richtig viele Besucher hat, aber das dürfte nur für die wenigsten zutreffen. Zum anderen möchte man vielleicht dass die Karte anders aussieht, also einen eigenen Style verwenden, vielleicht auch andere Features zeigen.

LG,

-moenk