README.rst
1Minetest Mapper C++
2===================
3
4.. image:: https://travis-ci.org/minetest/minetestmapper.svg?branch=master
5 :target: https://travis-ci.org/minetest/minetestmapper
6
7A port of minetestmapper.py to C++ from https://github.com/minetest/minetest/tree/master/util.
8This version is both faster and provides more features than the now deprecated Python script.
9
10Requirements
11------------
12
13* libgd
14* sqlite3
15* LevelDB (optional, set ENABLE_LEVELDB=1 in CMake to enable)
16* hiredis library (optional, set ENABLE_REDIS=1 in CMake to enable)
17* Postgres libraries (optional, set ENABLE_POSTGRES=1 in CMake to enable)
18
19e.g. on Debian:
20^^^^^^^^^^^^^^^
21
22 sudo apt-get install libgd-dev libsqlite3-dev libleveldb-dev libhiredis-dev libpq-dev
23
24Windows
25^^^^^^^
26Minetestmapper for Windows can be downloaded here: https://github.com/minetest/minetestmapper/releases
27
28After extracting the archive, minetestmapper can be invoked from cmd.exe:
29::
30
31 cd C:\Users\yourname\Desktop\example\path
32 minetestmapper.exe --help
33
34Compilation
35-----------
36
37::
38
39 cmake . -DENABLE_LEVELDB=1
40 make -j2
41
42Usage
43-----
44
45`minetestmapper` has two mandatory paremeters, `-i` (input world path)
46and `-o` (output image path).
47
48::
49
50 ./minetestmapper -i ~/.minetest/worlds/my_world/ -o map.png
51
52
53Parameters
54^^^^^^^^^^
55
56bgcolor:
57 Background color of image, e.g. ``--bgcolor '#ffffff'``
58
59scalecolor:
60 Color of scale marks and text, e.g. ``--scalecolor '#000000'``
61
62playercolor:
63 Color of player indicators, e.g. ``--playercolor '#ff0000'``
64
65origincolor:
66 Color of origin indicator, e.g. ``--origincolor '#ff0000'``
67
68drawscale:
69 Draw scale(s) with tick marks and numbers, ``--drawscale``
70
71drawplayers:
72 Draw player indicators with name, ``--drawplayers``
73
74draworigin:
75 Draw origin indicator, ``--draworigin``
76
77drawalpha:
78 Allow nodes to be drawn with transparency (e.g. water), ``--drawalpha``
79
80extent:
81 Don't output any imagery, just print the extent of the full map, ``--extent``
82
83noshading:
84 Don't draw shading on nodes, ``--noshading``
85
86noemptyimage:
87 Don't output anything when the image would be empty, ``--noemptyimage``
88
89min-y:
90 Don't draw nodes below this y value, e.g. ``--min-y -25``
91
92max-y:
93 Don't draw nodes above this y value, e.g. ``--max-y 75``
94
95backend:
96 Override auto-detected map backend; supported: *sqlite3*, *leveldb*, *redis*, *postgresql*, e.g. ``--backend leveldb``
97
98geometry:
99 Limit area to specific geometry (*x:z+w+h* where x and z specify the lower left corner), e.g. ``--geometry -800:-800+1600+1600``
100
101zoom:
102 Apply zoom to drawn nodes by enlarging them to n*n squares, e.g. ``--zoom 4``
103
104colors:
105 Override auto-detected path to colors.txt, e.g. ``--colors ../minetest/mycolors.txt``
106
107scales:
108 Draw scales on specified image edges (letters *t b l r* meaning top, bottom, left and right), e.g. ``--scales tbr``
109
110exhaustive:
111 | Select if database should be traversed exhaustively or using range queries, available: *never*, *y*, *full*, *auto*
112 | Defaults to *auto*. You shouldn't need to change this, but doing so can improve rendering times on large maps.
113 | For these optimizations to work it is important that you set ``min-y`` and ``max-y`` when you don't care about the world below e.g. -60 and above 1000 nodes.
114