Class: RGeo::Geos::FFIMultiLineStringMethods::PointLocator
- Inherits:
-
Object
- Object
- RGeo::Geos::FFIMultiLineStringMethods::PointLocator
- Defined in:
- lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#line ⇒ Object
readonly
Returns the value of attribute line.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #distance_from_line ⇒ Object
- #distance_on_line ⇒ Object
-
#initialize(target, line, index) ⇒ PointLocator
constructor
A new instance of PointLocator.
- #location ⇒ Object
Constructor Details
#initialize(target, line, index) ⇒ PointLocator
Returns a new instance of PointLocator.
228 229 230 231 232 |
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 228 def initialize(target, line, index) @target = target @line = line @index = index end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
226 227 228 |
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 226 def index @index end |
#line ⇒ Object (readonly)
Returns the value of attribute line.
226 227 228 |
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 226 def line @line end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
226 227 228 |
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 226 def target @target end |
Instance Method Details
#distance_from_line ⇒ Object
242 243 244 |
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 242 def distance_from_line line.distance_from_line(target) end |
#distance_on_line ⇒ Object
238 239 240 |
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 238 def distance_on_line line.distance_on_line(target) end |
#location ⇒ Object
234 235 236 |
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 234 def location line.locate_point(target) end |