tile.libre.is working
This commit is contained in:
parent
5d7ee06f06
commit
6d1f665ff7
|
@ -9,7 +9,7 @@ msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: Libre Developers Documentation 0\n"
|
"Project-Id-Version: Libre Developers Documentation 0\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-09-15 08:41-0600\n"
|
"POT-Creation-Date: 2024-09-15 09:18-0600\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language: en\n"
|
"Language: en\n"
|
||||||
|
@ -45,3 +45,103 @@ msgid ""
|
||||||
"`<https://switch2osm.org/serving-tiles/manually-building-a-tile-server-"
|
"`<https://switch2osm.org/serving-tiles/manually-building-a-tile-server-"
|
||||||
"debian-12/>`_"
|
"debian-12/>`_"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:15
|
||||||
|
msgid "Debian"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:16
|
||||||
|
msgid "Install deps."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:28
|
||||||
|
msgid "PostGIS"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:29 ../../../_source/tile-libre-is.rst:83
|
||||||
|
#: ../../../_source/tile-libre-is.rst:92 ../../../_source/tile-libre-is.rst:103
|
||||||
|
msgid "Thusly."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:38
|
||||||
|
msgid "At the Postgres prompt:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:51
|
||||||
|
msgid "Carto"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:52
|
||||||
|
msgid "Set up Openstreet map Carto:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:64
|
||||||
|
msgid "Map Data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:65
|
||||||
|
msgid "Just using Azerbaijan for example, until more disk is available..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:82
|
||||||
|
msgid "Indexes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:91
|
||||||
|
msgid "Shapefiles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:102
|
||||||
|
msgid "Fonts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:111
|
||||||
|
msgid "renderd"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:112
|
||||||
|
msgid ""
|
||||||
|
"Edit /etc/renderd.conf thusly, add to bottom, changing \"accountname\" to "
|
||||||
|
"the user used above:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:124
|
||||||
|
msgid ""
|
||||||
|
"Edit /usr/lib/systemd/system/renderd.service and add to [Service] section:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:132
|
||||||
|
msgid "Apache"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:133
|
||||||
|
msgid "Thusly..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:149
|
||||||
|
msgid "Then go check it here:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:151
|
||||||
|
msgid "`<http://tile.libre.is/hot/0/0/0.png>`_"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:154
|
||||||
|
msgid "View Tiles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:155
|
||||||
|
msgid "Thus."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:164
|
||||||
|
msgid "Using Tiles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:165
|
||||||
|
msgid "See:"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../../_source/tile-libre-is.rst:167
|
||||||
|
msgid "`<https://switch2osm.org/using-tiles/>`_"
|
||||||
|
msgstr ""
|
||||||
|
|
|
@ -11,3 +11,159 @@ Self-hosting tiles for maps.
|
||||||
|
|
||||||
`<https://switch2osm.org/serving-tiles/manually-building-a-tile-server-debian-12/>`_
|
`<https://switch2osm.org/serving-tiles/manually-building-a-tile-server-debian-12/>`_
|
||||||
|
|
||||||
|
Debian
|
||||||
|
======
|
||||||
|
Install deps.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
sudo apt install sudo screen locate libapache2-mod-tile renderd git tar \
|
||||||
|
unzip wget bzip2 apache2 lua5.1 mapnik-utils python3-mapnik \
|
||||||
|
python3-psycopg2 python3-yaml gdal-bin node-carto postgresql \
|
||||||
|
postgresql-contrib postgis postgresql-15-postgis-3 \
|
||||||
|
postgresql-15-postgis-3-scripts osm2pgsql net-tools curl
|
||||||
|
|
||||||
|
|
||||||
|
PostGIS
|
||||||
|
=======
|
||||||
|
Thusly.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
sudo -u postgres -i
|
||||||
|
createuser _renderd
|
||||||
|
createdb -E UTF8 -O _renderd gis
|
||||||
|
psql
|
||||||
|
|
||||||
|
At the Postgres prompt:
|
||||||
|
|
||||||
|
.. code-block:: psql
|
||||||
|
|
||||||
|
\c gis
|
||||||
|
CREATE EXTENSION postgis;
|
||||||
|
CREATE EXTENSION hstore;
|
||||||
|
ALTER TABLE geometry_columns OWNER TO _renderd;
|
||||||
|
ALTER TABLE spatial_ref_sys OWNER TO _renderd;
|
||||||
|
\q
|
||||||
|
|
||||||
|
|
||||||
|
Carto
|
||||||
|
=====
|
||||||
|
Set up Openstreet map Carto:
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
mkdir ~/src
|
||||||
|
cd ~/src
|
||||||
|
git clone https://github.com/gravitystorm/openstreetmap-carto
|
||||||
|
cd openstreetmap-carto
|
||||||
|
carto project.mml > mapnik.xml
|
||||||
|
|
||||||
|
|
||||||
|
Map Data
|
||||||
|
========
|
||||||
|
Just using Azerbaijan for example, until more disk is available...
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
mkdir ~/data
|
||||||
|
cd ~/data
|
||||||
|
wget https://download.geofabrik.de/asia/azerbaijan-latest.osm.pbf
|
||||||
|
# meh, should have separate user...
|
||||||
|
chmod o+rx ~
|
||||||
|
sudo -u _renderd osm2pgsql -d gis --create --slim -G --hstore \
|
||||||
|
--tag-transform-script ~/src/openstreetmap-carto/openstreetmap-carto.lua \
|
||||||
|
-C 2500 --number-processes 1 \
|
||||||
|
-S ~/src/openstreetmap-carto/openstreetmap-carto.style \
|
||||||
|
~/data/azerbaijan-latest.osm.pbf
|
||||||
|
|
||||||
|
|
||||||
|
Indexes
|
||||||
|
=======
|
||||||
|
Thusly.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd ~/src/openstreetmap-carto/
|
||||||
|
sudo -u _renderd psql -d gis -f indexes.sql
|
||||||
|
|
||||||
|
Shapefiles
|
||||||
|
==========
|
||||||
|
Thusly.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd ~/src/openstreetmap-carto/
|
||||||
|
mkdir data
|
||||||
|
sudo chown _renderd data
|
||||||
|
sudo -u _renderd scripts/get-external-data.py
|
||||||
|
|
||||||
|
Fonts
|
||||||
|
=====
|
||||||
|
Thusly.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd ~/src/openstreetmap-carto/
|
||||||
|
scripts/get-fonts.sh
|
||||||
|
|
||||||
|
renderd
|
||||||
|
=======
|
||||||
|
Edit /etc/renderd.conf thusly, add to bottom,
|
||||||
|
changing "accountname" to the user used above:
|
||||||
|
|
||||||
|
.. code-block:: cfg
|
||||||
|
|
||||||
|
[s2o]
|
||||||
|
URI=/hot/
|
||||||
|
XML=/home/accountname/src/openstreetmap-carto/mapnik.xml
|
||||||
|
HOST=localhost
|
||||||
|
TILESIZE=256
|
||||||
|
MAXZOOM=20
|
||||||
|
|
||||||
|
Edit /usr/lib/systemd/system/renderd.service and add to
|
||||||
|
[Service] section:
|
||||||
|
|
||||||
|
.. code-block:: cfg
|
||||||
|
|
||||||
|
Environment=G_MESSAGES_DEBUG=all
|
||||||
|
|
||||||
|
Apache
|
||||||
|
======
|
||||||
|
Thusly...
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd /etc/apache2/conf-available/
|
||||||
|
sudo wget https://raw.githubusercontent.com/openstreetmap/mod_tile/python-implementation/etc/apache2/renderd.conf
|
||||||
|
sudo a2enconf renderd
|
||||||
|
sudo systemctl reload apache2
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl restart renderd
|
||||||
|
sudo systemctl restart apache2
|
||||||
|
sudo mkdir /var/lib/mod_tile
|
||||||
|
sudo chown _renderd /var/lib/mod_tile
|
||||||
|
sudo /etc/init.d/renderd restart
|
||||||
|
sudo /etc/init.d/apache2 restart
|
||||||
|
|
||||||
|
Then go check it here:
|
||||||
|
|
||||||
|
`<http://tile.libre.is/hot/0/0/0.png>`_
|
||||||
|
|
||||||
|
View Tiles
|
||||||
|
==========
|
||||||
|
Thus.
|
||||||
|
|
||||||
|
.. code-block:: sh
|
||||||
|
|
||||||
|
cd /var/www/html
|
||||||
|
sudo wget https://raw.githubusercontent.com/SomeoneElseOSM/mod_tile/switch2osm/extra/sample_leaflet.html
|
||||||
|
sudo mv sample_leaflet.html index.html
|
||||||
|
sudo sed -i -e 's/127.0.0.1/tile.libre.is/g' index.html
|
||||||
|
|
||||||
|
Using Tiles
|
||||||
|
===========
|
||||||
|
See:
|
||||||
|
|
||||||
|
`<https://switch2osm.org/using-tiles/>`_
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue