Class: RGeo::Geos::ZMLineStringImpl

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

#end_pointObject



255
256
257
# File 'lib/rgeo/geos/zm_impl.rb', line 255

def end_point
  point_n(num_points - 1)
end

#is_closed?Boolean

Returns:

  • (Boolean)


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

def is_closed?
  @zgeometry.is_closed?
end

#is_ring?Boolean

Returns:

  • (Boolean)


265
266
267
# File 'lib/rgeo/geos/zm_impl.rb', line 265

def is_ring?
  @zgeometry.is_ring?
end

#lengthObject



245
246
247
# File 'lib/rgeo/geos/zm_impl.rb', line 245

def length
  @zgeometry.length
end

#num_pointsObject



270
271
272
# File 'lib/rgeo/geos/zm_impl.rb', line 270

def num_points
  @zgeometry.num_points
end

#point_n(n_) ⇒ Object



275
276
277
# File 'lib/rgeo/geos/zm_impl.rb', line 275

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

#pointsObject



280
281
282
283
284
285
286
287
288
# File 'lib/rgeo/geos/zm_impl.rb', line 280

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

#start_pointObject



250
251
252
# File 'lib/rgeo/geos/zm_impl.rb', line 250

def start_point
  point_n(0)
end