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
247 248 249 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 247 def coordinates points.map(&:coordinates) end |
#end_point ⇒ Object
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
221 222 223 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 221 def is_closed? @zgeometry.is_closed? end |
#is_ring? ⇒ Boolean
225 226 227 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 225 def is_ring? @zgeometry.is_ring? end |
#length ⇒ Object
209 210 211 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 209 def length @zgeometry.length end |
#num_points ⇒ Object
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 |
#points ⇒ Object
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_point ⇒ Object
213 214 215 |
# File 'lib/rgeo/geos/zm_feature_methods.rb', line 213 def start_point point_n(0) end |