User Tools

Site Tools


usage:modules:netmapper

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Next revision Both sides next revision
usage:modules:netmapper [2020-04-12 04:55]
blockhead created
usage:modules:netmapper [2020-04-12 10:03]
blockhead external links, fix list of options, give an example
Line 1: Line 1:
-''advtrains_netmapper'' is an external program that reads the advtrains node database as well as the train save file. It uses these to produce a map of the railway network in a minetest world. It is written in Lua 5.1, so it is not compatible with 5.2 or above. You will need a command line lua interpreter to run it, available from the lua project, from the LuaJIT project, or through your package manager on linux.+====== Netmapper ======
  
-netmapper produces an SVG file that shows the straight and curved sections of tracks and shades them from blue to red in ascending height (y-coordinate). It also draws yellow circles at the front of trains and black text to indicate their Line Number property next to that circle. You can optionally overlay it on the output of another program like mtmapper for a complete map.+''advtrains_netmapper'' is an [[https://git.bananach.space/advtrains_netmapper.git/|external program]] that reads the advtrains node database as well as the train save file. It uses these to produce a map of the railway network in a minetest world. It is written in Lua 5.1, so it is not compatible with 5.2 or above. You will need a command line lua interpreter to run it, available from the lua project, from the LuaJIT project, or through your package manager on linux.
  
-====== Options ======+netmapper produces an SVG file that shows the straight and curved sections of tracks and shades them from blue to red in ascending height (y-coordinate). It also draws yellow circles at the front of trains and black text to indicate their Line Number property next to that circle. You can optionally overlay it on the output of another program like [[https://github.com/minetest/minetestmapper|mtmapper]] for a complete map. 
 + 
 +===== Options =====
 <code> <code>
-main.lua [-m file] [-t] [-w file] <datapath> <mapppath+main.lua [-m file] [-t] [-w file] <datapath> 
--m, --map-file    Only draw trains, requires an already-drawn file to draw on top of +  <datapathrepresents the path to your minetest world. 
--t, --no-trains   Do not draw trains +  -m, --map-file    Only draw trains, requires an already-drawn file to draw on top of 
--w, --world-image Overlay a world image (this is an external image, e.g. from mtmapper that will be linked in the SVG output)+  -t, --no-trains   Do not draw trains 
 +  -w, --world-image Add background world image. This is an external image, e.g. 
 +                    from mtmapper that will be linked in the SVG output.
 </code> </code>
 +
 +Output will always be to ''<datapath>/out.svg''. netmapper will always clobber any existing file there.
 +
 +===== Examples ====
 +Using the luajit interpreter, run netmapper on the world 'ILikeTrains'
 +<code>
 +luajit main.lua ~/minetest/worlds/ILikeTrains/
 +</code>
 +
 +
usage/modules/netmapper.txt · Last modified: 2023-12-11 06:09 by blockhead