OSM2World/Configuration file

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — OSM2World/Configuration file
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް
OSM2World rendering using a different color scheme

When running OSM2World, it is possible to modify various aspects of the program's behaviour by providing a configuration text file with the --config <file> command line parameter.

File syntax

OSM2World uses the .properties file syntax. This means:

  • key = value pairs (one per line) define the actual options
  • use # or ! at the beginning of a line for a comment

Available options


To change the color used for the material MATERIAL_NAME, use the key material_MATERIAL_NAME_color and a hexadecimal RGB color value. Available material names can be found in the Materials.java source code file.

Example: material_TERRAIN_DEFAULT_color = #FFFFFF changes the color of "empty" terrain to white.

Elevation calculators

To change the strategy for elevation calculations, use the key elevationCalculator.

Avaliable strategies:

  • BridgeTunnelElevationCalculator - sets everything to elevation 0, except bridges and tunnels. No level support. Current default setting.
  • ZeroElevationCalculator - sets everything to elevation 0.
  • ForceElevationCalculator - advanced strategy that tries to take bridge/tunnel attributes, inclines etc. into account. Slow and buggy.
  • EleTagElevationCalculator - uses explicitly mapped ele tags only.
  • LevelTagElevationCalculator - uses explicitly mapped level tags only.

Note: The elevation calculation code is currently (May 2013) undergoing a major rewrite. Output and options are going to change.

Other options


  • drawBuildingWindows enables or disables windows on (certain types of) buildings
  • useBuildingColors enables or disables individual coloring of buildings based on OSM tags. Disable if you want all buildings colored as defined in this config file.


  • treesPerSquareMeter controls the tree density in forests
  • defaultTreeHeight default tree height outside of forests
  • defaultTreeHeightForest default tree height in forests


  • backgroundColor sets the background color in OpenGL. Hexadecimal RGB color value, defaults to #000000
  • backgroundImage allows using an image instead of a solid color as the background in OpenGL. The value contains the path to the image file.
  • canvasLimit tuning parameter, controls maximum size for each dimension of the OpenGL canvas used for PNG output. If this is lower than the width or height of the requested png, performance suffers. ncrease it if your graphics hardware is capable of handling larger sizes.
  • forceUnbufferedPNGRendering tuning parameter, true prevents the PNG export from buffering primitives. This reduces RAM usage, but can increase rendering time.


  • primitiveThresholdOBJ controls the approximate number of primitives per OBJ file in command line mode. If this parameter is used, OSM2World will create a directory with multiple OBJ files, rather than a single OBJ file. The name of the directory as passed to the --output/-o parameter still needs to end with .obj.


  • renderUnderground enables (default) or disables rendering of underground features
  • createTerrain enables (default) or disables creation of "empty" terrain
  • useBillboards enables or disables (default) the use of "billboards" (i.e. rectangles with textures) instead of proper geometry e.g. for trees. Recommended.