Enum Class SupportedTagKeys

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

public enum SupportedTagKeys extends 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.
Author:
Andrew Pavlin, KA2DDO
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    Indicates that this element has been abandoned from its original purpose.
    Specifies the level of administrative control associated with a boundary or border_type.
     
     
    Indicates that this Way is an enclosed area rather than an open polyline.
     
     
     
     
    Indicates that this Way is a bridge above some other feature.
    Indicates that this Way is a building rather than an open space.
     
    Primary color of a map feature.
     
     
     
     
     
    Flag indicating this OpenStreetMap record is defective and needs updating.
    Specifies if there are restrictions on transporting Hazardous Materials along this Way.
     
     
     
    ICAO or IATA abbreviation for an airport.
    Indicates that this Way or Node provides public Internet access.
    Indicates that the specified Way (probably an area) is an island within a body of water.
     
    Number of traffic lanes upon a Way (such as a divided highway).
    Specifies the Z-order of this Way relative to other Ways.
     
     
    Indicates that this Way or Node has artificial illumination.
     
     
    Specifies the maximum passage height for this Way (restrictions on over-size vehicles), or specifies the peak height or elevation for this Node.
    Specifies the maximum speed of travel along a Way.
    Specifies the maximum permitted vehicle weight for this Way (restrictions on over-size vehicles).
    Human-readable name of this Node or Way.
    English-language human-readable name of the Node or Way.
     
     
    alternate Highway route number or abbreviation.
    Indicates this Way has traffic in only one direction.
    Human-readable name of operator of this Node or Way.
     
     
     
    Highway route number or abbreviation.
     
    OpenSeaMap typing of sea-visible distinctive landmarks.
    New support for seamarks and the OpenSeaMap dataset.
     
    Indicates that this Node or Way is an underground train rather than a surface one.
    Indicates that some organization charges a toll or fee to travel on the Way.
     
    Indicates that this Way is a tunnel below some other feature.
    specifies the type of a Relation member.
     
     
     
    Width of a Way in LengthUnits.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final short
    The set of flags associated with this tag name.
    final boolean
    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.
    The encoding enum value for keying the value of this tag in the YAAC compressed map data format.
    static final short
    Specify that any value associated with this element should only be used for the specified YAAC attribute if a higher-priority tag key isn't providing the attribute.
    static final short
    Specify that this value could be just a Short object for a flags bit to OR in, or an AmenityType that also implies the IS_BUILDING flag bit.
    static final short
    Specify that if the value associated with this is stored, the IS_DISUSED flag should also be set on the generated Node or Way.
    static final short
    Specify that the value of this tag can be localized.
    static final short
    Specify that this tag applies to Nodes.
    static final short
    Specify that this tag applies to Relations.
    static final short
    Specify that this tag applies to Ways.
    static final short
    This tag only has "yes" or "no" values.
    static final short
    Specify the set of flags that indicate a record-type specific tag.
    final Class<? extends Enum>
    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

    Modifier and Type
    Method
    Description
    Translate the specified key's value to the appropriate data type.
    static void
    Load the hashmap that translates string into enum value instances, including using aliases for the official enums.
    final boolean
    supports(short checkFlags)
    Report whether this tag key applies to this class of GenericTaggedNode.
    final boolean
    Report whether this tag key applies to this class of GenericTaggedNode.
    value(String name)
    Get the SupportedTagKey enum corresponding to the specified name.
    Returns the enum constant of this class with the specified name.
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

  • Field Details

    • M_LOCALIZABLE

      public static final short M_LOCALIZABLE
      Specify that the value of this tag can be localized.
      See Also:
    • M_WAY_ONLY

      public static final short M_WAY_ONLY
      Specify that this tag applies to Ways.
      See Also:
    • M_NODE_ONLY

      public static final short M_NODE_ONLY
      Specify that this tag applies to Nodes.
      See Also:
    • M_YES_NO_ONLY

      public static final short M_YES_NO_ONLY
      This tag only has "yes" or "no" values.
      See Also:
    • M_RELATION_ONLY

      public static final short M_RELATION_ONLY
      Specify that this tag applies to Relations.
      See Also:
    • 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 tag key isn't providing the attribute. For example, "shop" should override "historic" in defining an AmenityType.
      See Also:
    • M_DISUSED

      public static final short M_DISUSED
      Specify that if the value associated with this is stored, the IS_DISUSED flag should also be set on the generated Node or Way. Typically, this will be used with the M_ALTERNATE bit.
      See Also:
    • M_BUILDING_AMENITY

      public static final short M_BUILDING_AMENITY
      Specify that this value could be just a Short object for a flags bit to OR in, or an AmenityType that also implies the IS_BUILDING flag bit.
      See Also:
    • MASK_CLASS_SPECIFIC

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

      public final short flags
      The set of flags associated with this tag name.
      See Also:
    • 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 Class<? extends 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:
  • Method Details

    • values

      public static SupportedTagKeys[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SupportedTagKeys valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      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(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
    • supports

      public final boolean supports(short checkFlags)
      Report whether this tag key applies to this class of GenericTaggedNode.
      Parameters:
      checkFlags - SupportedTagKeys flag bit to check (must be exactly one of the class specific flags)
      Returns:
      boolean true if this tag key is meaningful (for OSMLayer) for this
    • decodeValue

      public Object decodeValue(String value) throws DiscardOSMElementException
      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
      Throws:
      DiscardOSMElementException - if subclass thinks that this value implies the whole element (node, way, etc.) should be discarded