Module: RGeo::Geos::ZMLineStringMethods
- Included in:
- ZMLineImpl, ZMLineStringImpl, ZMLinearRingImpl
- Defined in:
- lib/rgeo/geos/zm_feature_methods.rb
Overview
:nodoc:
Instance Method Summary collapse
- #coordinates ⇒ Object
- #end_point ⇒ Object
- #is_closed? ⇒ Boolean
- #is_ring? ⇒ Boolean
- #length ⇒ Object
- #num_points ⇒ Object
- #point_n(n) ⇒ Object
- #points ⇒ Object
- #start_point ⇒ Object
Instance Method Details
#coordinates ⇒ Object
251 252 253 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 251 def coordinates points.map(&:coordinates) end |
#end_point ⇒ Object
221 222 223 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 221 def end_point point_n(num_points - 1) end |
#is_closed? ⇒ Boolean
225 226 227 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 225 def is_closed? @zgeometry.is_closed? end |
#is_ring? ⇒ Boolean
229 230 231 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 229 def is_ring? @zgeometry.is_ring? end |
#length ⇒ Object
213 214 215 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 213 def length @zgeometry.length end |
#num_points ⇒ Object
233 234 235 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 233 def num_points @zgeometry.num_points end |
#point_n(n) ⇒ Object
237 238 239 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 237 def point_n(n) @factory.create_feature(ZMPointImpl, @zgeometry.point_n(n), @mgeometry.point_n(n)) end |
#points ⇒ Object
241 242 243 244 245 246 247 248 249 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 241 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_point ⇒ Object
217 218 219 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 217 def start_point point_n(0) end |