aixm 1.5.1 → 1.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d3771e796263217c6b52588b5646798dbffe20a7c66f3f71da80d04b18dad32e
4
- data.tar.gz: abd545b3cdf9f98f8d707b2358ec4df4c2f6c579dbe7b32003b69b12582b5c7f
3
+ metadata.gz: 2f15f731570d6e2185715ca2fda17ebcdb7ddb9fe00a333b7ed205972b965214
4
+ data.tar.gz: 76d1b21058af9f934f3c6573cec026a50744e9876182323c234a493a9b538423
5
5
  SHA512:
6
- metadata.gz: 318d08a571780676fd1e4ab60b4a87a9e9195d79816c15965e7beb40541b7780615fc4ba147f268d076e0ba4520225f01fe5580772a5563a1ed2265fed727a13
7
- data.tar.gz: e31f3b267dbf3aaf6db3335fafe483c1e544dd639042b5414afde18cb0e77a8de3372f53d43067f3fc863a7677da431e0a02ee9b1aaab488c0fc76969bbe8d0a
6
+ metadata.gz: f8b2dd2ec57514a2049ee4ecc5f6333f886591e9e7e33163b0098c3a6437972f7b922e2427fa2f295d52ff1843e494e1d7b9cdcdaa78af97a80cf031f7ba3c8a
7
+ data.tar.gz: 6b179a684539e5667c56f63844a792cdb577883bb4415b0e66aa616f885a67a0998341635cb33425954a579c875c7ac936b94c5605c2f585ce7f59a2abf54f37
checksums.yaml.gz.sig CHANGED
Binary file
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  Nothing so far
4
4
 
5
+ ## 1.5.2
6
+
7
+ ### Changes
8
+ * Adopt update of OFMX which added three new airspace types such as
9
+ `:radio_mandatory_zone`
10
+
5
11
  ## 1.5.1
6
12
 
7
13
  ### Changes
@@ -26,11 +26,14 @@ module AIXM
26
26
  # character digest from +type+, +local_type+ and +name+.
27
27
  #
28
28
  # Some regions define additional airspace types. In LF (France) for
29
- # intance, the types RMZ (radio mandatory zone) and TMZ (transponder
30
- # mandatory zone) exist. Such airspaces are usually specified together
31
- # with a generic type such as +:regulated_airspace+:
29
+ # instance, the types RMZ (radio mandatory zone) and TMZ (transponder
30
+ # mandatory zone) exist. These have been added as proper types in OFMX as
31
+ # per {OFMX_TYPES}, however, AIXM encodes them as +:regulated_airspace+ with
32
+ # a local type of +RMZ+ or +TMZ+ respectively. In other words: For AIXM, the
33
+ # following two are identical:
32
34
  #
33
- # airspace= AIXM.airspace(type: :regulated_airspace, local_type: "RMZ")
35
+ # AIXM.airspace(type: :radio_mandatory_zone)
36
+ # AIXM.airspace(type: :regulated_airspace, local_type: "RMZ")
34
37
  #
35
38
  # @see https://gitlab.com/openflightmaps/ofmx/wikis/Airspace#ase-airspace
36
39
  class Airspace < Feature
@@ -38,7 +41,7 @@ module AIXM
38
41
 
39
42
  public_class_method :new
40
43
 
