org.ka2ddo.yaac.osm
Enum SupportedTagKeys

java.lang.Object
  extended by java.lang.Enum<SupportedTagKeys>
      extended by org.ka2ddo.yaac.osm.SupportedTagKeys
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<SupportedTagKeys>

public enum SupportedTagKeys
extends java.lang.Enum<SupportedTagKeys>

This enum defines the names of OpenStreetMap tags the OSMLayer renderer might care about, which therefore should be saved in the imported tile files. Other tags present in the raw OSM XML file will be discarded during import, as they are not considered relevant to actually plotting a map for the user.

See Also:
OsmXmlSegmenter, OSMLayerEnum

Enum Constant Summary
admin_level
          Specifies the level of administrative control associated with a boundary or border_type.
aeroway
           
amenity
           
area
          Indicates that this Way is an enclosed area rather than an open polyline.
border_type
           
boundary
           
bridge
          Indicates that this Way is a bridge above some other feature.
building
          Indicates that this Way is a building rather than an open space.
craft
           
emergency
           
fixme
          Flag indicating this OpenStreetMap record is defective and needs updating.
hazmat
          Specifies if there are restrictions on transporting Hazardous Materials along this Way.
highway
           
historic
           
icao
          ICAO or IATA abbreviation for an airport.
internet_access
          Indicates that this Way or Node provides public Internet access.
island
          Indicates that the specified Way (probably an area) is an island within a body of water.
landuse
           
lanes
          Number of traffic lanes upon a Way (such as a divided highway).
layer
          Specifies the Z-order of this Way relative to other Ways.
leisure
           
lit
          Indicates that this Way or Node has artificial illumination.
man_made
           
maxheight
          Specifies the maximum passage height for this Way (restrictions on over-size vehicles).
maxspeed
          Specifies the maximum speed of travel along a Way.
maxweight
          Specifies the maximum permitted vehicle weight for this Way (restrictions on over-size vehicles).
name
          Human-readable name of this Node or Way.
name_en
          English-language human-readable name of the Node or Way.
natural
           
office
           
old_ref
          alternate Highway route number or abbreviation.
oneway
          Indicates this Way has traffic in only one direction.
place
           
power
           
railway
           
ref
          Highway route number or abbreviation.
religion
           
shop
           
subway
          Indicates that this Node or Way is an underground train rather than a surface one.
toll
          Indicates that some organization charges a toll or fee to travel on the Way.
tourism
           
tunnel
          Indicates that this Way is a tunnel below some other feature.
type
          specifies the type of a Relation member.
waterway
           
width
          Width of a Way in LengthUnits.
 
Field Summary
 short flags
          The set of flags associated with this tag name.
 boolean isAmenityOrWay
          Flag indicating whether the osmEnumType is for a OSM enumeration that can be translated into either a WayType or an AmenityType, depending on the specific value of the enumeration.
 OSMLayerEnum logicalEnum
          The encoding enum value for keying the value of this tag in the YAAC compressed map data format.
static short M_ALTERNATE
          Specify that any value associated with this element should only be used for the specified YAAC attribute if a higher-priority type isn't specified.
static short M_LOCALIZABLE
          Specify that the value of this tag can be localized.
static short M_NODE_ONLY
          Specify that this tag applies to Nodes.
static short M_RELATION_ONLY
          Specify that this tag applies to Relations.
static short M_WAY_ONLY
          Specify that this tag applies to Ways.
static short M_YES_NO_ONLY
          This tag only has "yes" or "no" values.
static short MASK_CLASS_SPECIFIC
          Specify the set of flags that indicate a record-type specific tag.
 java.lang.Class<? extends java.lang.Enum> osmEnumType
          The data type for the enumeration used for the value of this tag, or null if not an enumerated value or multiple possible types.
 
Method Summary
 java.lang.Object decodeValue(java.lang.String value)
          Translate the specified key's value to the appropriate data type.
static void initValueMap()
          Load the hashmap that translates string into enum value instances, including using aliases for the official enums.
 boolean supports(GenericTaggedNode obj)
          Report whether this tag key applies to this class of GenericTaggedNode.
static SupportedTagKeys value(java.lang.String name)
          Get the SupportedTagKey enum corresponding to the specified name.
