Class: ADIWG::Mdtranslator::Writers::Simple_html::Html_ProjectionParameters
- Inherits:
-
Object
- Object
- ADIWG::Mdtranslator::Writers::Simple_html::Html_ProjectionParameters
- Defined in:
- lib/adiwg/mdtranslator/writers/simple_html/sections/html_projectionParameters.rb
Instance Method Summary collapse
-
#initialize(html) ⇒ Html_ProjectionParameters
constructor
A new instance of Html_ProjectionParameters.
- #writeHtml(hProjection) ⇒ Object
Constructor Details
#initialize(html) ⇒ Html_ProjectionParameters
Returns a new instance of Html_ProjectionParameters.
18 19 20 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_projectionParameters.rb', line 18 def initialize(html) @html = html end |
Instance Method Details
#writeHtml(hProjection) ⇒ Object
22 23 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 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/adiwg/mdtranslator/writers/simple_html/sections/html_projectionParameters.rb', line 22 def writeHtml(hProjection) # classes used identifierClass = Html_Identifier.new(@html) linePointClass = Html_ObliqueLinePoint.new() # projection parameters - projection identifier unless hProjection[:projectionIdentifier].empty? @html.div do @html.div('Projection Identifier', {'id' => 'projection-identifier', 'class' => 'h5'}) @html.div(:class => 'block') do identifierClass.writeHtml(hProjection[:projectionIdentifier]) end end end # projection parameters - grid system identifier unless hProjection[:gridIdentifier].empty? @html.div do @html.div('Grid System Identifier', {'id' => 'grid-system-identifier', 'class' => 'h5'}) @html.div(:class => 'block') do identifierClass.writeHtml(hProjection[:gridIdentifier]) end end end # projection parameters - zone unless hProjection[:gridZone].nil? @html.em('Grid System Zone: ') @html.text!(hProjection[:gridZone]) @html.br end # projection parameters - Standard Parallel 1 unless hProjection[:standardParallel1].nil? @html.em('Standard Parallel: ') @html.text!(hProjection[:standardParallel1].to_s) @html.br end # projection parameters - Standard Parallel 2 unless hProjection[:standardParallel2].nil? @html.em('Standard Parallel: ') @html.text!(hProjection[:standardParallel2].to_s) @html.br end # projection parameters - Longitude of Central Meridian unless hProjection[:longitudeOfCentralMeridian].nil? @html.em('Longitude of Central Meridian: ') @html.text!(hProjection[:longitudeOfCentralMeridian].to_s) @html.br end # projection parameters - latitude of projection origin unless hProjection[:latitudeOfProjectionOrigin].nil? @html.em('Latitude of Projection Origin: ') @html.text!(hProjection[:latitudeOfProjectionOrigin].to_s) @html.br end # projection parameters - false easting unless hProjection[:falseEasting].nil? @html.em('False Easting: ') @html.text!(hProjection[:falseEasting].to_s) @html.br end # projection parameters - false northing unless hProjection[:falseNorthing].nil? @html.em('False Northing: ') @html.text!(hProjection[:falseNorthing].to_s) @html.br end # projection parameters - false easting-northing units unless hProjection[:falseEastingNorthingUnits].nil? @html.em('False Easting-Northing Units: ') @html.text!(hProjection[:falseEastingNorthingUnits]) @html.br end # projection parameters - scale factor at equator unless hProjection[:scaleFactorAtEquator].nil? @html.em('Scale Factor at Equator: ') @html.text!(hProjection[:scaleFactorAtEquator].to_s) @html.br end # projection parameters - height of prospective point above surface unless hProjection[:heightOfProspectivePointAboveSurface].nil? @html.em('Height of Prospective Point Above Surface: ') @html.text!(hProjection[:heightOfProspectivePointAboveSurface].to_s) @html.br end # projection parameters - longitude of projection center unless hProjection[:longitudeOfProjectionCenter].nil? @html.em('Longitude of Projection Center: ') @html.text!(hProjection[:longitudeOfProjectionCenter].to_s) @html.br end # projection parameters - latitude of projection center unless hProjection[:latitudeOfProjectionCenter].nil? @html.em('Latitude of Projection Center: ') @html.text!(hProjection[:latitudeOfProjectionCenter].to_s) @html.br end # projection parameters - scale factor at center line unless hProjection[:scaleFactorAtCenterLine].nil? @html.em('Scale Factor at Center Line: ') @html.text!(hProjection[:scaleFactorAtCenterLine].to_s) @html.br end # projection parameters - scale factor at central meridian unless hProjection[:scaleFactorAtCentralMeridian].nil? @html.em('Scale Factor at Central Meridian: ') @html.text!(hProjection[:scaleFactorAtCentralMeridian].to_s) @html.br end # projection parameters - straight vertical longitude from pole unless hProjection[:straightVerticalLongitudeFromPole].nil? @html.em('Straight Vertical Longitude From Pole: ') @html.text!(hProjection[:straightVerticalLongitudeFromPole].to_s) @html.br end # projection parameters - scale factor at projection origin unless hProjection[:scaleFactorAtProjectionOrigin].nil? @html.em('Scale Factor at Projection Origin: ') @html.text!(hProjection[:scaleFactorAtProjectionOrigin].to_s) @html.br end # projection parameters - azimuthAngle unless hProjection[:azimuthAngle].nil? @html.em('Azimuth Angle: ') @html.text!(hProjection[:azimuthAngle].to_s) @html.br end # projection parameters - azimuth measure point longitude unless hProjection[:azimuthMeasurePointLongitude].nil? @html.em('Azimuth Measure Point Longitude: ') @html.text!(hProjection[:azimuthMeasurePointLongitude].to_s) @html.br end # projection parameters - oblique line point hProjection[:obliqueLinePoints].each do |hLinePoint| linePoint = linePointClass.writeHtml(hLinePoint) @html.em('Oblique Line Point: ' + linePoint) @html.br end # projection parameters - landsat number unless hProjection[:landsatNumber].nil? @html.em('Landsat Number: ') @html.text!(hProjection[:landsatNumber].to_s) @html.br end # projection parameters - landsat path unless hProjection[:landsatPath].nil? @html.em('Landsat Path: ') @html.text!(hProjection[:landsatPath].to_s) @html.br end # projection parameters - local unless hProjection[:local].empty? hLocal = hProjection[:local] # local fixed to earth @html.em('Local Coordinate System Fixed to Earth: ') @html.text!(hLocal[:fixedToEarth].to_s) @html.br # local description unless hLocal[:description].nil? @html.em('Local Coordinate System Description: ') @html.div(:class => 'block') do @html.text!(hLocal[:description]) end end # local georeference unless hLocal[:georeference].nil? @html.em('Local Coordinate System Georeference: ') @html.div(:class => 'block') do @html.text!(hLocal[:georeference]) end end end # # projection parameters - local planar description # unless hProjection[:localPlanarDescription].nil? # @html.em('Local Planar Description: ') # @html.div(:class => 'block') do # @html.text!(hProjection[:localPlanarDescription]) # end # end # # # projection parameters - local planar georeference # unless hProjection[:localPlanarGeoreference].nil? # @html.em('Local Planar Georeference: ') # @html.div(:class => 'block') do # @html.text!(hProjection[:localPlanarGeoreference]) # end # end # # # projection parameters - other grid description # unless hProjection[:otherGridDescription].nil? # @html.em('Other Grid Description: ') # @html.div(:class => 'block') do # @html.text!(hProjection[:otherGridDescription]) # end # end # # # projection parameters - other projection description # unless hProjection[:otherProjectionDescription].nil? # @html.em('Other Projection Description: ') # @html.div(:class => 'block') do # @html.text!(hProjection[:otherProjectionDescription]) # end # end end |