lib/aixm/feature/obstacle_group.rb in aixm-1.0.0 vs lib/aixm/feature/obstacle_group.rb in aixm-1.1.0
- old
+ new
@@ -43,10 +43,11 @@
public_class_method :new
# @!method obstacles
# @return [Array<AIXM::Feature::Obstacle>] obstacles in this obstacle group
+ #
# @!method add_obstacle(obstacle, linked_to: nil, link_type: nil)
# @param obstacle [AIXM::Feature::Obstacle] obstacle instance
# @param linked_to [Symbol, AIXM::Feature::Obstacle, nil] Either:
# * :previous - link to the obstacle last added to the obstacle group
# * AIXM::Feature::Obstacle - link to this specific obstacle
@@ -60,14 +61,17 @@
end
end
# @!method source
# @return [String] reference to source of the feature data
+ #
# @!method name
# @return [String] obstacle group name
+ #
# @!method xy_accuracy
# @return [AIXM::D, nil] margin of error for circular base center point
+ #
# @!method z_accuracy
# @return [AIXM::D, nil] margin of error for top point
%i(source name xy_accuracy z_accuracy).each do |method|
define_method method do
instance_variable_get(:"@#{method}") || obstacles.first&.send(method)
@@ -124,14 +128,14 @@
builder.comment! "Obstacle group: #{name}".strip
builder.Ogr({ source: (source if AIXM.ofmx?) }.compact) do |ogr|
ogr << to_uid.indent(2)
ogr.codeDatum('WGE')
if xy_accuracy
- ogr.valGeoAccuracy(xy_accuracy.dist.trim)
+ ogr.valGeoAccuracy(xy_accuracy.dim.trim)
ogr.uomGeoAccuracy(xy_accuracy.unit.upcase.to_s)
end
if z_accuracy
- ogr.valElevAccuracy(z_accuracy.to_ft.dist.round)
+ ogr.valElevAccuracy(z_accuracy.to_ft.dim.round)
ogr.uomElevAccuracy('FT')
end
ogr.txtRmk(remarks) if remarks
end
end