Пример #1
0
 private bool IsStartOrEnd(LinearLocation lip, LineString candidate)
 {
     if (!lip.IsVertex)
     {
         return(false);
     }
     if (lip.SegmentIndex == 0)
     {
         return(true);
     }
     return(lip.IsEndpoint(candidate));
 }
        private LinearLocation ResolveHigher(LinearLocation loc)
        {
            if (!loc.IsEndpoint(_linearGeom))
                return loc;
            int compIndex = loc.ComponentIndex;
            // if last component can't resolve any higher
            if (compIndex >= _linearGeom.NumGeometries - 1) return loc;

            do
            {
                compIndex++;
            } while (compIndex < _linearGeom.NumGeometries - 1
                && _linearGeom.GetGeometryN(compIndex).Length == 0);
            // resolve to next higher location
            return new LinearLocation(compIndex, 0, 0.0);
        }