module OGR::GeometryMixins::ContainerMixins
Public Instance Methods
collection?()
click to toggle source
# File lib/ogr/extensions/geometry/container_mixins.rb, line 19 def collection? true end
each() { |geometry_at(i)| ... }
click to toggle source
Iterates over each geometry in the container geometry. Per ‘OGR` docs, the yielded geometry should not be modified; if you need to do something to that geometry, you should {{#clone}} it. Additionally, the yielded geometry is only valid until the container changes.
@yieldparam [OGR::Geometry] @return [Enumerator] @see gdal.org/1.11/ogr/ogr__api_8h.html#a6bac93150529a5c98811db29e289dd66
# File lib/ogr/extensions/geometry/container_mixins.rb, line 31 def each return enum_for(:each) unless block_given? geometry_count.times do |i| yield geometry_at(i) end end