41
- TYPES = {
44
+ COMMON_TYPES = {
42
45
  NAS: :national_airspace_system,
43
46
  FIR: :flight_information_region,
44
47
  'FIR-P': :part_of_flight_information_region,
@@ -81,6 +84,14 @@ module AIXM
81
84
  PART: :part_of_airspace
82
85
  }.freeze
83
86
 
87
+ OFMX_TYPES = {
88
+ DRA: :drone_area,
89
+ RMZ: :radio_mandatory_zone,
90
+ TMZ: :transponder_mandatory_zone
91
+ }.freeze
92
+
93
+ TYPES = COMMON_TYPES.merge OFMX_TYPES
94
+
84
95
  # @!method geometry
85
96
  # @return [AIXM::Component::Geometry] horizontal geometry shape
86
97
  #
@@ -106,18 +117,18 @@ module AIXM
106
117
  # @param value [String]
107
118
  attr_reader :id
108
119
 
109
- # Type of airspace (see {TYPES})
120
+ # Type of airspace (see {COMMON_TYPES} and {OFMX_TYPES})
110
121
  #
111
122
  # @overload type
112
- # @return [Symbol] any of {TYPES}
123
+ # @return [Symbol] any of {COMMON_TYPES} or {OFMX_TYPES}
113
124
  # @overload type=(value)
114
- # @param value [Symbol] any of {TYPES}
125
+ # @param value [Symbol] any of {COMMON_TYPES} or {OFMX_TYPES}
115
126
  attr_reader :type
116
127
 
117
128
  # Local type.
118
129
  #
119
- # Some regions define additional local types such as "RMZ" or "TMZ". They
120
- # are often further specifying type +:regulated_airspace+.
130
+ # Some regions define additional local types. They are usually further
131
+ # specifying type +:regulated_airspace+.
121
132
  #
122
133
  # @overload local_type
123
134
  # @return [String, nil]
@@ -184,9 +195,14 @@ module AIXM
184
195
  # @!visibility private
185
196
  def add_uid_to(builder, as: :AseUid)
186
197
  builder.send(as, ({ region: (region if AIXM.ofmx?) }.compact)) do |tag|
187
- tag.codeType(TYPES.key(type))
188
- tag.codeId(id)
189
- tag.txtLocalType(local_type) if AIXM.ofmx? && local_type && local_type != name
198
+ if AIXM.ofmx?
199
+ tag.codeType(TYPES.key(type))
200
+ tag.codeId(id)
201
+ tag.txtLocalType(local_type) if local_type?
202
+ else
203
+ tag.codeType(COMMON_TYPES.key(type) || 'RAS')
204
+ tag.codeId(id)
205
+ end
190
206
  end
191
207
  end
192
208
 
@@ -205,7 +221,10 @@ module AIXM
205
221
  builder.Ase({ source: (source if AIXM.ofmx?) }.compact) do |ase|
206
222
  ase.comment(indented_comment) if comment
207
223
  add_uid_to(ase)
208
- ase.txtLocalType(local_type) if AIXM.aixm? && local_type && local_type != name
224
+ if AIXM.aixm?
225
+ ofmx_type = OFMX_TYPES.key(type)
226
+ ase.txtLocalType(ofmx_type || local_type) if ofmx_type || local_type?
227
+ end
209
228
  ase.txtName(name) if name
210
229
  ase.txtNameAlt(alternative_name) if AIXM.ofmx? && alternative_name
211
230
  layers.first.add_to(ase) unless layered?
@@ -249,6 +268,10 @@ module AIXM
249
268
 
250
269
  private
251
270
 
271
+ def local_type?
272
+ local_type && local_type != name
273
+ end
274
+
252
275
  def layered?
253
276
  layers.count > 1
254
277
  end
data/lib/aixm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module AIXM
2
- VERSION = "1.5.1".freeze
2
+ VERSION = "1.5.2".freeze
3
3
  end
@@ -3033,6 +3033,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3033
3033
  <xsd:enumeration value="PROTECT"/>
3034
3034
  <xsd:enumeration value="AMA"/>
3035
3035
  <xsd:enumeration value="ASR"/>
3036
+ <xsd:enumeration value="RMZ"/>
3037
+ <xsd:enumeration value="TMZ"/>
3038
+ <xsd:enumeration value="DRA"/>
3036
3039
  </xsd:restriction>
3037
3040
  </xsd:simpleType>
3038
3041
  <xsd:complexType name="codeTypeAs">
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aixm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sven Schwyn
@@ -27,7 +27,7 @@ cert_chain:
27
27
  k/QvZU05f6HMYBrPogJgIzHC/C5N/yeE4BVEuBDn+10Zb1iu3aDk8sd0uMgukCY8
28
28
  TUmlP5A6NeGdeDJIoLgromAKs+nvI7TWzhQq9ODs51XhxgUFRCvBqUTpjTQigw==
29
29
  -----END CERTIFICATE-----
30
- date: 2024-04-26 00:00:00.000000000 Z
30
+ date: 2024-05-29 00:00:00.000000000 Z
31
31
  dependencies:
32
32
  - !ruby/object:Gem::Dependency
33
33
  name: bigdecimal
@@ -330,7 +330,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
330
330
  - !ruby/object:Gem::Version
331
331
  version: '0'
332
332
  requirements: []
333
- rubygems_version: 3.5.9
333
+ rubygems_version: 3.5.11
334
334
  signing_key:
335
335
  specification_version: 4
336
336
  summary: Builder for AIXM/OFMX aeronautical information
metadata.gz.sig CHANGED
Binary file