Class: VORuby::STC::V1_30::IntersectionType
- Inherits:
-
RegionType
- Object
- STCBaseType
- CoordIntervalType
- SpatialIntervalType
- RegionType
- VORuby::STC::V1_30::IntersectionType
- Defined in:
- lib/voruby/stc/1.30/stc.rb
Overview
The intersection of two or more regions is a region.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#regions ⇒ Object
Returns the value of attribute regions.
Attributes inherited from RegionType
#area, #coord_system_id, #note
Attributes inherited from SpatialIntervalType
Attributes inherited from CoordIntervalType
#fill_factor, #frame_id, #hi_include, #lo_include
Attributes included from STCReference
#id, #idref, #ucd, #xlink_href, #xlink_type
Class Method Summary collapse
Instance Method Summary collapse
- #==(u) ⇒ Object
-
#initialize(regions, area = nil, lo_include = true, hi_include = true, options = {}) ⇒ IntersectionType
constructor
A new instance of IntersectionType.
- #to_s ⇒ Object
- #to_xml(name = nil) ⇒ Object
Methods inherited from RegionType
Methods inherited from SpatialIntervalType
Methods inherited from CoordIntervalType
coord_interval_from_xml, #hi_include?, #lo_include?
Methods inherited from STCBaseType
Methods included from STCReference
#stc_reference_eq, stc_reference_from_xml, #stc_reference_to_xml
Methods included from SerializableToXml
Constructor Details
#initialize(regions, area = nil, lo_include = true, hi_include = true, options = {}) ⇒ IntersectionType
Returns a new instance of IntersectionType.
5971 5972 5973 5974 |
# File 'lib/voruby/stc/1.30/stc.rb', line 5971 def initialize(regions, area=nil, lo_include=true, hi_include=true, ={}) super(area, lo_include, hi_include, ) self.regions = regions end |
Instance Attribute Details
#regions ⇒ Object
Returns the value of attribute regions.
5969 5970 5971 |
# File 'lib/voruby/stc/1.30/stc.rb', line 5969 def regions @regions end |
Class Method Details
.from_xml(xml) ⇒ Object
6003 6004 6005 6006 6007 6008 6009 6010 |
# File 'lib/voruby/stc/1.30/stc.rb', line 6003 def self.from_xml(xml) root = element_from(xml) self.new( RegionList.new(xml_to_obj(root, Region)), *RegionType.region_from_xml(root) ) end |
Instance Method Details
#==(u) ⇒ Object
5985 5986 5987 5988 |
# File 'lib/voruby/stc/1.30/stc.rb', line 5985 def ==(u) super(u) and self.regions = u.regions end |
#to_s ⇒ Object
5999 6000 6001 |
# File 'lib/voruby/stc/1.30/stc.rb', line 5999 def to_s "INTERSECT(#{self.regions})" end |
#to_xml(name = nil) ⇒ Object
5990 5991 5992 5993 5994 5995 5996 5997 |
# File 'lib/voruby/stc/1.30/stc.rb', line 5990 def to_xml(name=nil) el = super(name) self.regions.each{ |r| el.add_element(r.to_xml) } collapse_namespaces(el) el end |