Class: Kamelopard::Lod

Inherits:
Object
  • Object
show all
Defined in:
lib/kamelopard/classes.rb

Overview

Corresponds to the LOD (Level of Detail) object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(minpixels, maxpixels, minfade, maxfade) ⇒ Lod

Returns a new instance of Lod.



2267
2268
2269
2270
2271
2272
# File 'lib/kamelopard/classes.rb', line 2267

def initialize(minpixels, maxpixels, minfade, maxfade)
    @minpixels = minpixels
    @maxpixels = maxpixels
    @minfade = minfade
    @maxfade = maxfade
end

Instance Attribute Details

#maxfadeObject

Returns the value of attribute maxfade.



2266
2267
2268
# File 'lib/kamelopard/classes.rb', line 2266

def maxfade
  @maxfade
end

#maxpixelsObject

Returns the value of attribute maxpixels.



2266
2267
2268
# File 'lib/kamelopard/classes.rb', line 2266

def maxpixels
  @maxpixels
end

#minfadeObject

Returns the value of attribute minfade.



2266
2267
2268
# File 'lib/kamelopard/classes.rb', line 2266

def minfade
  @minfade
end

#minpixelsObject

Returns the value of attribute minpixels.



2266
2267
2268
# File 'lib/kamelopard/classes.rb', line 2266

def minpixels
  @minpixels
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
# File 'lib/kamelopard/classes.rb', line 2274

def to_kml(elem = nil)
    k = XML::Node.new 'Lod'
    m = XML::Node.new 'minLodPixels'
    m << @minpixels.to_s
    k << m
    m = XML::Node.new 'maxLodPixels'
    m << @maxpixels.to_s
    k << m
    m = XML::Node.new 'minFadeExtent'
    m << @minfade.to_s
    k << m
    m = XML::Node.new 'maxFadeExtent'
    m << @maxfade.to_s
    k << m
    elem << k unless elem.nil?
    k
end