extract method

Geometry extract(
  1. LinearLocation start,
  2. LinearLocation end
)

Extracts a subline of the input. If end < start the linear geometry computed will be reversed.

@param start the start location @param end the end location @return a linear geometry

Implementation

Geometry extract(LinearLocation start, LinearLocation end) {
  if (end.compareTo(start) < 0) {
    return reverse(computeLinear(end, start));
  }
  return computeLinear(start, end);
}