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\Commands\SpatialContext\mgISpatialContextReader.h" 00022 #include "FDO\Commands\SpatialContext\mgSpatialContextExtentType.h" 00023 00024 class FdoXmlSpatialContextReader; 00025 00026 BEGIN_NAMESPACE_OSGEO_FDO_XML 00027 public __gc class XmlSpatialContextFlags; 00028 00029 /// \ingroup (OSGeoFDOXml) 00030 /// \brief 00031 /// XmlSpatialContextReader reads Spatial Contexts from an XML 00032 /// document. Unlike other XML Readers, the reading is done procedurally, 00033 /// rather than through events. XmlSpatialContextReader implements 00034 /// ISpatialContextReader to provide the functions for retrieving the 00035 /// spatial contexts that were read. 00036 public __gc class XmlSpatialContextReader : public NAMESPACE_OSGEO_COMMON_XML::XmlSaxHandler, public NAMESPACE_OSGEO_FDO_COMMANDS_SPATIALCONTEXT::ISpatialContextReader 00037 { 00038 public: 00039 /// \brief 00040 /// creates a Spatial Context Reader. 00041 /// 00042 /// \param reader 00043 /// Input XML document reader. Specifies the XML 00044 /// document that the Spatial Contexts will be read from. 00045 /// 00046 XmlSpatialContextReader(NAMESPACE_OSGEO_COMMON_XML::XmlReader* reader); 00047 00048 /// \brief 00049 /// creates a Spatial Context Reader. 00050 /// 00051 /// \param reader 00052 /// Input XML document reader. Specifies the XML 00053 /// document that the Spatial Contexts will be read from. 00054 /// \param flags 00055 /// Input options for controlling the 00056 /// deserializing of the Spatial Contexts. If NULL then the 00057 /// default flags are used. 00058 /// 00059 XmlSpatialContextReader(NAMESPACE_OSGEO_COMMON_XML::XmlReader* reader, NAMESPACE_OSGEO_FDO_XML::XmlSpatialContextFlags* flags); 00060 00061 /// \brief 00062 /// Gets the Xml document reader that was passed to this object. 00063 /// 00064 /// \return 00065 /// Returns the XML document reader. 00066 /// 00067 NAMESPACE_OSGEO_COMMON_XML::XmlReader* GetXmlReader(); 00068 00069 /// ISpatialContextReader implementation 00070 00071 /// \brief 00072 /// Gets the name of the spatial context currently being read. 00073 /// 00074 /// \return 00075 /// Returns the name of the spatial context. 00076 /// 00077 System::String* GetName(); 00078 00079 /// \brief 00080 /// Gets the description of the spatial context currently being read. 00081 /// 00082 /// \return 00083 /// Returns the description of the spatial context. 00084 /// 00085 System::String* GetDescription(); 00086 00087 /// \brief 00088 /// Gets the name of the coordinate system of the spatial context currently 00089 /// being read. If the result is a null or empty string, the coordinate system is 00090 /// unknown to the spatial context. 00091 /// 00092 /// \return 00093 /// Returns the coordinate system name of the spatial context. 00094 /// 00095 System::String* GetCoordinateSystem(); 00096 00097 /// \brief 00098 /// Gets the coordinate system in OpenGIS SRS WKT format of the spatial context currently 00099 /// being read. If the result is an empty string, the coordinate system WKT description is 00100 /// not available. 00101 /// 00102 /// \return 00103 /// Returns the coordinate system description in WKT of of the spatial context. 00104 /// 00105 System::String* GetCoordinateSystemWkt(); 00106 00107 /// \brief 00108 /// Gets the extent type of the spatial context currently being read. 00109 /// 00110 /// \return 00111 /// Returns the extent type. 00112 /// 00113 NAMESPACE_OSGEO_FDO_COMMANDS_SPATIALCONTEXT::SpatialContextExtentType GetExtentType(); 00114 00115 /// \brief 00116 /// Gets the extent of the spatial context currently being read as a byte 00117 /// array in FGF format. 00118 /// 00119 /// \return 00120 /// Returns the extent as a byte array in FGF format. 00121 /// 00122 System::Byte GetExtent() []; 00123 00124 /// \brief 00125 /// Gets the tolerance value for XY ordinates of the spatial context 00126 /// currently being read. Tolerances are used in some geometric tests, 00127 /// mostly for equality between coordinates. This occurs frequently in spatial 00128 /// queries, especially with "on boundary" or "just touching" conditions. 00129 /// It is also an objective amount that can be used when formulating step 00130 /// distances for parametric curve interpolation. 00131 /// 00132 /// \return 00133 /// Returns the tolerance 00134 /// 00135 System::Double GetXYTolerance(); 00136 00137 /// \brief 00138 /// Gets the tolerance value for Z ordinates of the spatial context 00139 /// currently being read. Tolerances are used in some geometric tests, 00140 /// mostly for equality between coordinates. This occurs a frequently in spatial 00141 /// queries, especially with "on boundary" or "just touching" conditions. 00142 /// It is also an objective amount that can be used when formulating step 00143 /// distances for parametric curve interpolation. 00144 /// 00145 /// \return 00146 /// Returns the tolerance 00147 /// 00148 System::Double GetZTolerance(); 00149 00150 /// \brief 00151 /// Returns true if the spatial context currently being read is the active 00152 /// spatial context. 00153 /// 00154 /// \return 00155 /// Returns true if the current spatial context is the active one. 00156 /// 00157 System::Boolean IsActive(); 00158 00159 /// \brief 00160 /// Advances the reader to the next item. The default position of the reader 00161 /// is prior to the first item. Thus, you must call ReadNext to begin 00162 /// accessing any data. 00163 /// 00164 /// \return 00165 /// Returns true if there is a next item. 00166 /// 00167 System::Boolean ReadNext(); 00168 00169 public private: 00170 XmlSpatialContextReader(System::IntPtr unmanaged, System::Boolean autoDelete) : NAMESPACE_OSGEO_COMMON_XML::XmlSaxHandler(unmanaged, autoDelete) 00171 { 00172 00173 } 00174 00175 inline FdoXmlSpatialContextReader* GetImpObj(); 00176 00177 /// \cond DOXYGEN-IGNORE 00178 protected: 00179 System::Void ReleaseUnmanagedObject(); 00180 /// \endcond 00181 }; 00182 00183 END_NAMESPACE_OSGEO_FDO_XML 00184 00185
Comments or suggestions? Send us feedback. |