Module: RGeo::Geos::ZMGeometryCollectionMethods
- Includes:
- Enumerable
- Defined in:
- lib/rgeo/geos/zm_feature_methods.rb
Overview
:nodoc:
Instance Method Summary collapse
- #each ⇒ Object
- #geometry_n(idx) ⇒ Object (also: #[])
- #num_geometries ⇒ Object (also: #size)
Instance Method Details
#each ⇒ Object
329 330 331 332 333 334 335 336 337 338 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 329 def each if block_given? num_geometries.times do |i| yield geometry_n(i) end self else enum_for end end |
#geometry_n(idx) ⇒ Object Also known as: []
324 325 326 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 324 def geometry_n(idx) @factory.create_feature(nil, @zgeometry.geometry_n(idx), @mgeometry.geometry_n(idx)) end |
#num_geometries ⇒ Object Also known as: size
319 320 321 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 319 def num_geometries @zgeometry.num_geometries end |