Generates maps of minetest and freeminer worlds
Clone or download
Pull request Compare This branch is 269 commits ahead, 32 commits behind sfan5:master.
Rogier-5 Add an option to prevent keeping sqlite3 database locked for too long
While prescanning a large database, minetestmapper may keep the database
locked for too long, causing minetest to complain, and even bail out
sometimes. Minetest will print warnings like:

	SQLite3 database has been locked for <duration>

The new option --sqlite3-limit-prescan-query-size limits the number
of records queried from the database in a single query, thus limiting
the duration of the lock.

If minetest kept the database locked for 1 second or more, *and* if
the database was modified in that time, minetestmapper will issue a warning,
and suggest using --sqlite3-limit-prescan-query-size.
Latest commit a270c60 Aug 2, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
MSVC Add a function to obtain relative millisecond-timestamps Aug 3, 2016
cmake Detect libstdc++ ABI incompatibility to allow compiling using clang a… Jun 28, 2016
doc Add an option to prevent keeping sqlite3 database locked for too long Aug 3, 2016
dumpnodes Explicitly set the color of xpanes:bar_* only when computing it failed Nov 26, 2015
.gitattributes Setup VisualStudio project files May 31, 2016
.gitignore Add Batch script to update versioninfo.h file May 31, 2016
AUTHORS Document and (attempt to) clarify licensing situation Mar 26, 2014
BlockPos.cpp Remove some old debug code Jul 18, 2016
BlockPos.h Remove some old debug code Jul 18, 2016
CMakeCPackLists.txt Make cpack fail if the current git commit id does not match the one a… Aug 3, 2016
CMakeLists.txt Make cpack fail if the current git commit id does not match the one a… Aug 3, 2016
COPYING Document and (attempt to) clarify licensing situation Mar 26, 2014
Changelog Add an option to prevent keeping sqlite3 database locked for too long Aug 3, 2016
CharEncodingConverter.cpp Rename cmake_config.h to build_config.h, and don't make it optional May 31, 2016
CharEncodingConverter.h Convert text drawn on the map to ISO8859-2 (which is what libgd uses) Jan 17, 2016
CharEncodingConverterIConv.cpp Fix compilation failure on FreeBSD using gcc4.x Jul 18, 2016
CharEncodingConverterIConv.h Convert text drawn on the map to ISO8859-2 (which is what libgd uses) Jan 17, 2016
Color.cpp Use strlower() instead of tolower() and strcasecmp() where possible. Jan 17, 2016
Color.h Add a colors.txt node flag for air-type nodes (nodes will be treated … Jan 17, 2016
LICENSE Document and (attempt to) clarify licensing situation Mar 26, 2014
LICENSE.BSD-2clause Document and (attempt to) clarify licensing situation Mar 26, 2014
LICENSE.LGPLv2.1 Document and (attempt to) clarify licensing situation Mar 26, 2014
PixelAttributes.cpp When using transparency, don't compute new value when pixel is alread… Nov 13, 2015
PixelAttributes.h Use cstdint instead of stdint.h to (hopefully) fix any problems cause… May 31, 2015
PlayerAttributes.cpp Player attributes moved to separate class. Sep 1, 2012
PlayerAttributes.h Player attributes moved to separate class. Sep 1, 2012
README.rst Small update to README.rst Jun 18, 2016
Settings.cpp Fix parsing of config file where '=' is not preceded by space Dec 16, 2015
Settings.h Add Settings class for reading config files Dec 16, 2015
TileGenerator.cpp Fix various compiler warnings on MSVC Jun 18, 2016
TileGenerator.h Fix --prescan-world=disabled-force does not work Jun 14, 2016
ZlibDecompressor.cpp Fix various compiler warnings on MSVC Jun 18, 2016
ZlibDecompressor.h Improve error messages for zlib decompression errors May 22, 2014
base-version Create new release (20160531) May 31, 2016
build_config.h.in Detect libstdc++ ABI incompatibility to allow compiling using clang a… Jun 28, 2016
colors-average-alpha.txt Update color files for added nodes in default minetest game Nov 25, 2015
colors-cumulative-alpha.txt Update color files for added nodes in default minetest game Nov 25, 2015
colors.txt Update color files for added nodes in default minetest game Nov 25, 2015
config.h Rename cmake_config.h to build_config.h, and don't make it optional May 31, 2016
db-leveldb.cpp Detect libstdc++ ABI incompatibility to allow compiling using clang a… Jun 28, 2016
db-leveldb.h Implement bounded block-list query for postgresql Jan 17, 2016
db-postgresql.cpp Add support for the official postgresql backend implementation May 22, 2016
db-postgresql.h Make minetestmapper compile on fedora Jun 17, 2016
db-redis.cpp Disable some unused code to avoid the resulting compiler warning Jan 18, 2016
db-redis.h Implement bounded block-list query for postgresql Jan 17, 2016
db-sqlite3.cpp Add an option to prevent keeping sqlite3 database locked for too long Aug 3, 2016
db-sqlite3.h Add an option to prevent keeping sqlite3 database locked for too long Aug 3, 2016
db.h Close database when done May 23, 2016
heightmap-colors-rainbow.txt Add rainbow colors configuration file for heightmap Feb 20, 2015
heightmap-colors.txt Allow reading heightmap colors from file, and use separate option for… Feb 20, 2015
heightmap-nodes.txt Update color files for added nodes in default minetest game Nov 25, 2015
mapper.cpp Add an option to prevent keeping sqlite3 database locked for too long Aug 3, 2016
minetest-database.h Fix various compiler warnings on MSVC Jun 18, 2016
minetestmapper.sln Setup VisualStudio project files May 31, 2016
package-description.txt Add postgresql support Dec 16, 2015
porting.h Add a function to obtain relative millisecond-timestamps Aug 3, 2016
porting_posix.h Add a function to obtain relative millisecond-timestamps Aug 3, 2016
porting_win32.h Add a function to obtain relative millisecond-timestamps Aug 3, 2016
types.h Use a common ustring type definition instead of different custom vers… May 22, 2014
util.h Fix various compiler warnings on MSVC Jun 18, 2016

README.rst

Minetest Mapper

A tool to generate maps of minetest and freeminer worlds.

Quick links (functional on github. Elsewhere possibly not):

All features:doc/features.rst
User manual:doc/manual.rst
Changelog:Changelog
Building:doc/build-instructions.rst
Github:https://github.com/Rogier-5/minetest-mapper-cpp
Submitting bugs:https://github.com/Rogier-5/minetest-mapper-cpp/issues
Binary downloads:https://github.com/Rogier-5/minetest-mapper-cpp/wiki/Downloads
Generating colors.txt:dumpnodes/README.dumpnodes

Features (short list)

Map Generation Features

  • Support for both minetest and freeminer worlds
  • Support for sqlite3, postgresql, leveldb and redis map databases
  • Generate a subsection of the map, or a full map (but note that the size of generated images is limited)
  • Generate regular maps or height-maps
  • All colors for regular or height maps are configurable
  • Draw player positions
  • Draw different geometric figures, or text on the map
  • Draw the map at a reduced scale. E.g. 1:4.
  • Draw a scale on the left and/or top side of the map, and/or a height scale (for height maps) on the bottom.
  • Optionally draw some nodes transparently (e.g. water)
  • Includes User Manual
  • Includes scripts to aid in generating a color definition file.

Build Features

  • Supports both the gcc and clang compiler suites
  • Supports MSVC building on Windows (with SQLite3 and LevelDB)
    • With automatic downloading of all but one of the required libraries.
  • Build rpm, deb and/or tar.gz installation packages. Or simply type 'make install'.

Quick Start

Windows

Check the download page to obtain a compiled version: https://github.com/Rogier-5/minetest-mapper-cpp/wiki/Downloads

Or check the building instructions for compiling using MSVC: doc/build-instructions.rst.

Install Dependencies

Make sure development versions of the following packages are installed. For more detailed instructions, see doc/build-instructions.rst.

Libraries:

  • zlib
  • libgd
  • sqlite3 (not mandatory. See doc/build-instructions.rst.
  • postgresql (if postgresql support is desired)
  • leveldb (if leveldb support is desired)
  • hiredis (if redis support is desired)

Build environment:

  • C++ compiler suite (clang or gcc)
  • cmake
  • make

Other:

  • python-docutils (if documentation in html format is desired)

Compile

Plain:

cmake .
make

With levelDB and Redis support:

cmake -DENABLE_LEVELDB=true -DENABLE_REDIS=true .
make

Generate a Map

After compilation, and optional installation, minetestmapper is started as follows:

('\' is a continuation character - the command-line continues on the next line. Type return only after the line that does not end with the continuation character)

minetestmapper \
    --input <world-directory> \
    --output <image-file-name.png>

If the world is not too large, and if minetestmapper is installed in a system directory, it will most likely work as expected.

Possibly, minetestmapper will not be able to find a colors.txt file. If that happens, the colors.txt file can be specified on the command-line:

minetestmapper \
    --input <world-directory> \
    --output <image-file-name.png> \
    --colors <filename>

Or the colors.txt file must be installed in a location where minetestmapper will find it. A colors.txt file (named colors.txt, in lowercase) in the world's directory will certainly be found. Depending on the system and the configuration, other locations are available. Use the following command to find out which:

minetestmapper \
    --input <world-directory> \
    --output <image-file-name.png> \
    --verbose-search-colors=2

Manual

For more elaborate compilation and installation documentation, please consult the build manual: doc/build-instructions.rst.

For more elaborate usage instruction, please consult the user manual: doc/manual.rst.