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

#coordinatesObject



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

def coordinates
  points.map(&:coordinates)
end

#end_pointObject



217
218
219
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 217

def end_point
  point_n(num_points - 1)
end

#is_closed?Boolean

Returns:

  • (Boolean)


221
222
223
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 221

def is_closed?
  @zgeometry.is_closed?
end

#is_ring?Boolean

Returns:

  • (Boolean)


225
226
227
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 225

def is_ring?
  @zgeometry.is_ring?
end

#lengthObject



209
210
211
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 209

def length
  @zgeometry.length
end

#num_pointsObject



229
230
231
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 229

def num_points
  @zgeometry.num_points
end

#point_n(n_) ⇒ Object



233
234
235
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 233

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

#pointsObject



237
238
239
240
241
242
243
244
245
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 237

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



213
214
215
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 213

def start_point
  point_n(0)
end