Module: RGeo::Geos::ZMLineStringMethods
- Included in:
- ZMLineImpl, ZMLineStringImpl, ZMLinearRingImpl
- Defined in:
- lib/rgeo/geos/zm_feature_methods.rb
Overview
:nodoc:
Instance Method Summary collapse
- #closed? ⇒ Boolean
- #coordinates ⇒ Object
- #end_point ⇒ Object
- #length ⇒ Object
- #num_points ⇒ Object
- #point_n(idx) ⇒ Object
- #points ⇒ Object
- #ring? ⇒ Boolean
- #start_point ⇒ Object
Instance Method Details
#closed? ⇒ Boolean
| 247 248 249 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 247 def closed? @zgeometry.closed? end | 
#coordinates ⇒ Object
| 273 274 275 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 273 def coordinates points.map(&:coordinates) end | 
#end_point ⇒ Object
| 243 244 245 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 243 def end_point point_n(num_points - 1) end | 
#length ⇒ Object
| 235 236 237 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 235 def length @zgeometry.length end | 
#num_points ⇒ Object
| 255 256 257 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 255 def num_points @zgeometry.num_points end | 
#point_n(idx) ⇒ Object
| 259 260 261 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 259 def point_n(idx) @factory.create_feature(ZMPointImpl, @zgeometry.point_n(idx), @mgeometry.point_n(idx)) end | 
#points ⇒ Object
| 263 264 265 266 267 268 269 270 271 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 263 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
| 251 252 253 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 251 def ring? @zgeometry.ring? end | 
#start_point ⇒ Object
| 239 240 241 | # File 'lib/rgeo/geos/zm_feature_methods.rb', line 239 def start_point point_n(0) end |