Esempio n. 1
0
        /// <summary>
        /// Creates an instance of the CompactionProfileProductionDataRequest class and populate it with data needed for a production data slice profile.
        /// </summary>
        /// <param name="startLatDegrees"></param>
        /// <param name="startLonDegrees"></param>
        /// <param name="endLatDegrees"></param>
        /// <param name="endLonDegrees"></param>
        /// <returns>An instance of the CompactionProfileProductionDataRequest class.</returns>
        public CompactionProfileProductionDataRequest CreateProductionDataProfileRequest(double startLatDegrees, double startLonDegrees, double endLatDegrees, double endLonDegrees, bool explicitFilters)
        {
            var llPoints = ProfileLLPoints.CreateProfileLLPoints(startLatDegrees.LatDegreesToRadians(), startLonDegrees.LonDegreesToRadians(), endLatDegrees.LatDegreesToRadians(), endLonDegrees.LonDegreesToRadians());

            var liftBuildSettings = SettingsManager.CompactionLiftBuildSettings(ProjectSettings);

            // callId is set to 'empty' because raptor will create and return a Guid if this is set to empty.
            // this would result in the acceptance tests failing to see the callID == in its equality test
            return(new CompactionProfileProductionDataRequest(
                       ProjectId,
                       ProjectUid,
                       Guid.Empty,
                       ProductionDataType.Height,
                       Filter,
                       null,
                       null,
                       null,
                       llPoints,
                       ValidationConstants3D.MIN_STATION,
                       ValidationConstants3D.MIN_STATION,
                       liftBuildSettings,
                       false,
                       DesignDescriptor,
                       baseFilter,
                       topFilter,
                       volCalcType,
                       volumeDesign,
                       explicitFilters));
        }
Esempio n. 2
0
 public static void ConvertProfileEndPositions(ProfileGridPoints gridPoints, ProfileLLPoints lLPoints,
                                               out TWGS84Point startPt, out TWGS84Point endPt,
                                               out bool positionsAreGrid)
 {
     if (gridPoints != null)
     {
         positionsAreGrid = true;
         startPt          = new TWGS84Point {
             Lat = gridPoints.y1, Lon = gridPoints.x1
         };
         endPt = new TWGS84Point {
             Lat = gridPoints.y2, Lon = gridPoints.x2
         };
     }
     else if (lLPoints != null)
     {
         positionsAreGrid = false;
         startPt          = new TWGS84Point
         {
             Lat = lLPoints.lat1,
             Lon = lLPoints.lon1
         };
         endPt = new TWGS84Point
         {
             Lat = lLPoints.lat2,
             Lon = lLPoints.lon2
         };
     }
     else
     {
         throw ThrowNoProfileLineDefinedException();
     }
 }
Esempio n. 3
0
 public CompactionProfileDesignRequest(long projectId, Guid?projectUid, DesignDescriptor designDescriptor, FilterResult filter, long?filterId, DesignDescriptor alignmentDescriptor, ProfileGridPoints gridPoints, ProfileLLPoints wgs84Points, double startStation, double endStation)
 {
     ProjectId           = projectId;
     ProjectUid          = projectUid;
     DesignDescriptor    = designDescriptor;
     Filter              = filter;
     FilterID            = filterId;
     AlignmentDescriptor = alignmentDescriptor;
     GridPoints          = gridPoints;
     WGS84Points         = wgs84Points;
     StartStation        = startStation;
     EndStation          = endStation;
 }
Esempio n. 4
0
        /// <summary>
        /// Creates an instance of the CompactionProfileDesignRequest class and populate it with data needed for a design profile.
        /// </summary>
        /// <returns>An instance of the CompactionProfileDesignRequest class.</returns>
        public CompactionProfileDesignRequest CreateDesignProfileRequest(double startLatDegrees, double startLonDegrees, double endLatDegrees, double endLonDegrees)
        {
            var llPoints = ProfileLLPoints.CreateProfileLLPoints(
                startLatDegrees.LatDegreesToRadians(), startLonDegrees.LonDegreesToRadians(), endLatDegrees.LatDegreesToRadians(), endLonDegrees.LonDegreesToRadians());

            return(new CompactionProfileDesignRequest(
                       ProjectId,
                       ProjectUid,
                       DesignDescriptor,
                       Filter,
                       null,
                       null,
                       null,
                       llPoints,
                       ValidationConstants3D.MIN_STATION,
                       ValidationConstants3D.MIN_STATION));
        }
