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 #include "FDO\Raster\mgIRaster.h" 00022 00023 class FdoIRaster; 00024 00025 BEGIN_NAMESPACE_OSGEO_FDO_RASTER 00026 00027 /// \ingroup (OSGeoFDORaster) 00028 /// \brief 00029 /// IRasterImp specifies the data type and organization 00030 /// of raster data retrieved and stored. Using this class and the image 00031 /// extents in width and length, the binary format of the image data returned 00032 /// by and accepted by the IoStreamReader class can be interpreted. 00033 private __gc class IRasterImp : public NAMESPACE_OSGEO_RUNTIME::Disposable, public NAMESPACE_OSGEO_FDO_RASTER::IRaster 00034 { 00035 public: 00036 /// \brief 00037 /// Returns true if the IRaster represents a null value. 00038 /// 00039 /// \return 00040 /// Returns true if the IRaster represents a null value. 00041 /// 00042 System::Boolean IsNull (); 00043 00044 /// \brief 00045 /// Sets the IRaster to a null value. 00046 /// 00047 /// \return 00048 /// Returns nothing 00049 /// 00050 System::Void SetNull (); 00051 00052 /// \brief 00053 /// Gets the number of bands/channels contained in the raster image. 00054 /// 00055 /// \return 00056 /// Returns the numbers of bands/channels contained in the raster image. 00057 /// 00058 __property System::Int32 get_NumberOfBands(); 00059 00060 /// \brief 00061 /// Sets the number of bands/channels contained in the raster image. 00062 /// 00063 /// \return 00064 /// Returns nothing. 00065 /// 00066 __property System::Void set_NumberOfBands (System::Int32 value); 00067 00068 /// \brief 00069 /// Gets the currently active band/channel. 00070 /// 00071 /// \remarks 00072 /// IRaster Bounds, DataModel, ImageSize, AuxilliaryProperties and Stream 00073 /// accessors all conform to the current band. 00074 /// 00075 /// \return 00076 /// Returns the current active band/channel. 00077 /// 00078 __property System::Int32 get_CurrentBand (); 00079 00080 /// \brief 00081 /// Sets the currently active band/channel. 00082 /// 00083 /// \remarks 00084 /// Setting the current band will mean that the Bounds, DataModel, ImageSize, 00085 /// AuxilliaryProperties and Stream accessors of IRaster 00086 /// will all switch to the specified band. 00087 /// 00088 /// \return 00089 /// Returns nothing. 00090 /// 00091 __property System::Void set_CurrentBand (System::Int32 value); 00092 00093 /// \brief 00094 /// Get the minimum bounding box around the curent band of the image. 00095 /// 00096 /// \return 00097 /// Returns the bounds of the raster image 00098 /// 00099 __property System::Byte get_Bounds () []; 00100 00101 /// \brief 00102 /// Set the minimum bounding box around the image. 00103 /// For georeferenced images, the coordinate system is specified by the 00104 /// spatial context in force when the object is created. The act of 00105 /// setting this property georeferences the image. In order to provide 00106 /// for non-georeferenced images, this property is Nullable (doesn't 00107 /// need to be set). 00108 /// 00109 /// \param bounds 00110 /// The new bounds of the raster image. 00111 /// 00112 __property System::Void set_Bounds (System::Byte bounds[]); 00113 00114 /// \brief 00115 /// Gets the data model in use by this raster property. 00116 /// 00117 /// \return 00118 /// Returns the current data model. 00119 /// 00120 __property NAMESPACE_OSGEO_FDO_RASTER::RasterDataModel* get_DataModel (); 00121 00122 /// \brief 00123 /// Sets the data model used by this raster property. 00124 /// Allowed values are only those data models that are acceptable to the 00125 /// SupportsDataModel capability. 00126 /// 00127 /// \remarks 00128 /// This attribute specifies the colour/palette model, bits per pixel, 00129 /// tiling and interleaving. For example, if the bits per pixel of the 00130 /// data model is 8 and it is set to 24, a conversion would be performed 00131 /// when image data is requested, to return 24 bit data. If an update 00132 /// command is executed to save this value, the raster data would be 00133 /// transformed and saved. The next time this image is retrieved 00134 /// by the client the bits per pixel value would indicate 24. 00135 /// 00136 /// \param dataModel 00137 /// The datamodel to be used. 00138 /// 00139 __property System::Void set_DataModel (NAMESPACE_OSGEO_FDO_RASTER::RasterDataModel* dataModel); 00140 00141 /// \brief 00142 /// Gets the size of image file in the horizontal 00143 /// direction in pixels (number of columns). 00144 /// 00145 /// \return 00146 /// Returns the horizontal image size in pixels 00147 /// (number of columns). 00148 /// 00149 __property System::Int32 get_ImageXSize (); 00150 00151 /// \brief 00152 /// Sets the size of image file in the horizontal 00153 /// direction in pixels (number of columns). 00154 /// By setting the X and Y image size properties prior to getting 00155 /// a reader for the data, the client application can control the 00156 /// density of pixels fetched by the provider, which may reduce 00157 /// the amount of data shipped by the reader and reduce processing 00158 /// time significantly. For example, a certain query in the 00159 /// coordinate system of the raster object class returns a 00160 /// IRaster object with image size 12091 by 8043. But the 00161 /// image only needs to be displayed in an area 1167 by 776 on 00162 /// the users monitor. 00163 /// <p>(<b>Note:</b> The aspect ratios are the same 00164 /// because the query is constructed based on the display area). 00165 /// <p>By setting the image size to these lower values the FDO raster 00166 /// subsystem may be able to use a previously subsampled image 00167 /// where the resolution has been reduced by a factor of 4. 00168 /// So instead of transferring 97MB, it can transfer 6MB (a reduction 00169 /// by 4 in both dimensions reduces the amount of data by a factor of 16) 00170 /// and subsample the image again to the desired resolution in a 00171 /// more timely manner (less data to process means less total time), 00172 /// with no appreciable difference in display quality to the user. 00173 /// 00174 /// \param size 00175 /// The desired horizontal image size in pixels 00176 /// (number of columns). 00177 /// 00178 __property System::Void set_ImageXSize (System::Int32 size); 00179 00180 /// \brief 00181 /// Gets the size of image file in the vertical 00182 /// direction in pixels (number of rows). 00183 /// 00184 /// \return 00185 /// Returns the vertical image size in pixels 00186 /// (number of rows). 00187 /// 00188 __property System::Int32 get_ImageYSize (); 00189 00190 /// \brief 00191 /// Sets the size of image file in the vertical 00192 /// direction in pixels (number of rows). See SetImageXSize. 00193 /// 00194 /// \param size 00195 /// The desired vertical image size in pixels 00196 /// (number of rows). 00197 /// 00198 __property System ::Void set_ImageYSize (System ::Int32 size); 00199 00200 /// \brief 00201 /// Get a dictionary style interface to the raster properties. 00202 /// Through this interface the non-standard properties of a raster 00203 /// image can be determined and their values can be retrieved and set. 00204 /// Data values are exchanged through the DataValue object to 00205 /// accommodate various data types, boolean, integer, double, string, 00206 /// etc. 00207 /// 00208 /// \return 00209 /// The dictionary of auxilliary raster properties. 00210 /// 00211 NAMESPACE_OSGEO_FDO_RASTER::IRasterPropertyDictionary* GetAuxiliaryProperties(); 00212 00213 /// \brief 00214 /// Gets the pixel value that represents a NULL value in the available raster stream. 00215 /// 00216 /// \remarks 00217 /// The Null Pixel Value is Data Model dependent. The value of the Null pixel 00218 /// will change depending on which data model is set. If the client application changes 00219 /// the Data Model using SetDataModel(RasterDataModel* datamodel) a subsequent 00220 /// call to GetNullPixelValue will need to be made in order to determine the valid Null 00221 /// value for the current data model. 00222 /// 00223 /// \return 00224 /// Returns the DataType value that can be used to identify the Null value. 00225 /// 00226 __property NAMESPACE_OSGEO_FDO_EXPRESSION::DataValue* get_NullPixelValue (); 00227 00228 /// \brief 00229 /// Set the source of image data. 00230 /// Image data is shipped using a paradigm similar to BLOB I/O. 00231 /// When inserting or updating an object with a raster property, 00232 /// the SetStreamReader method provides a means to set a 00233 /// IStreamReader callback. 00234 /// On execution of an insert or update command, requests are made on 00235 /// the reader for the image data (which is supplied by the FDO client 00236 /// application). 00237 /// The format of the image data expected is determined by the 00238 /// DataModel property. The data type, bit depth, tiling and 00239 /// organization specify the meaning of the image data. 00240 /// By setting the DataModel property prior to setting a 00241 /// reader for the data, the FDO client application can control the 00242 /// way data is understood by, the FDO raster subsystem. 00243 /// 00244 __property System ::Void set_StreamReader (NAMESPACE_OSGEO_COMMON::IStreamReaderImp* reader); 00245 00246 /// \brief 00247 /// Get the source of image data. 00248 /// Image data is shipped using a paradigm similar to BLOB I/O. 00249 /// When fetching a raster image the GetStreamReader() method provides 00250 /// a IStreamReader from which the client may request the image data. 00251 /// The format of the image data expected is determined by the 00252 /// DataModel property. The data type, bit depth, tiling and 00253 /// organization specify the meaning of the image data. 00254 /// By setting the DataModel property prior to getting a 00255 /// reader for the data, the FDO client application can control the 00256 /// way data is retrieved from the FDO raster subsystem. 00257 /// When a tiled image is fetched, the image data will be tiled by default, 00258 /// unless a spatial query is used that covers a portion of a tile, 00259 /// in which case the image is converted to monolithic form prior to 00260 /// returning to the client. The client may force a monolithic 00261 /// image in the former case by setting the DataModel to monolithic 00262 /// prior to getting the stream reader. Or conversely it can request 00263 /// a re-tiling of the remaining sub-image by setting the DataModel 00264 /// property to tiled (in this case the tile origin is at the new upper 00265 /// left corner of the sub-image). 00266 /// <p><b>Note:</b> Altering the DataModel may have significant performance issues. 00267 /// 00268 __property NAMESPACE_OSGEO_COMMON::IStreamReaderImp* get_StreamReader (); 00269 00270 /// \brief 00271 /// Gets the Vertical Unit of Measure corresponding to the Raster Band. 00272 /// The string value returned will be a considered lookup value that 00273 /// will be used to identify the properties of the Unit of Measure using 00274 /// the IGetMeasureUnits command. 00275 /// 00276 /// \return 00277 /// Returns the Unit of Measure type of data associated to the Raster Band. 00278 /// 00279 __property System::String* get_VerticalUnits (); 00280 00281 /// \brief 00282 /// Sets the Vertical Unit of Measure corresponding to the Raster Band. 00283 /// 00284 /// \param units 00285 /// The Unit of Measure type for the current band. 00286 /// The units string value corresponds to a Unit of Measure supported 00287 /// through the IGetMeasureUnits command. 00288 __property System::Void set_VerticalUnits (System::String* units); 00289 00290 public: 00291 /// \brief 00292 /// Constructs a IRasterImp object based on an unmanaged instance of the object 00293 /// 00294 /// \param unmanaged 00295 /// Input A Pointer to the unmanaged object. 00296 /// 00297 /// \param autoDelete 00298 /// Input Indicates if the constructed object should be automatically deleted 00299 /// once it no longer referenced. 00300 /// 00301 IRasterImp(System::IntPtr unmanaged, System::Boolean autoDelete); 00302 00303 /// \cond DOXYGEN-IGNORE 00304 protected: 00305 System::Void ReleaseUnmanagedObject(); 00306 /// \endcond 00307 00308 public private: 00309 inline FdoIRaster* GetImpObj(); 00310 }; 00311 00312 END_NAMESPACE_OSGEO_FDO_RASTER 00313 00314
Comments or suggestions? Send us feedback. |