Ejemplo n.º 1
0
        /// <summary>
        /// Creates an elevation model from two geometries (which may be null).
        /// </summary>
        /// <param name="geom1">An input geometry</param>
        /// <param name="geom2">An input geometry</param>
        /// <returns>The elevation model computed from the geometries</returns>
        public static ElevationModel Create(Geometry geom1, Geometry geom2)
        {
            var extent = new Envelope();

            if (geom1 != null)
            {
                extent.ExpandToInclude(geom1.EnvelopeInternal);
            }
            if (geom2 != null)
            {
                extent.ExpandToInclude(geom2.EnvelopeInternal);
            }

            if (extent.IsNull)
            {
                throw new ArgumentException("Arguments don't have an extent!");
            }

            var model = new ElevationModel(extent, DEFAULT_CELL_NUM, DEFAULT_CELL_NUM);

            if (geom1 != null)
            {
                model.Add(geom1);
            }
            if (geom2 != null)
            {
                model.Add(geom2);
            }

            return(model);
        }
Ejemplo n.º 2
0
 public HasZFilter(ElevationModel em)
 {
     _em   = em;
     _hasZ = true;
 }
Ejemplo n.º 3
0
 public PopulateZFilter(ElevationModel em)
 {
     _em = em;
 }