Module: RGeo::Geos::ZMLineStringMethods

Included in:
ZMLineImpl, ZMLineStringImpl, ZMLinearRingImpl
Defined in:
lib/rgeo/geos/zm_feature_methods.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#end_pointObject


294
295
296
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 294

def end_point
  point_n(num_points - 1)
end

#is_closed?Boolean

Returns:

  • (Boolean)

299
300
301
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 299

def is_closed?
  @zgeometry.is_closed?
end

#is_ring?Boolean

Returns:

  • (Boolean)

304
305
306
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 304

def is_ring?
  @zgeometry.is_ring?
end

#lengthObject


284
285
286
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 284

def length
  @zgeometry.length
end

#num_pointsObject


309
310
311
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 309

def num_points
  @zgeometry.num_points
end

#point_n(n_) ⇒ Object


314
315
316
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 314

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

#pointsObject


319
320
321
322
323
324
325
326
327
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 319

def points
  result_ = []
  zpoints_ = @zgeometry.points
  mpoints_ = @mgeometry.points
  zpoints_.size.times do |i_|
    result_ << @factory._create_feature(ZMPointImpl, zpoints_[i_], mpoints_[i_])
  end
  result_
end

#start_pointObject


289
290
291
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 289

def start_point
  point_n(0)
end