Ejemplo n.º 1
0
 /**
  * Creates an iterator starting at a {@link LinearLocation} on a linear {@link Geometry}
  *
  * @param linear the linear geometry to iterate over
  * @param start the location to start at
  * @throws IllegalArgumentException if linearGeom is not lineal
  */
 public LinearIterator(Geometry linear, LinearLocation start) {
   this(linear, start.getComponentIndex(), segmentEndVertexIndex(start));
 }
Ejemplo n.º 2
0
 private static int segmentEndVertexIndex(LinearLocation loc) {
   if (loc.getSegmentFraction() > 0.0) return loc.getSegmentIndex() + 1;
   return loc.getSegmentIndex();
 }