示例#1
0
        /// <summary>
        /// Creates the polygon from an envelope.
        /// </summary>
        /// <param name="env">The envelope.</param>
        /// <returns></returns>
        public static Fdo.IPolygon CreatePolygonFromEnvelope(Fdo.IEnvelope env)
        {
            FdoGeometryFactory fact = FdoGeometryFactory.Instance;

            Fdo.IGeometry geom = fact.CreateGeometry(env);
            return((Fdo.IPolygon)geom);
        }
示例#2
0
        /// <summary>Creates a new instance of the <see cref="FdoGeometry" /> class that encapsulates
        /// a copy of the specified FDO envelope, in the specified coordinate system.</summary>
        /// <param name="envelope">The FDO envelope for which a copy will be encapsulated.</param>
        /// <param name="coordinateSystem">The coordinate system of the encapsulated FDO geometry.</param>
        /// <remarks>
        ///   <para>This instance encapsulates a copy of the specified <paramref name="envelope" />. It is thus
        /// the responsibility of the caller to <see cref="IDisposable.Dispose()" /> the specified <paramref name="envelope" />.</para>
        /// </remarks>
        public FdoEnvelope(FGeometry.IEnvelope envelope, ICoordinateSystem coordinateSystem)
        {
            Debug.Assert(envelope != null);
            if (envelope == null)
            {
                throw new ArgumentNullException("envelope");
            }
            Debug.Assert(coordinateSystem != null);
            if (coordinateSystem == null)
            {
                throw new ArgumentNullException("coordinateSystem");
            }

            _Envelope         = FdoGeometryBuilder.Factory.CreateEnvelope(envelope);
            _CoordinateSystem = coordinateSystem;
        }
示例#3
0
 /// <summary>
 /// Creates an R-Tree query rectangle from an FDO envelope
 /// </summary>
 /// <param name="env">The env.</param>
 /// <returns></returns>
 public static Rectangle RectFromEnvelope(Fdo.IEnvelope env)
 {
     return(new Rectangle((float)env.MinX, (float)env.MinY, (float)env.MaxX, (float)env.MaxY, (float)env.MinZ, (float)env.MaxZ));
 }