Esempio n. 5
0
 public CompactionProfileProductionDataRequest(
     long?projectID,
     Guid?projectUid,
     Guid?callId,
     ProductionDataType profileType,
     FilterResult filter,
     long?filterID,
     DesignDescriptor alignmentDesign,
     ProfileGridPoints gridPoints,
     ProfileLLPoints wgs84Points,
     double startStation,
     double endStation,
     LiftBuildSettings liftBuildSettings,
     bool returnAllPassesAndLayers,
     DesignDescriptor cutFillDesignDescriptor,
     FilterResult baseFilter,
     FilterResult topFilter,
     VolumeCalcTypes?volumeCalcType,
     DesignDescriptor volumeDesignDescriptor,
     bool explicitFilters = false
     )
 {
     ProjectId                = projectID;
     ProjectUid               = projectUid;
     CallId                   = callId;
     ProfileType              = profileType;
     Filter                   = filter;
     FilterID                 = filterID;
     AlignmentDesign          = alignmentDesign;
     GridPoints               = gridPoints;
     WGS84Points              = wgs84Points;
     base.StartStation        = startStation;
     EndStation               = endStation;
     LiftBuildSettings        = liftBuildSettings;
     ReturnAllPassesAndLayers = returnAllPassesAndLayers;
     CutFillDesignDescriptor  = cutFillDesignDescriptor;
     BaseFilter               = baseFilter;
     TopFilter                = topFilter;
     VolumeCalcType           = volumeCalcType;
     VolumeDesignDescriptor   = volumeDesignDescriptor;
     ExplicitFilters          = explicitFilters;
 }
Esempio n. 6
0
 public static void ConvertProfileEndPositions(ProfileGridPoints gridPoints, ProfileLLPoints lLPoints,
                                               out WGSPoint startPt, out WGSPoint endPt, out bool positionsAreGrid)
 {
     if (gridPoints != null)
     {
         positionsAreGrid = true;
         startPt          = new WGSPoint(gridPoints.y1, gridPoints.x1);
         endPt            = new WGSPoint(gridPoints.y2, gridPoints.x2);
     }
     else
     if (lLPoints != null)
     {
         positionsAreGrid = false;
         startPt          = new WGSPoint(lLPoints.lat1, lLPoints.lon1);
         endPt            = new WGSPoint(lLPoints.lat2, lLPoints.lon2);
     }
     else
     {
         throw ThrowNoProfileLineDefinedException();
     }
 }
Esempio n. 7
0
        private const long PD_MODEL_ID = 544; // Dimensions 2012 project...

        /// <summary>
        /// Creates an instance of the ProfileProductionDataRequest class.
        /// </summary>
        /// <returns>The created instance.</returns>
        ///
        private ProfileProductionDataRequest CreateRequest()
        {
            var profileLLPoints = ProfileLLPoints.CreateProfileLLPoints(35.109149 * Coordinates.DEGREES_TO_RADIANS,
                                                                        -106.6040765 * Coordinates.DEGREES_TO_RADIANS,
                                                                        35.109149 * Coordinates.DEGREES_TO_RADIANS,
                                                                        -104.28745 * Coordinates.DEGREES_TO_RADIANS);

            return(new ProfileProductionDataRequest(
                       PD_MODEL_ID,
                       new Guid(),
                       ProductionDataType.Height,
                       null,
                       -1,
                       null,
                       null,
                       profileLLPoints,
                       1,
                       120,
                       null,
                       true
                       ));
        }