Class: RGeo::Geos::ZMGeometryCollectionImpl

Inherits:
ZMGeometryImpl show all
Includes:
Enumerable
Defined in:
lib/rgeo/geos/zm_impl.rb

Overview

:nodoc:

Direct Known Subclasses

ZMMultiLineStringImpl, ZMMultiPolygonImpl

Constant Summary

Constants inherited from ZMGeometryImpl

RGeo::Geos::ZMGeometryImpl::TYPE_KLASSES

Instance Method Summary collapse

Methods inherited from ZMGeometryImpl

#as_binary, #as_text, #boundary, #buffer, #contains?, #convex_hull, create, #crosses?, #difference, #dimension, #disjoint?, #distance, #envelope, #eql?, #equals?, #factory, #geometry_type, #initialize, #inspect, #intersection, #intersects?, #is_empty?, #is_simple?, #m_geometry, #overlaps?, #relate, #srid, #sym_difference, #to_s, #touches?, #union, #within?, #z_geometry

Constructor Details

This class inherits a constructor from RGeo::Geos::ZMGeometryImpl

Instance Method Details

#eachObject



359
360
361
362
363
# File 'lib/rgeo/geos/zm_impl.rb', line 359

def each
  num_geometries.times do |i_|
    yield geometry_n(i_)
  end
end

#geometry_n(n_) ⇒ Object Also known as: []



353
354
355
# File 'lib/rgeo/geos/zm_impl.rb', line 353

def geometry_n(n_)
  ZMGeometryImpl.create(@factory, @zgeometry.geometry_n(n_), @mgeometry.geometry_n(n_))
end

#num_geometriesObject Also known as: size



347
348
349
# File 'lib/rgeo/geos/zm_impl.rb', line 347

def num_geometries
  @zgeometry.num_geometries
end