lib/turf/boolean_point_on_line.rb
# Takes a Point and a LineString and determines if the point resides one the lineString.
Takes a Point and a LineString and determines if the point resides one the lineString.
Takes a Point and a LineString and determines if the point resides one the lineString .
def boolean_point_on_line(point, line)
    point_coords = get_coord(point);
    line_coords = get_coords(line);
    (0..line_coords.count - 2).to_a.each_with_index do |index|
      return true if is_point_on_line_segment(line_coords[index], line_coords[index + 1], point_coords, false)
    end
    return false
  end
def boolean_point_on_line ( point , line ) point_coords = get_coord ( point ) ; line_coords = get_coords ( line ) ; ( 0 .. line_coords . count - 2 ) . to_a . each_with_index do | index | return true if is_point_on_line_segment ( line_coords [ index ] , line_coords [ index + 1 ] , point_coords , false ) end return false end
Takes a Point and a LineString and determines if the point resides one the lineString.
Takes a Point and a LineString and determines if the point resides one the lineString .
# Normalize inputs # Main
point
line