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

#closed?Boolean

Returns:

  • (Boolean)


248
249
250
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 248

def closed?
  @zgeometry.closed?
end

#coordinatesObject



274
275
276
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 274

def coordinates
  points.map(&:coordinates)
end

#end_pointObject



244
245
246
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 244

def end_point
  point_n(num_points - 1)
end

#lengthObject



236
237
238
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 236

def length
  @zgeometry.length
end

#num_pointsObject



256
257
258
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 256

def num_points
  @zgeometry.num_points
end

#point_n(idx) ⇒ Object



260
261
262
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 260

def point_n(idx)
  @factory.create_feature(ZMPointImpl, @zgeometry.point_n(idx), @mgeometry.point_n(idx))
end

#pointsObject



264
265
266
267
268
269
270
271
272
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 264

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

#ring?Boolean

Returns:

  • (Boolean)


252
253
254
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 252

def ring?
  @zgeometry.ring?
end

#start_pointObject



240
241
242
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 240

def start_point
  point_n(0)
end