H
H
HighMan2021-11-19 14:41:47
linux
HighMan, 2021-11-19 14:41:47

How to export png from TILE server?

Hello colleagues.
I've been doing something, lately, with questions ...
The task is as follows: somehow overtake the tile server into a large pile of PNGs. To pay with hard, not computing power.
At the moment, a working Postgis-Mapnik TILE server has been raised. As a manual, I used
use.openstreetmap.ru/serving-tiles/manually-buildi...
After a little casting, the server started working...
I sawed this server on a virtual machine with 2GB of RAM and two cores... What can I say.. Map of Azerbaijan (as one of the smaller ones) is displayed slowly and reluctantly. Lack of computing power. And this is with a map of Azerbaijan. If you stuff a map of Russia into it, then ... It's scary to think.
Of course, in production computing power will be incomparably higher, but without fanaticism.
Therefore, there is a desire to convert everything into pictures and slip them in accordance with the location and scale.
Yes. I understand that the places of the picture will be eaten up without measure, but it will come out cheaper than the computing power for rendering on the fly.
The only thing left is to somehow adapt the existing tile server as an image generator. That's just how to do it - has not yet figured out.
Share your thoughts. I will be very grateful.

PS I want to share one wrong in the manual:
"Loading a shape-file"

cd ~/src/openstreetmap-carto/
scripts/get-shapefiles.py

There is no such script!
Need: ./scripts/get-exteral-data.py
Call exactly from the "external" directory ./openstreetmap-carto. Otherwise, the script will not find the required files.
Well, you also need to pip3 a couple of extensions.
Still for me there was a misunderstanding with "View tiles". Written in a very loose way.
In general, you need to copy ./mod_tile/extra/sample_leaflet.html to the working directory of the WEB server /vat/www/html and change the line in this file
L.tileLayer('http://127.0.0.1/hot/{z}/{x}/{y}.png', {

You need to change 127.0.0.1 if you are going to view your artwork from an external machine to the IP address of the machine where the tile server is located.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pfg21, 2021-11-19
@pfg21

generate tiles and turn off until the next regen.
collect through httpd logs which tiles are interesting to users and regenerate them only.
fasten tile update requests to /dirty for example

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question