Class: ADIWG::Mdtranslator::Writers::Fgdc::GeodeticReference
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Fgdc::GeodeticReference
- Defined in:
- lib/adiwg/mdtranslator/writers/fgdc/classes/class_geodeticReference.rb
Instance Method Summary collapse
-
#initialize(xml, hResponseObj) ⇒ GeodeticReference
constructor
A new instance of GeodeticReference.
- #writeXML(hGeodetic, inContext = nil) ⇒ Object
Constructor Details
#initialize(xml, hResponseObj) ⇒ GeodeticReference
18 19 20 21 22 |
# File 'lib/adiwg/mdtranslator/writers/fgdc/classes/class_geodeticReference.rb', line 18 def initialize(xml, hResponseObj) @xml = xml @hResponseObj = hResponseObj @NameSpace = ADIWG::Mdtranslator::Writers::Fgdc end |
Instance Method Details
#writeXML(hGeodetic, inContext = nil) ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/adiwg/mdtranslator/writers/fgdc/classes/class_geodeticReference.rb', line 24 def writeXML(hGeodetic, inContext = nil) # geodetic reference system 4.1.4.1 (horizdn) - horizontal datum name unless hGeodetic[:datumIdentifier].empty? @xml.tag!('horizdn', hGeodetic[:datumIdentifier][:identifier]) end if hGeodetic[:datumIdentifier].empty? && @hResponseObj[:writerShowTags] @xml.tag!('horizdn') end # geodetic reference system 4.1.4.2 (ellips) - ellipsoid name (required) unless hGeodetic[:ellipsoidIdentifier].empty? @xml.tag!('ellips', hGeodetic[:ellipsoidIdentifier][:identifier]) end if hGeodetic[:ellipsoidIdentifier].nil? @NameSpace.issueWarning(150, 'ellips') end # geodetic reference system 4.1.4.3 (semiaxis) - ellipsoid semi-major axis (required) unless hGeodetic[:semiMajorAxis].nil? @xml.tag!('semiaxis', hGeodetic[:semiMajorAxis]) end if hGeodetic[:semiMajorAxis].nil? @NameSpace.issueWarning(151, 'semiaxis') end # geodetic reference system 4.1.4.4 (denflat) - ellipsoid denominator of flattening ratio (required) unless hGeodetic[:denominatorOfFlatteningRatio].nil? @xml.tag!('denflat', hGeodetic[:denominatorOfFlatteningRatio]) end if hGeodetic[:denominatorOfFlatteningRatio].nil? @NameSpace.issueWarning(152, 'denflat') end end |