static SupportedTagKeys valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static SupportedTagKeys[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

highway

public static final SupportedTagKeys highway
See Also:
Highway

waterway

public static final SupportedTagKeys waterway
See Also:
Waterway

railway

public static final SupportedTagKeys railway
See Also:
Railway

aeroway

public static final SupportedTagKeys aeroway
See Also:
Aeroway

power

public static final SupportedTagKeys power
See Also:
Power

amenity

public static final SupportedTagKeys amenity
See Also:
AmenityType

craft

public static final SupportedTagKeys craft
See Also:
AmenityType

office

public static final SupportedTagKeys office
See Also:
AmenityType

shop

public static final SupportedTagKeys shop
See Also:
AmenityType

emergency

public static final SupportedTagKeys emergency
See Also:
AmenityType

historic

public static final SupportedTagKeys historic
See Also:
AmenityType

boundary

public static final SupportedTagKeys boundary
See Also:
Boundary

internet_access

public static final SupportedTagKeys internet_access
Indicates that this Way or Node provides public Internet access.


area

public static final SupportedTagKeys area
Indicates that this Way is an enclosed area rather than an open polyline.


building

public static final SupportedTagKeys building
Indicates that this Way is a building rather than an open space.


subway

public static final SupportedTagKeys subway
Indicates that this Node or Way is an underground train rather than a surface one.


bridge

public static final SupportedTagKeys bridge
Indicates that this Way is a bridge above some other feature. @see #layer


lit

public static final SupportedTagKeys lit
Indicates that this Way or Node has artificial illumination.


tunnel

public static final SupportedTagKeys tunnel
Indicates that this Way is a tunnel below some other feature. @see #layer


oneway

public static final SupportedTagKeys oneway
Indicates this Way has traffic in only one direction.


toll

public static final SupportedTagKeys toll
Indicates that some organization charges a toll or fee to travel on the Way.


name

public static final SupportedTagKeys name
Human-readable name of this Node or Way.


name_en

public static final SupportedTagKeys name_en
English-language human-readable name of the Node or Way.


ref

public static final SupportedTagKeys ref
Highway route number or abbreviation.


old_ref

public static final SupportedTagKeys old_ref
alternate Highway route number or abbreviation.


border_type

public static final SupportedTagKeys border_type
See Also:
BorderType

natural

public static final SupportedTagKeys natural
See Also:
Natural

man_made

public static final SupportedTagKeys man_made
See Also:
Man_Made

landuse

public static final SupportedTagKeys landuse
See Also:
LandUse

icao

public static final SupportedTagKeys icao
ICAO or IATA abbreviation for an airport.


leisure

public static final SupportedTagKeys leisure
See Also:
Leisure

fixme

public static final SupportedTagKeys fixme
Flag indicating this OpenStreetMap record is defective and needs updating.


width

public static final SupportedTagKeys width
Width of a Way in LengthUnits.


lanes

public static final SupportedTagKeys lanes
Number of traffic lanes upon a Way (such as a divided highway).


island

public static final SupportedTagKeys island
Indicates that the specified Way (probably an area) is an island within a body of water. @see #area


place

public static final SupportedTagKeys place
See Also:
Place

layer

public static final SupportedTagKeys layer
Specifies the Z-order of this Way relative to other Ways. @see #bridge @see #tunnel


admin_level

public static final SupportedTagKeys admin_level
Specifies the level of administrative control associated with a boundary or border_type.


type

public static final SupportedTagKeys type
specifies the type of a Relation member.


maxspeed

public static final SupportedTagKeys maxspeed
Specifies the maximum speed of travel along a Way.


maxheight

public static final SupportedTagKeys maxheight
Specifies the maximum passage height for this Way (restrictions on over-size vehicles).


maxweight

public static final SupportedTagKeys maxweight
Specifies the maximum permitted vehicle weight for this Way (restrictions on over-size vehicles).


hazmat

public static final SupportedTagKeys hazmat
Specifies if there are restrictions on transporting Hazardous Materials along this Way.


religion

public static final SupportedTagKeys religion
See Also:
Religion

tourism

public static final SupportedTagKeys tourism
See Also:
AmenityType, Tourism
Field Detail

M_LOCALIZABLE

public static final short M_LOCALIZABLE
Specify that the value of this tag can be localized.

See Also:
Constant Field Values

M_WAY_ONLY

public static final short M_WAY_ONLY
Specify that this tag applies to Ways.

See Also:
Constant Field Values

M_NODE_ONLY

public static final short M_NODE_ONLY
Specify that this tag applies to Nodes.

See Also:
Constant Field Values

M_YES_NO_ONLY

public static final short M_YES_NO_ONLY
This tag only has "yes" or "no" values.

See Also:
Constant Field Values

M_RELATION_ONLY

public static final short M_RELATION_ONLY
Specify that this tag applies to Relations.

See Also:
Constant Field Values

M_ALTERNATE

public static final short M_ALTERNATE
Specify that any value associated with this element should only be used for the specified YAAC attribute if a higher-priority type isn't specified. For example, "shop" should override "historic" in defining an AmenityType.

See Also:
Constant Field Values

MASK_CLASS_SPECIFIC

public static final short MASK_CLASS_SPECIFIC
Specify the set of flags that indicate a record-type specific tag.

See Also:
Constant Field Values

flags

public final short flags
The set of flags associated with this tag name.

See Also:
M_LOCALIZABLE, M_NODE_ONLY, M_RELATION_ONLY, M_WAY_ONLY, M_YES_NO_ONLY

logicalEnum

public final OSMLayerEnum logicalEnum
The encoding enum value for keying the value of this tag in the YAAC compressed map data format.


osmEnumType

public final java.lang.Class<? extends java.lang.Enum> osmEnumType
The data type for the enumeration used for the value of this tag, or null if not an enumerated value or multiple possible types.


isAmenityOrWay

public final boolean isAmenityOrWay
Flag indicating whether the osmEnumType is for a OSM enumeration that can be translated into either a WayType or an AmenityType, depending on the specific value of the enumeration. Corresponds to an Enum implementing the AmenityOrWay interface, but extracted here to save processing time at import.

See Also:
osmEnumType, WayType, AmenityType, AmenityOrWay
Method Detail

values

public static SupportedTagKeys[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (SupportedTagKeys c : SupportedTagKeys.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static SupportedTagKeys valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

initValueMap

public static void initValueMap()
Load the hashmap that translates string into enum value instances, including using aliases for the official enums.


value

public static SupportedTagKeys value(java.lang.String name)
Get the SupportedTagKey enum corresponding to the specified name.

Parameters:
name - String name or alias of SupportedTagKey to find
Returns:
matching SupportedTagKey, or null if no match

supports

public final boolean supports(GenericTaggedNode obj)
Report whether this tag key applies to this class of GenericTaggedNode.

Parameters:
obj - GenericTaggedNode to test
Returns:
boolean true if this tag key is meaningful (for OSMLayer) for this

decodeValue

public java.lang.Object decodeValue(java.lang.String value)
Translate the specified key's value to the appropriate data type. Expected to be overridden for specific keys. Default behavior is to return either a non-zero-length trimmed String, or null.

Parameters:
value - String attribute value from the XML file
Returns:
Object encoding of the value for this attribute type