Esempio n. 1
0
 public override double? getActualWidth(CogoStation aStation, out tupleNullableDoubles result)
 {
     double? ret = null;
      result.ahead = null;
      result.back = null;
      result.isSingleValue = true;
      return ret;
 }
Esempio n. 2
0
 public virtual double? getCrossSlope(CogoStation aStation, out tupleNullableDoubles result)
 {
     CrossSlopes.getElevation(aStation, out result);
      if (result.back != null && result.isSingleValue == false)
      {
     return result.ahead;
      }
      return result.back;
 }
Esempio n. 3
0
 public virtual Slope getCrossSlope(CogoStation aStation)
 {
     tupleNullableDoubles rslt = new tupleNullableDoubles();
      Double? xSlope = getCrossSlope(aStation, out rslt);
      if (xSlope == null) return null;
      else return new Slope((Double)xSlope);
 }
Esempio n. 4
0
 public virtual double? getActualWidth(CogoStation aStation)
 {
     tupleNullableDoubles rslt = new tupleNullableDoubles();
      return getActualWidth(aStation, out rslt);
 }
Esempio n. 5
0
        private void getValueByDelegate(CogoStation station, out tupleNullableDoubles theOutValue, verticalCurve.getSwitchForProfiles getFunction)
        {
            if (null == allVCs)
             {
            theOutValue.ahead = 0.0;
            theOutValue.back = 0.0;
            theOutValue.isSingleValue = true;
            return;
             }

             if ((station.trueStation < BeginProfTrueStation - stationEqualityTolerance) ||
             (station.trueStation > EndProfTrueStation + stationEqualityTolerance))
             {  // it means we are off the profile
            theOutValue.back = null;
            theOutValue.ahead = null;
            theOutValue.isSingleValue = true;
            return;
             }

             try { setIndexToTheCorrectVC(station); }
             catch (IndexOutOfRangeException) { }
             verticalCurve aVC = allVCs[vcIndex];

             // if there are effectively no VCs, treat it as singleElevation
             if (allVCs.Count == 1 && aVC.Length < 0.00000001)
             {
            theOutValue.back = aVC.BeginElevation;
            theOutValue.ahead = aVC.BeginElevation;
            theOutValue.isSingleValue = true;
             }
             // if we are at the begin station, check to see how we relate to the previous vc
             else if (utilFunctions.tolerantCompare(station.trueStation, aVC.BeginStation.trueStation, stationEqualityTolerance) == 0)
             {
            // if we are at the beginning of the profile, split theOutValue
            if (vcIndex == 0)
            {
               theOutValue.back = null;
               theOutValue.ahead = getFunction(aVC, station);
               theOutValue.isSingleValue = false;
            }
            else  // if station is on the boundary between two verticalCurves,
            {     // then see if we need to split theOutValue
               if (getFunction == verticalCurve.getKvalue &&
                   aVC.IsBeginPINC)
               {
                  theOutValue.back = theOutValue.ahead = 0.0;
                  theOutValue.isSingleValue = true;
               }
               else
               {
                  theOutValue.ahead = getFunction(aVC, station);
                  theOutValue.back = getFunction(allVCs[vcIndex - 1], station);
                  if (utilFunctions.tolerantCompare(theOutValue.back, theOutValue.ahead, 0.00005) == 0)
                  {
                     theOutValue.isSingleValue = true;
                  }
                  else theOutValue.isSingleValue = false;
               }
            }
             }
             // End: if we are at the begin station, check to see how we relate to the previous vc
             // if we are at the end station, check to see how we relate to the next vc
             else if (utilFunctions.tolerantCompare(station.trueStation, aVC.EndStation.trueStation, stationEqualityTolerance) == 0)
             {
            // if we are at the end of the profile, split theOutValue
            if (vcIndex == allVCs.Count - 1)
            {
               theOutValue.back = getFunction(aVC, station);
               theOutValue.ahead = null;
               theOutValue.isSingleValue = false;
            }
            else  // if station is on the boundary between two verticalCurves,
            {     // then see if we need to split theOutValue
               if (getFunction == verticalCurve.getKvalue &&
                   aVC.IsEndPINC)
               {
                  theOutValue.back = theOutValue.ahead = 0.0;
                  theOutValue.isSingleValue = true;
               }
               else
               {
                  theOutValue.back = getFunction(aVC, station);
                  theOutValue.ahead = getFunction(allVCs[vcIndex + 1], station);
                  if (utilFunctions.tolerantCompare(theOutValue.back, theOutValue.ahead, 0.00005) == 0)
                  {
                     theOutValue.isSingleValue = true;
                  }
                  else theOutValue.isSingleValue = false;
               }
            }
             }
             // End: if we are at the end station, check to see how we relate to the next vc
             else
             {
            theOutValue.back = getFunction(aVC, station);
            theOutValue.ahead = theOutValue.back;
            theOutValue.isSingleValue = true;
             }
        }
Esempio n. 6
0
 public double? getSlopeFromTheRight(CogoStation station)
 {
     var resultTND = new tupleNullableDoubles();
      getSlope(station, out resultTND);
      return resultTND.ahead;
 }
Esempio n. 7
0
 public void getSlope(CogoStation station, out tupleNullableDoubles theSlope)
 {
     verticalCurve.getSwitchForProfiles callFunction = new verticalCurve.getSwitchForProfiles(verticalCurve.getSlope);
      getValueByDelegate(station, out theSlope, callFunction);
 }
Esempio n. 8
0
        public double? getElevation(CogoStation station)
        {
            double? retVal;
             var resultTND = new tupleNullableDoubles();
             getElevation(station, out resultTND);
             if(resultTND.back != null)
            retVal = resultTND.back;
             retVal = resultTND.ahead;

             if (null == retVal)
             {
            if (station > EndProfTrueStation)
            {
               if (this.EndIsUnconstrained == true)
               {
                  this.getElevation((CogoStation)EndProfTrueStation, out resultTND);
                  retVal = resultTND.back;
               }
            }
            if (station < this.BeginProfTrueStation)
            {
               if (this.BeginIsUnconstrained == true)
               {
                  this.getElevation((CogoStation)BeginProfTrueStation, out resultTND);
                  retVal = resultTND.ahead;
               }
            }
             }

             return retVal;
        }