FDO API Reference | Feature Data Objects |
00001 #ifndef _ICREATESPATIALCONTEXT_H_ 00002 #define _ICREATESPATIALCONTEXT_H_ 00003 // 00004 00005 // 00006 // Copyright (C) 2004-2006 Autodesk, Inc. 00007 // 00008 // This library is free software; you can redistribute it and/or 00009 // modify it under the terms of version 2.1 of the GNU Lesser 00010 // General Public License as published by the Free Software Foundation. 00011 // 00012 // This library is distributed in the hope that it will be useful, 00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 // Lesser General Public License for more details. 00016 // 00017 // You should have received a copy of the GNU Lesser General Public 00018 // License along with this library; if not, write to the Free Software 00019 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00020 // 00021 00022 #ifdef _WIN32 00023 #pragma once 00024 #endif 00025 00026 #include <FdoStd.h> 00027 #include <Fdo/Connections/IConnection.h> 00028 #include <Fdo/Expression/GeometryValue.h> 00029 #include <Fdo/Schema/PropertyDefinition.h> 00030 #include <Fdo/Commands/ICommand.h> 00031 00032 /// \brief 00033 /// The FdoICreateSpatialContext interface defines the CreateSpatialContext 00034 /// command, which creates a new spatial context. Input to the command includes 00035 /// the name, description, coordinate system, extent type, and extent for the 00036 /// new context. Command execution will fail if the context already exists, or 00037 /// if the coordinate system or extent type is not supported by the provider. 00038 /// \note 00039 /// The geographic extent of a coordinate system should generally be 00040 /// defined as an envelope (or bounding box). However, any geometry type that 00041 /// falls into the surface geometric types can be used (e.g., polygons). If a 00042 /// non-rectangular area is passed in and the provider supports only a 00043 /// rectangular extent, the provider will compute the minimum box that 00044 /// encloses the given geometry and use that for the extent value. 00045 class FdoICreateSpatialContext : public FdoICommand 00046 { 00047 friend class FdoIConnection; 00048 00049 public: 00050 /// \brief 00051 /// Gets the name of the context to create as a string. 00052 /// 00053 /// \return 00054 /// Returns the name of the spatial context 00055 /// 00056 FDO_API virtual FdoString* GetName() = 0; 00057 00058 /// \brief 00059 /// Sets the name of the context to create as a string. 00060 /// 00061 /// \param value 00062 /// Input the name of the spatial context 00063 /// 00064 /// \return 00065 /// Returns nothing 00066 /// 00067 FDO_API virtual void SetName(FdoString* value) = 0; 00068 00069 /// \brief 00070 /// Gets the description of the context to create as a string. 00071 /// 00072 /// \return 00073 /// Returns the description of the spatial context 00074 /// 00075 FDO_API virtual FdoString* GetDescription() = 0; 00076 00077 /// \brief 00078 /// Sets the description of the context to create as a string. 00079 /// 00080 /// \param value 00081 /// Input the description of the spatial context 00082 /// 00083 /// \return 00084 /// Returns nothing 00085 /// 00086 FDO_API virtual void SetDescription(FdoString* value) = 0; 00087 00088 /// \brief 00089 /// Gets the coordinate system name as a string. 00090 /// 00091 /// \return 00092 /// Returns the coordinate system 00093 /// 00094 FDO_API virtual FdoString* GetCoordinateSystem() = 0; 00095 00096 /// \brief 00097 /// Sets the coordinate system name as a string. 00098 /// 00099 /// \param value 00100 /// Input the coordinate system 00101 /// 00102 /// \return 00103 /// Returns nothing 00104 /// 00105 FDO_API virtual void SetCoordinateSystem(FdoString* value) = 0; 00106 00107 /// \brief 00108 /// Gets the coordinate system definition in OGC SRS WKT format for the 00109 /// spatial context currently being created. If the result is an empty string, 00110 /// the coordinate system WKT description has not been set. 00111 /// 00112 /// \return 00113 /// Returns the coordinate system description in WKT of of the spatial context. 00114 /// 00115 FDO_API virtual FdoString* GetCoordinateSystemWkt() = 0; 00116 00117 /// \brief 00118 /// Sets the coordinate system definition in OGC SRS WKT 00119 /// format for the spatial context currently being created. 00120 /// 00121 /// \param value 00122 /// Input the coordinate system WKT 00123 /// 00124 /// \return 00125 /// Returns nothing 00126 /// 00127 FDO_API virtual void SetCoordinateSystemWkt(FdoString* value) = 0; 00128 00129 /// \brief 00130 /// Gets the desired extent type of the context to create, either static or dynamic. 00131 /// 00132 /// \return 00133 /// Returns the extent type 00134 /// 00135 FDO_API virtual FdoSpatialContextExtentType GetExtentType() = 0; 00136 00137 /// \brief 00138 /// Sets the desired extent type of the context to create, either static or dynamic. 00139 /// 00140 /// \param value 00141 /// Input the extent type 00142 /// 00143 /// \return 00144 /// Returns nothing 00145 /// 00146 FDO_API virtual void SetExtentType(FdoSpatialContextExtentType value) = 0; 00147 00148 /// \brief 00149 /// Gets the extent of the context to create as a byte array in FGF format. 00150 /// If the extent type is dynamic, any value specified via this function is ignored. 00151 /// 00152 /// \return 00153 /// Returns the extent of the spatial context 00154 /// 00155 FDO_API virtual FdoByteArray* GetExtent() = 0; 00156 00157 /// \brief 00158 /// Sets the extent of the context to create as a byte array in FGF format. 00159 /// If the extent type is dynamic this is optional and any value specified is ignored. 00160 /// 00161 /// \param value 00162 /// Input the extent of the spatial context 00163 /// 00164 /// \return 00165 /// Returns nothing 00166 /// 00167 FDO_API virtual void SetExtent(FdoByteArray* value) = 0; 00168 00169 /// \brief 00170 /// Gets the tolerance value to use for X/Y ordinates. Tolerances are used 00171 /// in some geometric tests, mostly for equality between coordinates. This 00172 /// occurs frequently in spatial queries, especially with "on boundary" or "just 00173 /// touching" conditions. It is also an objective amount that can be used 00174 /// when formulating step distances for parametric curve interpolation. 00175 /// 00176 /// \return 00177 /// Returns the tolerance 00178 /// 00179 FDO_API virtual const double GetXYTolerance() = 0; 00180 00181 /// \brief 00182 /// Sets the tolerance value to use for X/Y ordinates. Tolerances are used 00183 /// in some geometric tests, mostly for equality between coordinates. This 00184 /// occurs frequently in spatial queries, especially with "on boundary" or "just 00185 /// touching" conditions. It is also an objective amount that can be used 00186 /// when formulating step distances for parametric curve interpolation. 00187 /// 00188 /// \param value 00189 /// Input the tolerance 00190 /// 00191 /// \return 00192 /// Returns nothing 00193 /// 00194 FDO_API virtual void SetXYTolerance(const double value) = 0; 00195 00196 /// \brief 00197 /// Gets the tolerance value to use for Z ordinates. Tolerances are used in 00198 /// some geometric tests, mostly for equality between coordinates. This 00199 /// occurs frequently in spatial queries, especially with "on boundary" or "just 00200 /// touching" conditions. It is also an objective amount that can be used 00201 /// when formulating step distances for parametric curve interpolation. 00202 /// 00203 /// \return 00204 /// Returns the tolerance 00205 /// 00206 FDO_API virtual const double GetZTolerance() = 0; 00207 00208 /// \brief 00209 /// Sets the tolerance value to use for Z ordinates. Tolerances are used in 00210 /// some geometric tests, mostly for equality between coordinates. This 00211 /// occurs frequently in spatial queries, especially with "on boundary" or "just 00212 /// touching" conditions. It is also an objective amount that can be used 00213 /// when formulating step distances for parametric curve interpolation. 00214 /// 00215 /// \param value 00216 /// Input the tolerance 00217 /// 00218 /// \return 00219 /// Returns nothing 00220 /// 00221 FDO_API virtual void SetZTolerance(const double value) = 0; 00222 00223 /// \brief 00224 /// Gets a Boolean flag that indicates how the CreateSpatialContext command 00225 /// should behave if the spatial context already exists. If update existing 00226 /// is true and a spatial context with the specified name already exists 00227 /// then it will be updated. If update existing is false and a spatial 00228 /// context with the specified name already exists, command execution 00229 /// will fail. 00230 /// 00231 /// \return 00232 /// Returns true if command should update existing contexts 00233 /// 00234 FDO_API virtual const bool GetUpdateExisting() = 0; 00235 00236 /// \brief 00237 /// Sets a Boolean flag that indicates how the CreateSpatialContext command 00238 /// should behave if the spatial context already exists. If update existing 00239 /// is true and a spatial context with the specified name already exists 00240 /// then it will be updated. If update existing is false and a spatial 00241 /// context with the specified name already exists, command execution 00242 /// will fail. 00243 /// 00244 /// \param value 00245 /// Input true if existing contexts should be updated 00246 /// 00247 /// \return 00248 /// Returns nothing 00249 /// 00250 FDO_API virtual void SetUpdateExisting(const bool value) = 0; 00251 00252 /// \brief 00253 /// Executes the CreateSpatialContext command. An exception is thrown if 00254 /// the spatial context already exists, or if the coordinate system or 00255 /// extent type is not supported by the provider. 00256 /// 00257 /// \return 00258 /// Returns nothing 00259 /// 00260 FDO_API virtual void Execute() = 0; 00261 }; 00262 #endif 00263 00264
Comments or suggestions? Send us feedback. |