Class: RGeo::Geos::ZMPolygonImpl

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

Overview

:nodoc:

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

#areaObject



297
298
299
# File 'lib/rgeo/geos/zm_impl.rb', line 297

def area
  @zgeometry.area
end

#centroidObject



302
303
304
# File 'lib/rgeo/geos/zm_impl.rb', line 302

def centroid
  ZMPointImpl.create(@factory, @zgeometry.centroid, @mgeometry.centroid)
end

#exterior_ringObject



312
313
314
# File 'lib/rgeo/geos/zm_impl.rb', line 312

def exterior_ring
  ZMLineStringImpl.create(@factory, @zgeometry.exterior_ring, @mgeometry.exterior_ring)
end

#interior_ring_n(n_) ⇒ Object



322
323
324
# File 'lib/rgeo/geos/zm_impl.rb', line 322

def interior_ring_n(n_)
  ZMLineStringImpl.create(@factory, @zgeometry.interior_ring_n(n_), @mgeometry.interior_ring_n(n_))
end

#interior_ringsObject



327
328
329
330
331
332
333
334
335
# File 'lib/rgeo/geos/zm_impl.rb', line 327

def interior_rings
  result_ = []
  zrings_ = @zgeometry.interior_rings
  mrings_ = @mgeometry.interior_rings
  zrings_.size.times do |i_|
    result_ << ZMLineStringImpl.create(@factory, zrings_[i_], mrings_[i_])
  end
  result_
end

#num_interior_ringsObject



317
318
319
# File 'lib/rgeo/geos/zm_impl.rb', line 317

def num_interior_rings
  @zgeometry.num_interior_rings
end

#point_on_surfaceObject



307
308
309
# File 'lib/rgeo/geos/zm_impl.rb', line 307

def point_on_surface
  ZMPointImpl.create(@factory, @zgeometry.centroid, @mgeometry.centroid)
end