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.



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

#indexObject (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

#lineObject (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

#targetObject (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_lineObject



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_lineObject



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

#locationObject



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

def location
  line.locate_point(target)
end