예제 #1
0
        //---------------------------------------------------------------------
        /// <summary>
        /// Add a DEM object depending on the cellsize and the point that have
        /// to be included.
        /// </summary>
        /// <param name="p">
        /// The included waypoint.
        /// </param>
        /// <param name="cellSize">
        /// The cell size.
        /// </param>
        //---------------------------------------------------------------------
        private Dem addDem(Point p, Dem.Precision precision)
        {
            int count = this.demList.Count;
            Dem dem;

            if (!isIncluded(p, out dem, precision))
            {
                if (!this.isWorkingAreaSet)
                {
                    dem = DemFactory.createDem(p, precision, this.demList);
                    this.demList.Add(dem);
                }
                else
                {
                    return(null);
                }
            }
            return(dem);
        }
예제 #2
0
        //---------------------------------------------------------------------
        /// <summary>
        /// Adds a DEM that complies with the input parametres unless it has
        /// been added before.
        /// </summary>
        /// <param name="bottomLeft">
        /// A <see cref="Point"/> representing the bottom left corner
        /// coordinates of the specified DEM.
        /// </param>
        /// <param name="topRight">
        /// A <see cref="Point"/> representing the top right corner coordiantes
        /// of the specified DEM.
        /// </param>
        /// <param name="precision">
        /// A <see cref="Dem.Precision"/>.
        /// </param>
        /// <returns>
        /// A DEM that complies with the input parametres.
        /// </returns>
        //---------------------------------------------------------------------
        private Dem addDem(Point bottomLeft, Point topRight,
                           Dem.Precision precision)
        {
            int count = this.demList.Count;
            Dem dem;

            if (!areIncluded(bottomLeft, topRight, out dem, precision))
            {
                if (!this.isWorkingAreaSet)
                {
                    dem =
                        DemFactory.createDem(
                            bottomLeft, topRight, this.demList, precision);
                    this.demList.Add(dem);
                }
                else
                {
                    return(null);
                }
            }
            return(dem);
        }
예제 #3
0
 public DemList(Point bottomLeft, Point topRight, Dem.Precision precision)
 {
     this.demList = new List <Dem>();
     this.demList.Add(DemFactory.createDem(bottomLeft, topRight, this.demList, precision));
     this.isWorkingAreaSet = true;
 }