An internal utility function to find the grid line intersections of a line segment

find_intersections(
  location_latlon,
  x_grid,
  y_grid,
  latitude,
  longitude,
  first_point = FALSE
)