API Reference | OSGeo FDO Provider for WMS |
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 #ifndef FDOWMSRASTERDEFINITION_H 00019 #define FDOWMSRASTERDEFINITION_H 00020 00021 #ifdef _WIN32 00022 #pragma once 00023 #endif //_WIN32 00024 00025 #include <WMS/FdoWmsOvProvider.h> 00026 #include <WMS/Override/FdoWmsOvFormatType.h> 00027 #include <WMS/Override/FdoWmsOvLayerCollection.h> 00028 00029 /// \brief 00030 /// 00031 /// The FdoWmsOvRasterDefinition class defines the physical overrides for a raster property in a WMS FDO schema. 00032 class FdoWmsOvRasterDefinition : public FdoPhysicalElementMapping 00033 { 00034 typedef FdoPhysicalElementMapping BaseType; 00035 friend class FdoWmsOvClassDefinition; 00036 00037 public: 00038 /// \brief 00039 /// Constructs a new Raster Definition. 00040 /// 00041 /// \return 00042 /// Returns the newly created FdoWmsOvRasterDefinition instance. 00043 /// 00044 FDOWMS_API static FdoWmsOvRasterDefinition* Create(); 00045 00046 /// \brief 00047 /// Gets the format type in which the WMS image will be generated. 00048 /// 00049 /// \remarks 00050 /// Allowed map formats are "picture" formats . Picture formats constitute 00051 /// a rectangular pixel array of fixed size. Picture formats include file types such 00052 /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 00053 /// and file types such as Tagged Image File Format (TIFF). 00054 /// 00055 /// \return 00056 /// Returns the WMS format type. 00057 /// 00058 FDOWMS_API FdoWmsOvFormatType GetFormatType(void) const; 00059 00060 /// \brief 00061 /// Sets the format type in which the WMS image will be generated. 00062 /// 00063 /// \remarks 00064 /// Allowed map formats are "picture" formats . Picture formats constitute 00065 /// a rectangular pixel array of fixed size. Picture formats include file types such 00066 /// as Portable Network Graphics (PNG), Joint Photographics Expert Group (JPEG) 00067 /// and file types such as Tagged Image File Format (TIFF). 00068 /// 00069 /// \return 00070 /// Returns nothing. 00071 /// 00072 FDOWMS_API void SetFormatType(FdoWmsOvFormatType value); 00073 00074 /// \brief 00075 /// Gets the transparency state. 00076 /// 00077 /// \remarks 00078 /// The transparency state specifies whether the WMS map background is to 00079 /// be made transparent or not. The default value is false. The ability to return 00080 /// an image drawn with transparent pixels allows results of different Map requests 00081 /// to be overlaid, producing a composite map. 00082 /// 00083 /// \return 00084 /// Returns an FdoBoolean indicating the state of the transparency flag. 00085 /// 00086 FDOWMS_API FdoBoolean GetTransparent(void) const; 00087 00088 /// \brief 00089 /// Sets the transparency state. 00090 /// 00091 /// \remarks 00092 /// The transparency state specifies whether the WMS map background is to 00093 /// be made transparent or not. The default value is false. The ability to return 00094 /// an image drawn with transparent pixels allows results of different Map requests 00095 /// to be overlaid, producing a composite map. 00096 /// 00097 /// \return 00098 /// Returns nothing. 00099 /// 00100 FDOWMS_API void SetTransparent(FdoBoolean transparent); 00101 00102 /// \brief 00103 /// Gets the background color. 00104 /// 00105 /// \remarks 00106 /// The background color is a string that specifies the color to be used 00107 /// as the background pixels of the map. The general format of the background color 00108 /// is a hexadecimal encoding of an RGB value where two hexadecimal characters 00109 /// are used for each of Red, Green, and Blue colour values. The values can range 00110 /// between 00 and FF for each (0 and 255, base 10). The format is 0xRRGGBB; either 00111 /// upper or lower case characters are allowed for RR, GG, and BB values. 00112 /// The "0x" prefix shall have a lower case ‘x? The default value is 0xFFFFFF 00113 /// (corresponding to the colour white). 00114 /// 00115 /// \return 00116 /// Returns a FdoString indicating the background color 00117 /// to be used when rendering the WMS image. 00118 /// 00119 FDOWMS_API FdoString* GetBackgroundColor(void) const; 00120 00121 /// \brief 00122 /// Sets the background color. 00123 /// 00124 /// \remarks 00125 /// The background color is a string that specifies the color to be used 00126 /// as the background pixels of the map. The general format of the background color 00127 /// is a hexadecimal encoding of an RGB value where two hexadecimal characters 00128 /// are used for each of Red, Green, and Blue colour values. The values can range 00129 /// between 00 and FF for each (0 and 255, base 10). The format is 0xRRGGBB; either 00130 /// upper or lower case characters are allowed for RR, GG, and BB values. 00131 /// The "0x" prefix shall have a lower case ‘x? The default value is 0xFFFFFF 00132 /// (corresponding to the colour white). 00133 /// 00134 /// \return 00135 /// Returns nothing. 00136 /// 00137 FDOWMS_API void SetBackgroundColor(FdoString* bgColor); 00138 00139 /// \brief 00140 /// Gets the time dimension of the requested WMS map. 00141 /// 00142 /// \remarks 00143 /// If a WMS map has a Time dimension defined, then requests may 00144 /// include the parameter TIME=value. For the TIME parameter, the special keyword 00145 /// 'current' may be used if the WMS Dimension:Name="time" service metadata 00146 /// element includes a nonzero value for the 'current' attribute. The expression 00147 /// "TIME=current" means send the most current data available. The expression 00148 /// "TIME=start_time/current" means send data from start_time up to the most 00149 /// current data available. 00150 /// 00151 /// \return 00152 /// Returns a FdoString indicating the time dimension of the 00153 /// requested WMS image. 00154 /// 00155 FDOWMS_API FdoString* GetTimeDimension(void) const; 00156 00157 /// \brief 00158 /// Sets the time dimension of the requested WMS map. 00159 /// 00160 /// \remarks 00161 /// If a WMS map has a Time dimension defined, then requests may 00162 /// include the parameter TIME=value. For the TIME parameter, the special keyword 00163 /// 'current' may be used if the WMS Dimension:Name="time" service metadata 00164 /// element includes a nonzero value for the 'current' attribute. The expression 00165 /// "TIME=current" means send the most current data available. The expression 00166 /// "TIME=start_time/current" means send data from start_time up to the most 00167 /// current data available. 00168 /// 00169 /// \return 00170 /// Returns nothing . 00171 /// 00172 FDOWMS_API void SetTimeDimension(FdoString* time); 00173 00174 /// \brief 00175 /// Gets the elevation dimension of the requested WMS map. 00176 /// 00177 /// \remarks 00178 /// If a WMS Map has a Elevation dimension defined, then in 00179 /// order to retrieve the map in the required dimension, 00180 /// the dimension property may set to 'ELEVATION=value'. 00181 /// 00182 /// \return 00183 /// Returns a FdoString indicating the elevation dimension 00184 /// of the requested WMS image. 00185 /// 00186 FDOWMS_API FdoString* GetElevationDimension(void) const; 00187 00188 /// \brief 00189 /// Sets the time dimension of the requested WMS map. 00190 /// 00191 /// \remarks 00192 /// If a WMS Map has a Elevation dimension defined, then in 00193 /// order to retrieve the map in the required dimension, 00194 /// the dimension property may set to 'ELEVATION=value'. 00195 /// 00196 /// \return 00197 /// Returns nothing. 00198 /// \return 00199 /// /// Returns a FdoString indicating the elevation dimension 00200 /// of the requested WMS image. 00201 /// 00202 /// 00203 FDOWMS_API void SetElevationDimension(FdoString* dimension); 00204 00205 /// \brief 00206 /// Gets the spatial context in which the requested 00207 /// WMS map will be returned. 00208 /// 00209 /// \remarks 00210 /// The same spatial context name applies to all layers 00211 /// in a single WMS class definition. 00212 /// 00213 /// \return 00214 /// Returns the WMS Provider's spatial context name. 00215 /// 00216 FDOWMS_API FdoString* GetSpatialContextName(void) const; 00217 00218 /// \brief 00219 /// Sets the spatial context in which the requested 00220 /// WMS map will be returned. 00221 /// 00222 /// \remarks 00223 /// The same spatial context name applies to all layers 00224 /// in a single WMS class definition. 00225 /// 00226 /// \return 00227 /// Returns nothing. 00228 /// 00229 FDOWMS_API void SetSpatialContextName(FdoString* value); 00230 00231 /// \brief 00232 /// Gets the WMS layers that will be used to construct 00233 /// the composite WMS image. 00234 /// 00235 /// \remarks 00236 /// A WMS shall render the requested layers by drawing 00237 /// the first map in the list bottommost, the next one over that, 00238 /// and so on. 00239 /// 00240 /// \return 00241 /// Returns the collection of WMS layers associated to the logical 00242 /// FDO class definition. 00243 /// 00244 FDOWMS_API FdoWmsOvLayerCollection* GetLayers(void) const; 00245 00246 /// \brief 00247 /// Gets the fully qualified name of this element 00248 /// 00249 /// \return 00250 /// Returns the qualified element name 00251 /// 00252 FDOWMS_API virtual FdoStringP GetQualifiedName(); 00253 00254 /// \cond DOXYGEN-IGNORE 00255 00256 /// XML Serialization functions, not part of supported API. 00257 FDOWMS_API virtual void InitFromXml(FdoXmlSaxContext* pContext, FdoXmlAttributeCollection* attrs); 00258 FDOWMS_API virtual FdoXmlSaxHandler* XmlStartElement( 00259 FdoXmlSaxContext* context, 00260 FdoString* uri, 00261 FdoString* name, 00262 FdoString* qname, 00263 FdoXmlAttributeCollection* atts 00264 ); 00265 FDOWMS_API virtual FdoBoolean XmlEndElement(FdoXmlSaxContext* context, FdoString* uri, FdoString* name, FdoString* qname); 00266 FDOWMS_API void _writeXml( FdoXmlWriter* xmlWriter, const FdoXmlFlags* flags ); 00267 00268 protected: 00269 FDOWMS_API FdoWmsOvRasterDefinition(void); 00270 FDOWMS_API virtual ~FdoWmsOvRasterDefinition(void); 00271 00272 protected: 00273 void _SetFormatType(FdoString* value); 00274 FdoStringP _GetFormatType(void) const; 00275 void _SetTransparent(FdoString* value); 00276 FdoStringP _GetTransparent(void) const; 00277 void Dispose(void); 00278 00279 private: 00280 FdoStringP m_backgroundColor; 00281 FdoStringP m_timeDimension; 00282 FdoStringP m_elevationDimension; 00283 FdoStringP m_spatialContext; 00284 FdoBoolean m_transparent; 00285 FdoWmsOvFormatType m_formmatType; 00286 FdoWmsOvLayersP m_layers; 00287 FdoXmlCharDataHandler *m_pXmlContentHandler; 00288 00289 /// \endcond 00290 00291 }; 00292 00293 /// \brief 00294 /// FdoWmsOvRasterDefinitionP is a FdoPtr on FdoWmsOvRasterDefinition, provided for convenience. 00295 typedef FdoPtr<FdoWmsOvRasterDefinition> FdoWmsOvRasterDefinitionP; 00296 00297 #endif // FDOWMSRASTERDEFINITION_H 00298 00299
Comments? |