Sha256: e0c98daa7abc20e3db0565a39517f390410b8ba8ea4bb8ff5ab4833d21d7deed
Contents?: true
Size: 721 Bytes
Versions: 2
Compression:
Stored size: 721 Bytes
Contents
module OGR module GeometryMixins module ContainerMixins include Enumerable # 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 containing changes. # # @yieldparam [OGR::Geometry] # @return [Enumerator] # @see http://gdal.org/1.11/ogr/ogr__api_8h.html#a6bac93150529a5c98811db29e289dd66 def each return enum_for(:each) unless block_given? geometry_count.times do |i| yield geometry_at(i) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ffi-gdal-1.0.0.beta7 | lib/ogr/geometry_mixins/container_mixins.rb |
ffi-gdal-1.0.0.beta6 | lib/ogr/geometry_mixins/container_mixins.rb |