org.osm2world.core.world.modules.common
Class WorldModuleParseUtil

Object
  extended by WorldModuleParseUtil

public class WorldModuleParseUtil
extends Object

utility class that can be used by WorldModules to interpret frequently used value formats.


Method Summary
static String getValueWithFallback(String fallback, TagGroup tags, String... keys)
          returns the value of the first key that exists, or the fallback value if none of the keys exists
static float parseClearing(TagGroup tags, float defaultValue)
          retrieves clearing using (in this priority order) practical:maxheight tag, maxheight tag, defaultValue parameter
static double parseDirection(TagGroup tags, double defaultValue)
          parses the direction tag and returns the direction (or a default value) as radians
static float parseHeight(TagGroup tags, float defaultValue)
          retrieves height using (in this priority order) height tag, building:height tag, est_height tag, defaultValue parameter
static float parseWidth(TagGroup tags, float defaultValue)
          retrieves width using (in this priority order) width tag, est_width tag, defaultValue parameter
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getValueWithFallback

public static final String getValueWithFallback(String fallback,
                                                TagGroup tags,
                                                String... keys)
returns the value of the first key that exists, or the fallback value if none of the keys exists


parseWidth

public static final float parseWidth(TagGroup tags,
                                     float defaultValue)
retrieves width using (in this priority order) width tag, est_width tag, defaultValue parameter


parseHeight

public static final float parseHeight(TagGroup tags,
                                      float defaultValue)
retrieves height using (in this priority order) height tag, building:height tag, est_height tag, defaultValue parameter


parseClearing

public static final float parseClearing(TagGroup tags,
                                        float defaultValue)
retrieves clearing using (in this priority order) practical:maxheight tag, maxheight tag, defaultValue parameter


parseDirection

public static final double parseDirection(TagGroup tags,
                                          double defaultValue)
parses the direction tag and returns the direction (or a default value) as radians