isEndpoint method
Tests whether this location is an endpoint of the linear component it refers to.
@param linearGeom the linear geometry referenced by this location @return true if the location is a component endpoint
Implementation
bool isEndpoint(Geometry linearGeom) {
LineString lineComp = linearGeom.getGeometryN(componentIndex) as LineString;
// check for endpoint
int nseg = numSegments(lineComp);
return segmentIndex >= nseg ||
(segmentIndex == nseg - 1 && segmentFraction >= 1.0);
}