Week 3
This week the majority of the minimum functionality was completed, as well as testing most of the output formats. The min_level and max_level tags were also implemented, however their logic was implemented incorrectly and so I will be fixing this over the coming days. The other features added are below.
Cut holes in terrain
A problem identified last week was the fact that terrain would be rendered throughout a building. This is fine when you are only looking at the outside of buildings, however is obviously an issue when rendering indoor features. To avoid this, for any building in contact with the terrain and with indoor elements, the outline of that building will be cut from the terrain.
Config Options
To provide rendering options to the user a config file can be provided to OSM2World. This contains key value pairs that can be used to determine how (or if) objects are rendered. More information can be found here: https://wiki.openstreetmap.org/wiki/OSM2World/Configuration_file.
In previous weeks, to view indoor elements I would have to manually prevent outer walls from being rendered in the code, and it was difficult to view individual levels. To make it easier to do these things, as well as allowing a user to do these a few config options have been implemented:
noOuterWalls - Boolean
noRoofs - Boolean
renderLevels - List of Integer
notRenderLevels - List of Integer
With non of these options a building may be rendered like this:
noOuterWalls = true
noRoofs = true
renderLevels = 1,6,7,8,9,15
noOuterWalls = true
noRoofs = true
notRenderLevels = 1,2,3,4,5
If levels are defined in both renderLevels and notRenderLevels, notRenderLevels will take precedence and that level will not be rendered. In the following example only levels 8,9 and 15 are rendered.
noOuterWalls = true
noRoofs = true
renderLevels = 1,6,7,8,9,15
notRenderLevels = 1,6,7
If there are any other config options that you think would be useful, I would love to hear them.
Roof Levels
Roof levels have not been rendered up until now. Due to the possible complex roof shapes is is difficult to render an object with the right shape or even determine whether an object is contained within a roof. After some discussion with my mentor, roof levels will be rendered ignoring the shape of the roof. This will allow objects to protrude from the roof, or even not be contained within the roof at all. This may be fixed at a later date.