Class: RGeo::Geos::FFIMultiLineStringMethods::PointLocator

Inherits:
Object
  • Object
show all
Defined in:
lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, line, index) ⇒ PointLocator

Returns a new instance of PointLocator.



224
225
226
227
228
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 224

def initialize(target, line, index)
  @target = target
  @line = line
  @index = index
end

Instance Attribute Details

#indexObject (readonly)

Returns the value of attribute index.



222
223
224
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 222

def index
  @index
end

#lineObject (readonly)

Returns the value of attribute line.



222
223
224
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 222

def line
  @line
end

#targetObject (readonly)

Returns the value of attribute target.



222
223
224
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 222

def target
  @target
end

Instance Method Details

#distance_from_lineObject



238
239
240
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 238

def distance_from_line
  line.distance_from_line(target)
end

#distance_on_lineObject



234
235
236
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 234

def distance_on_line
  line.distance_on_line(target)
end

#locationObject



230
231
232
# File 'lib/georuby-ext/rgeo/geos/ffi_feature_methods.rb', line 230

def location
  line.locate_point(target)
end