Fix osm-bright to work with newer osm-carto DB

master
Vitaliy Filippov 2018-04-02 23:16:02 +03:00
parent f944b63aeb
commit 9fff6897c5
2 changed files with 9 additions and 1 deletions

View File

@ -6,6 +6,7 @@ EOF
cat >/etc/apache2/sites-enabled/000-default.conf <<EOF
<VirtualHost ${RENDERD_LISTEN_ADDR:-*:80}>
ServerAdmin webmaster@localhost
ServerName renderd
DocumentRoot /var/www/html
ErrorLog \${APACHE_LOG_DIR}/error.log
CustomLog \${APACHE_LOG_DIR}/access.log combined

9
renderd/run Normal file → Executable file
View File

@ -32,7 +32,14 @@ sed -i -e "s|^config\[\"path\"\].*|config\[\"path\"\] = \"$(pwd)\"|" \
./make.py
cd OSMBright
perl -pe 's/"srs": null,//' project.mml > project.local.mml
cat >fix-mml.pl <<EOF
#!/usr/bin/perl -p
s/"srs": null,//;
s/name, z_order \\\n FROM planet_osm_point \\\n WHERE railway = 'station'\\\n ORDER BY z_order NULLS LAST/name FROM planet_osm_point WHERE railway = 'station'/;
s/z_order, population\\\n FROM planet_osm_point/(tags->'population') population FROM planet_osm_point/;
EOF
perl -p fix-mml.pl < project.mml > project.local.mml
carto project.local.mml > style.xml
exec sudo -u www-data LD_LIBRARY_PATH=/usr/local/lib/ /usr/local/bin/renderd -f --config /usr/local/etc/renderd.conf