Sha256: 999127c1694034432696417aae37c4d85b3d0dcdc263429803511854e9957676

Contents?: true

Size: 1013 Bytes

Versions: 23

Compression:

Stored size: 1013 Bytes

Contents

module AIXM

  # Characters recognized as symbols for "minute" in DMS notations
  MIN = %Q('\u2018\u2019\u00b4).freeze

  # Characters recognized as symbols for "second" in DMS notations
  SEC = %Q("\u201c\u201d\u201f).freeze

  # Pattern matching geographical coordinates in various DMS notations
  DMS_RE = %r(
    (?<dms>
      (?<sgn>-)?
      (?<deg>\d{1,3})[° ]{1,2}
      (?<min>\d{2})[#{MIN}#{SEC} ]{1,2}
      (?<sec>\d{2}(?:[\.,]\d{0,2})?)[#{SEC}#{MIN} ]{0,2}
      (?<hem_ne>[NE])?(?<hem_sw>[SW])?
    |
      (?<sgn>-)?
      (?<deg>\d{1,3})
      (?<min>\d{2})
      (?<sec>\d{2}(?:[\.,]\d{0,2})?)
      (?:(?<hem_ne>[NE])|(?<hem_sw>[SW]))
    )
  )xi.freeze

  # Pattern matching PCN surface strength notations
  PCN_RE = %r(
    (?<pcn>
      (?<capacity>\d+)\W+
      (?<type>[RF])\W+
      (?<subgrade>[A-D])\W+
      (?<tire_pressure>[W-Z])\W+
      (?<evaluation_method>[TU])
    )
  )x.freeze

  # Pattern matching timetable working hour codes
  H_RE = /(?<code>H24|HJ|HN|HX|HO)/.freeze

end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
aixm-0.3.7 lib/aixm/constants.rb
aixm-0.3.6 lib/aixm/constants.rb
aixm-0.3.5 lib/aixm/constants.rb