FDO .NET API Reference | Feature Data Objects |
00001 /* 00002 * Copyright (C) 2004-2006 Autodesk, Inc. 00003 * 00004 * This library is free software; you can redistribute it and/or 00005 * modify it under the terms of version 2.1 of the GNU Lesser 00006 * General Public License as published by the Free Software Foundation. 00007 * 00008 * This library is distributed in the hope that it will be useful, 00009 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 * Lesser General Public License for more details. 00012 * 00013 * You should have received a copy of the GNU Lesser General Public 00014 * License along with this library; if not, write to the Free Software 00015 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00016 * 00017 */ 00018 00019 #pragma once 00020 00021 class FdoSpatialGridTransform; 00022 00023 BEGIN_NAMESPACE_OSGEO_SPATIAL 00024 00025 /// \ingroup (OSGeoFDOSpatial) 00026 /// \brief 00027 /// Class to handle transformations of ordinates between double precision 00028 /// and integers. The integer format models a fine grid. 00029 public __gc class SpatialGridTransform: public NAMESPACE_OSGEO_RUNTIME::Disposable 00030 { 00031 public: 00032 /// \brief 00033 /// Factory method for GridTransformer. 00034 /// 00035 /// \remarks 00036 /// This models a 2D coordinate system on a grid, using 64-bit integers as ordinates. 00037 /// Each unit of integer is equivalent to one unit of resolution in floating point 00038 /// numbers. The unit of resolution is taken to be twice the given tolerance. 00039 /// 00040 /// \param extents 00041 /// Input Extents of floating-point XY plane. 00042 /// \param tolerance 00043 /// Tolerance of ordinate values. 00044 /// 00045 SpatialGridTransform(NAMESPACE_OSGEO_GEOMETRY::IEnvelope* extents, System::Double tolerance); 00046 00047 /// \brief 00048 /// Transform floating-point ordinates to integer ordinates on the grid. 00049 /// 00050 /// \param coordinateX 00051 /// Input Floating-point X ordinate. 00052 /// \param coordinateY 00053 /// Input Floating-point Y ordinate. 00054 /// \param gridX 00055 /// Output Integer X ordinate. 00056 /// \param gridY 00057 /// Output Integer Y ordinate. 00058 /// 00059 System::Void TransformToGrid(System::Double coordinateX, System::Double coordinateY, System::Int64* gridX, System::Int64* gridY); 00060 00061 /// \brief 00062 /// Transform integer ordinates on the grid to floating-point ordinates. 00063 /// 00064 /// \param gridX 00065 /// Input Integer X ordinate. 00066 /// \param gridY 00067 /// Input Integer Y ordinate. 00068 /// \param coordinateX 00069 /// Output Floating-point X ordinate. 00070 /// \param coordinateY 00071 /// Output Floating-point Y ordinate. 00072 /// 00073 System::Void TransformFromGrid(System::Int64 gridX, System::Int64 gridY, System::Double* coordinateX, System::Double* coordinateY); 00074 00075 /// \cond DOXYGEN-IGNORE 00076 protected: 00077 System::Void ReleaseUnmanagedObject(); 00078 /// \endcond 00079 00080 public: 00081 /// \brief 00082 /// Constructs an SpatialGridTransform managed object based on an unmanaged instance of the object 00083 /// 00084 /// \param unmanaged 00085 /// Input A Pointer to the unmanaged object. 00086 /// 00087 /// \param autoDelete 00088 /// Input Indicates if the constructed object should be automatically deleted 00089 /// once it no longer referenced. 00090 /// 00091 SpatialGridTransform(System::IntPtr unmanaged, System::Boolean autoDelete); 00092 00093 public private: 00094 inline FdoSpatialGridTransform* GetImpObj(); 00095 }; 00096 00097 END_NAMESPACE_OSGEO_SPATIAL 00098 00099
Comments or suggestions? Send us feedback. |