Module: RGeo::Geos::ZMPolygonMethods

Included in:
ZMPolygonImpl
Defined in:
lib/rgeo/geos/zm_feature_methods.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#areaObject


336
337
338
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 336

def area
  @zgeometry.area
end

#centroidObject


341
342
343
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 341

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

#exterior_ringObject


351
352
353
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 351

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

#interior_ring_n(n_) ⇒ Object


361
362
363
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 361

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

#interior_ringsObject


366
367
368
369
370
371
372
373
374
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 366

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

#num_interior_ringsObject


356
357
358
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 356

def num_interior_rings
  @zgeometry.num_interior_rings
end

#point_on_surfaceObject


346
347
348
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 346

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