User Tools

Site Tools


usage:modules:netmapper

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
usage:modules:netmapper [2020/04/12 04:56]
blockhead
usage:modules:netmapper [2020/04/12 10:03] (current)
blockhead external links, fix list of options, give an example
Line 1: Line 1:
 ====== Netmapper ====== ====== Netmapper ======
  
-''​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.+''​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.
  
-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.+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 ===== ===== Options =====
 +<​code>​
 +main.lua [-m file] [-t] [-w file] <​datapath>​
 +  <​datapath>​ represents the path to your minetest world.
 +  -m, --map-file ​   Only draw trains, requires an already-drawn file to draw on top of
 +  -t, --no-trains ​  Do not draw trains
 +  -w, --world-image Add a background world image. This is an external image, e.g.
 +                    from mtmapper that will be linked in the SVG output.
 +</​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>​ <​code>​
-main.lua ​[-m file] [-t] [-w file] <​datapath>​ <​mapppath>​ +luajit ​main.lua ​~/​minetest/​worlds/​ILikeTrains/​
--m, --map-file ​   Only draw trains, requires an already-drawn file to draw on top of +
--t, --no-trains ​  Do not draw trains +
--w, --world-image Overlay a world image (this is an external image, e.g. from mtmapper that will be linked in the SVG output)+
 </​code>​ </​code>​
 +
 +
usage/modules/netmapper.txt · Last modified: 2020/04/12 10:03 by blockhead