org.osm2world.core.world.modules.common
public class WorldModuleParseUtil extends Object
WorldModule
s
to interpret frequently used value formats.Modifier and Type | Method and Description |
---|---|
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 int |
parseInt(TagGroup tags,
int defaultValue,
String key) |
static float |
parseLength(TagGroup tags,
float defaultValue)
retrieves length using (in this priority order)
length tag, defaultValue parameter
|
static float |
parseWidth(TagGroup tags,
float defaultValue)
retrieves width using (in this priority order)
width tag, est_width tag, defaultValue parameter
|
public static final String getValueWithFallback(String fallback, TagGroup tags, String... keys)
public static final float parseWidth(TagGroup tags, float defaultValue)
public static final float parseLength(TagGroup tags, float defaultValue)
public static final float parseHeight(TagGroup tags, float defaultValue)
public static final float parseClearing(TagGroup tags, float defaultValue)
public static final double parseDirection(TagGroup tags, double defaultValue)
public static final int parseInt(TagGroup tags, int defaultValue, String key)