Class: VORuby::STC::V1_10::STC::PixelSpace
Overview
Type to specify a pixel space
Instance Attribute Summary
#coord_areas, #coord_sys, #coords
#id
Class Method Summary
collapse
Instance Method Summary
collapse
#==, #to_xml
#==, #to_xml
#element
Constructor Details
#initialize(options = {}) ⇒ PixelSpace
Returns a new instance of PixelSpace.
3134
3135
3136
3137
3138
|
# File 'lib/voruby/stc/1.10/stc.rb', line 3134
def initialize(options={})
raise_argument_required_error('pixel coordinate system') if !options.has_key?(:coord_sys)
raise_argument_required_error('pixel coordinate area') if !options.has_key?(:coord_areas)
super(options)
end
|
Class Method Details
.from_xml(xml) ⇒ Object
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
|
# File 'lib/voruby/stc/1.10/stc.rb', line 3161
def self.from_xml(xml)
root = element_from(xml)
options = {
:coord_sys => xml_to_obj(root, PixelCoordSystem, true),
:coords => xml_to_obj(root, PixelCoords, false, Coords),
:coord_areas => xml_to_obj(root, PixelCoordArea, true)
}
id = root.attributes.get_attribute_ns(obj_ns.uri, 'ID')
options[:id] = Id.new(id.value) if id
self.new(options)
end
|
Instance Method Details
#coord_areas=(a) ⇒ Object