lib/aixm/xy.rb in aixm-0.3.5 vs lib/aixm/xy.rb in aixm-0.3.6
- old
+ new
@@ -67,9 +67,15 @@
when :aixm then @long.to_dms(3).gsub(/[^\d.]/, '') + (@long.negative? ? 'W' : 'E')
else @long.round(8)
end
end
+ # @return [Boolean] +false+ if both longitude and latitude have zero DMS
+ # seconds which may indicate rounded or estimated coordinates
+ def seconds?
+ !(long.to_dms[-6,5].to_f.zero? && lat.to_dms[-6,5].to_f.zero?)
+ end
+
# @return [AIXM::Component::Geometry::Point] convert to point
def to_point
AIXM.point(xy: self)
end