Module: RGeo::Geos::FFIPointMethods
- Included in:
- FFIPointImpl
- Defined in:
- lib/rgeo/geos/ffi_feature_methods.rb
Overview
:nodoc:
Instance Method Summary collapse
- #coordinates ⇒ Object
- #geometry_type ⇒ Object
- #hash ⇒ Object
- #m ⇒ Object
- #rep_equals?(rhs_) ⇒ Boolean
- #x ⇒ Object
- #y ⇒ Object
- #z ⇒ Object
Instance Method Details
#coordinates ⇒ Object
307 308 309 310 311 312 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 307 def coordinates [x, y].tap do |coords| coords << z if @factory.property(:has_z_coordinate) coords << m if @factory.property(:has_m_coordinate) end end |
#geometry_type ⇒ Object
294 295 296 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 294 def geometry_type Feature::Point end |
#hash ⇒ Object
303 304 305 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 303 def hash @hash ||= Utils.ffi_coord_seq_hash(@fg_geom.coord_seq, [@factory, geometry_type].hash) end |
#m ⇒ Object
290 291 292 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 290 def m @fg_geom.coord_seq.get_z(0) if @factory.property(:has_m_coordinate) end |
#rep_equals?(rhs_) ⇒ Boolean
298 299 300 301 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 298 def rep_equals?(rhs_) rhs_.class == self.class && rhs_.factory.eql?(@factory) && Utils.ffi_coord_seqs_equal?(rhs_.fg_geom.coord_seq, @fg_geom.coord_seq, @factory._has_3d) end |
#x ⇒ Object
278 279 280 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 278 def x @fg_geom.coord_seq.get_x(0) end |
#y ⇒ Object
282 283 284 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 282 def y @fg_geom.coord_seq.get_y(0) end |
#z ⇒ Object
286 287 288 |
# File 'lib/rgeo/geos/ffi_feature_methods.rb', line 286 def z @fg_geom.coord_seq.get_z(0) if @factory.property(:has_z_coordinate) end |