aixm 1.5.1 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/CHANGELOG.md +11 -0
- data/lib/aixm/document.rb +16 -2
- data/lib/aixm/feature/airspace.rb +37 -14
- data/lib/aixm/version.rb +1 -1
- data/schemas/ofmx/0.2/OFMX-DataTypes.xsd +3 -0
- data/schemas/ofmx/0.2/OFMX-Snapshot.xsd +5 -0
- data.tar.gz.sig +0 -0
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 671355726ab63cc24fc7796c42f3001ca40798fb198945bc786e5d138ae13f1b
|
4
|
+
data.tar.gz: 146b0bac038dccf60dac009579b6d9d15730343f26b15208779f26ef71f689a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ff1e357cf8ff8eb4f34e0bc26aea1ac88711c0369ef10be08dfe78674db5234310e3b45978df7f379041bd073ce268eecbfbd413b74d9508894394a00460714b
|
7
|
+
data.tar.gz: 6518686433b57562855fb04c43280bdab036a867451baa65669e55ab783b7cd924549198813efefd22447f9968af75fe9002a94806b98d6459766da1f1916018
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
|
3
3
|
Nothing so far
|
4
4
|
|
5
|
+
## 1.5.3
|
6
|
+
|
7
|
+
### Additions
|
8
|
+
* `Document#sourced_at` to track last update of upstream source data
|
9
|
+
|
10
|
+
## 1.5.2
|
11
|
+
|
12
|
+
### Changes
|
13
|
+
* Adopt update of OFMX which added three new airspace types such as
|
14
|
+
`:radio_mandatory_zone`
|
15
|
+
|
5
16
|
## 1.5.1
|
6
17
|
|
7
18
|
### Changes
|
data/lib/aixm/document.rb
CHANGED
@@ -8,6 +8,7 @@ module AIXM
|
|
8
8
|
# ===Cheat Sheet in Pseudo Code:
|
9
9
|
# document = AIXM.document(
|
10
10
|
# namespace: String (UUID)
|
11
|
+
# sourced_at: Time or Date or String or nil
|
11
12
|
# created_at: Time or Date or String
|
12
13
|
# effective_at: Time or Date or String
|
13
14
|
# expiration_at: Time or Date or String or nil
|
@@ -37,6 +38,14 @@ module AIXM
|
|
37
38
|
# @param value [String]
|
38
39
|
attr_reader :namespace
|
39
40
|
|
41
|
+
# Last upstream source data update date and UTC time
|
42
|
+
#
|
43
|
+
# @overload sourced_at
|
44
|
+
# @return [Time]
|
45
|
+
# @overload sourced_at=(value)
|
46
|
+
# @param value [Time, nil]
|
47
|
+
attr_reader :sourced_at
|
48
|
+
|
40
49
|
# Creation date and UTC time
|
41
50
|
#
|
42
51
|
# @overload created_at
|
@@ -63,9 +72,9 @@ module AIXM
|
|
63
72
|
|
64
73
|
# See the {cheat sheet}[AIXM::Document] for examples on how to create
|
65
74
|
# instances of this class.
|
66
|
-
def initialize(namespace: nil, created_at: nil, effective_at: nil, expiration_at: nil)
|
75
|
+
def initialize(namespace: nil, sourced_at: nil, created_at: nil, effective_at: nil, expiration_at: nil)
|
67
76
|
self.namespace = namespace
|
68
|
-
self.created_at, self.effective_at, self.expiration_at = created_at, effective_at, expiration_at
|
77
|
+
self.sourced_at, self.created_at, self.effective_at, self.expiration_at = sourced_at, created_at, effective_at, expiration_at
|
69
78
|
end
|
70
79
|
|
71
80
|
# @return [String]
|
@@ -78,6 +87,10 @@ module AIXM
|
|
78
87
|
@namespace = value || SecureRandom.uuid
|
79
88
|
end
|
80
89
|
|
90
|
+
def sourced_at=(value)
|
91
|
+
@sourced_at = value&.to_time&.round
|
92
|
+
end
|
93
|
+
|
81
94
|
def created_at=(value)
|
82
95
|
@created_at = if time = value&.to_time
|
83
96
|
time.round
|
@@ -161,6 +174,7 @@ module AIXM
|
|
161
174
|
origin: "rubygem aixm-#{AIXM::VERSION}",
|
162
175
|
namespace: (namespace if AIXM.ofmx?),
|
163
176
|
regions: (regions.join(' '.freeze) if AIXM.ofmx?),
|
177
|
+
sourced: (@sourced_at&.utc&.xmlschema if AIXM.ofmx?),
|
164
178
|
created: @created_at.utc.xmlschema,
|
165
179
|
effective: @effective_at.utc.xmlschema,
|
166
180
|
expiration: (@expiration_at&.utc&.xmlschema if AIXM.ofmx?)
|
@@ -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
|
-
#
|
30
|
-
# mandatory zone) exist.
|
31
|
-
#
|
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
|
-
#
|
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
|
-
|
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 {
|
120
|
+
# Type of airspace (see {COMMON_TYPES} and {OFMX_TYPES})
|
110
121
|
#
|
111
122
|
# @overload type
|
112
|
-
# @return [Symbol] any of {
|
123
|
+
# @return [Symbol] any of {COMMON_TYPES} or {OFMX_TYPES}
|
113
124
|
# @overload type=(value)
|
114
|
-
# @param value [Symbol] any of {
|
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
|
120
|
-
#
|
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
|
-
|
188
|
-
|
189
|
-
|
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
|
-
|
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
@@ -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">
|
@@ -172,6 +172,11 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
172
172
|
<xsd:documentation>Regions used throughout this document</xsd:documentation>
|
173
173
|
</xsd:annotation>
|
174
174
|
</xsd:attribute>
|
175
|
+
<xsd:attribute name="sourced" type="dateTimeZulu">
|
176
|
+
<xsd:annotation>
|
177
|
+
<xsd:documentation>The date and time when the upstream data used for this message was last updated</xsd:documentation>
|
178
|
+
</xsd:annotation>
|
179
|
+
</xsd:attribute>
|
175
180
|
<xsd:attribute name="created" type="dateTimeZulu" use="required">
|
176
181
|
<xsd:annotation>
|
177
182
|
<xsd:documentation>The date and time when the message was created</xsd:documentation>
|
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.
|
4
|
+
version: 1.5.3
|
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-
|
30
|
+
date: 2024-09-09 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.
|
333
|
+
rubygems_version: 3.5.18
|
334
334
|
signing_key:
|
335
335
|
specification_version: 4
|
336
336
|
summary: Builder for AIXM/OFMX aeronautical information
|
metadata.gz.sig
CHANGED
Binary file
|