Class: GeographicElement
- Inherits:
-
Object
- Object
- GeographicElement
- Defined in:
- lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_geographicElement.rb
Instance Method Summary collapse
-
#initialize(xml) ⇒ GeographicElement
constructor
A new instance of GeographicElement.
- #writeXML(hGeoElement) ⇒ Object
Constructor Details
#initialize(xml) ⇒ GeographicElement
Returns a new instance of GeographicElement.
14 15 16 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_geographicElement.rb', line 14 def initialize(xml) @xml = xml end |
Instance Method Details
#writeXML(hGeoElement) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/adiwg/mdtranslator/writers/iso19115_2/classes/class_geographicElement.rb', line 18 def writeXML(hGeoElement) # classes used by MD_Metadata geoBBoxClass = EX_GeographicBoundingBox.new(@xml) geoBPolyClass = EX_BoundingPolygon.new(@xml) geoType = hGeoElement[:elementGeometry][:geoType] case geoType when 'BoundingBox' geoBBoxClass.writeXML(hGeoElement) when 'Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', 'MultiPolygon' geoBPolyClass.writeXML(hGeoElement) when 'MultiGeometry' geoBPolyClass.writeXML(hGeoElement) end end |