resolveHigher method
Implementation
LinearLocation resolveHigher(LinearLocation loc) {
if (!loc.isEndpoint(linearGeom)) return loc;
int compIndex = loc.getComponentIndex();
// if last component can't resolve any higher
if (compIndex >= linearGeom.getNumGeometries() - 1) return loc;
do {
compIndex++;
} while (compIndex < linearGeom.getNumGeometries() - 1 &&
linearGeom.getGeometryN(compIndex).getLength() == 0);
// resolve to next higher location
return new LinearLocation.fromComponentSegmentIndexFraction(
compIndex, 0, 0.0);
}