LCOV - code coverage report
Current view: directory - ogr - ogr_core.h (source / functions) Found Hit Coverage
Test: gdal_filtered.info Lines: 23 9 39.1 %
Date: 2012-04-28 Functions: 8 5 62.5 %

       1                 : /******************************************************************************
       2                 :  * $Id: ogr_core.h 23947 2012-02-11 17:37:02Z rouault $
       3                 :  *
       4                 :  * Project:  OpenGIS Simple Features Reference Implementation
       5                 :  * Purpose:  Define some core portability services for cross-platform OGR code.
       6                 :  * Author:   Frank Warmerdam, warmerdam@pobox.com
       7                 :  *
       8                 :  ******************************************************************************
       9                 :  * Copyright (c) 1999, Frank Warmerdam
      10                 :  *
      11                 :  * Permission is hereby granted, free of charge, to any person obtaining a
      12                 :  * copy of this software and associated documentation files (the "Software"),
      13                 :  * to deal in the Software without restriction, including without limitation
      14                 :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      15                 :  * and/or sell copies of the Software, and to permit persons to whom the
      16                 :  * Software is furnished to do so, subject to the following conditions:
      17                 :  *
      18                 :  * The above copyright notice and this permission notice shall be included
      19                 :  * in all copies or substantial portions of the Software.
      20                 :  *
      21                 :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
      22                 :  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      23                 :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      24                 :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      25                 :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      26                 :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      27                 :  * DEALINGS IN THE SOFTWARE.
      28                 :  ****************************************************************************/
      29                 : 
      30                 : #ifndef OGR_CORE_H_INCLUDED
      31                 : #define OGR_CORE_H_INCLUDED
      32                 : 
      33                 : #include "cpl_port.h"
      34                 : #include "gdal_version.h"
      35                 : 
      36                 : /**
      37                 :  * \file
      38                 :  *
      39                 :  * Core portability services for cross-platform OGR code.
      40                 :  */
      41                 : 
      42                 : /**
      43                 :  * Simple container for a bounding region.
      44                 :  */
      45                 : 
      46                 : #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
      47                 : class CPL_DLL OGREnvelope
      48                 : {
      49                 :   public:
      50          545688 :         OGREnvelope() : MinX(0.0), MaxX(0.0), MinY(0.0), MaxY(0.0)
      51                 :         {
      52          545688 :         }
      53                 : 
      54              18 :         OGREnvelope(const OGREnvelope& oOther) :
      55              18 :             MinX(oOther.MinX),MaxX(oOther.MaxX), MinY(oOther.MinY), MaxY(oOther.MaxY)
      56                 :         {
      57              18 :         }
      58                 : 
      59                 :     double      MinX;
      60                 :     double      MaxX;
      61                 :     double      MinY;
      62                 :     double      MaxY;
      63                 : 
      64               0 :     int  IsInit() const { return MinX != 0 || MinY != 0 || MaxX != 0 || MaxY != 0; }
      65               0 :     void Merge( OGREnvelope const& sOther ) {
      66               0 :         if( IsInit() )
      67                 :         {
      68               0 :             MinX = MIN(MinX,sOther.MinX);
      69               0 :             MaxX = MAX(MaxX,sOther.MaxX);
      70               0 :             MinY = MIN(MinY,sOther.MinY);
      71               0 :             MaxY = MAX(MaxY,sOther.MaxY);
      72                 :         }
      73                 :         else
      74                 :         {
      75               0 :             MinX = sOther.MinX;
      76               0 :             MaxX = sOther.MaxX;
      77               0 :             MinY = sOther.MinY;
      78               0 :             MaxY = sOther.MaxY;
      79                 :         }
      80               0 :     }
      81                 :     void Merge( double dfX, double dfY ) {
      82                 :         if( IsInit() )
      83                 :         {
      84                 :             MinX = MIN(MinX,dfX);
      85                 :             MaxX = MAX(MaxX,dfX);
      86                 :             MinY = MIN(MinY,dfY);
      87                 :             MaxY = MAX(MaxY,dfY);
      88                 :         }
      89                 :         else
      90                 :         {
      91                 :             MinX = MaxX = dfX;
      92                 :             MinY = MaxY = dfY;
      93                 :         }
      94                 :     }
      95                 :     
      96                 :     void Intersect( OGREnvelope const& sOther ) {
      97                 :         if(Intersects(sOther))
      98                 :         {
      99                 :             if( IsInit() )
     100                 :             {
     101                 :                 MinX = MAX(MinX,sOther.MinX);
     102                 :                 MaxX = MIN(MaxX,sOther.MaxX);
     103                 :                 MinY = MAX(MinY,sOther.MinY);
     104                 :                 MaxY = MIN(MaxY,sOther.MaxY);
     105                 :             }
     106                 :             else
     107                 :             {
     108                 :                 MinX = sOther.MinX;
     109                 :                 MaxX = sOther.MaxX;
     110                 :                 MinY = sOther.MinY;
     111                 :                 MaxY = sOther.MaxY;
     112                 :             }
     113                 :         }
     114                 :         else
     115                 :         {
     116                 :             MinX = 0;
     117                 :             MaxX = 0;
     118                 :             MinY = 0;
     119                 :             MaxY = 0;
     120                 :         }
     121                 :     }
     122                 :  
     123               0 :     int Intersects(OGREnvelope const& other) const
     124                 :     {
     125                 :         return MinX <= other.MaxX && MaxX >= other.MinX && 
     126               0 :                MinY <= other.MaxY && MaxY >= other.MinY;
     127                 :     }
     128                 : 
     129           25488 :     int Contains(OGREnvelope const& other) const
     130                 :     {
     131                 :         return MinX <= other.MinX && MinY <= other.MinY &&
     132           25488 :                MaxX >= other.MaxX && MaxY >= other.MaxY;
     133                 :     }
     134                 : };
     135                 : #else
     136                 : typedef struct
     137                 : {
     138                 :     double      MinX;
     139                 :     double      MaxX;
     140                 :     double      MinY;
     141                 :     double      MaxY;
     142                 : } OGREnvelope;
     143                 : #endif
     144                 : 
     145                 : 
     146                 : /**
     147                 :  * Simple container for a bounding region in 3D.
     148                 :  */
     149                 : 
     150                 : #if defined(__cplusplus) && !defined(CPL_SUPRESS_CPLUSPLUS)
     151                 : class CPL_DLL OGREnvelope3D : public OGREnvelope
     152                 : {
     153                 :   public:
     154            1388 :         OGREnvelope3D() : OGREnvelope(), MinZ(0.0), MaxZ(0.0)
     155                 :         {
     156            1388 :         }
     157                 : 
     158                 :         OGREnvelope3D(const OGREnvelope3D& oOther) :
     159                 :                             OGREnvelope(oOther),
     160                 :                             MinZ(oOther.MinZ), MaxZ(oOther.MaxZ)
     161                 :         {
     162                 :         }
     163                 : 
     164                 :     double      MinZ;
     165                 :     double      MaxZ;
     166                 : 
     167                 :     int  IsInit() const { return MinX != 0 || MinY != 0 || MaxX != 0 || MaxY != 0 || MinZ != 0 || MaxZ != 0; }
     168                 :     void Merge( OGREnvelope3D const& sOther ) {
     169                 :         if( IsInit() )
     170                 :         {
     171                 :             MinX = MIN(MinX,sOther.MinX);
     172                 :             MaxX = MAX(MaxX,sOther.MaxX);
     173                 :             MinY = MIN(MinY,sOther.MinY);
     174                 :             MaxY = MAX(MaxY,sOther.MaxY);
     175                 :             MinZ = MIN(MinZ,sOther.MinZ);
     176                 :             MaxZ = MAX(MaxZ,sOther.MaxZ);
     177                 :         }
     178                 :         else
     179                 :         {
     180                 :             MinX = sOther.MinX;
     181                 :             MaxX = sOther.MaxX;
     182                 :             MinY = sOther.MinY;
     183                 :             MaxY = sOther.MaxY;
     184                 :             MinZ = sOther.MinZ;
     185                 :             MaxZ = sOther.MaxZ;
     186                 :         }
     187                 :     }
     188                 :     void Merge( double dfX, double dfY, double dfZ ) {
     189                 :         if( IsInit() )
     190                 :         {
     191                 :             MinX = MIN(MinX,dfX);
     192                 :             MaxX = MAX(MaxX,dfX);
     193                 :             MinY = MIN(MinY,dfY);
     194                 :             MaxY = MAX(MaxY,dfY);
     195                 :             MinZ = MIN(MinZ,dfZ);
     196                 :             MaxZ = MAX(MaxZ,dfZ);
     197                 :         }
     198                 :         else
     199                 :         {
     200                 :             MinX = MaxX = dfX;
     201                 :             MinY = MaxY = dfY;
     202                 :             MinZ = MaxZ = dfZ;
     203                 :         }
     204                 :     }
     205                 : 
     206                 :     void Intersect( OGREnvelope3D const& sOther ) {
     207                 :         if(Intersects(sOther))
     208                 :         {
     209                 :             if( IsInit() )
     210                 :             {
     211                 :                 MinX = MAX(MinX,sOther.MinX);
     212                 :                 MaxX = MIN(MaxX,sOther.MaxX);
     213                 :                 MinY = MAX(MinY,sOther.MinY);
     214                 :                 MaxY = MIN(MaxY,sOther.MaxY);
     215                 :                 MinZ = MAX(MinZ,sOther.MinZ);
     216                 :                 MaxZ = MIN(MaxZ,sOther.MaxZ);
     217                 :             }
     218                 :             else
     219                 :             {
     220                 :                 MinX = sOther.MinX;
     221                 :                 MaxX = sOther.MaxX;
     222                 :                 MinY = sOther.MinY;
     223                 :                 MaxY = sOther.MaxY;
     224                 :                 MinZ = sOther.MinZ;
     225                 :                 MaxZ = sOther.MaxZ;
     226                 :             }
     227                 :         }
     228                 :         else
     229                 :         {
     230                 :             MinX = 0;
     231                 :             MaxX = 0;
     232                 :             MinY = 0;
     233                 :             MaxY = 0;
     234                 :             MinZ = 0;
     235                 :             MaxZ = 0;
     236                 :         }
     237                 :     }
     238                 : 
     239                 :     int Intersects(OGREnvelope3D const& other) const
     240                 :     {
     241                 :         return MinX <= other.MaxX && MaxX >= other.MinX &&
     242                 :                MinY <= other.MaxY && MaxY >= other.MinY &&
     243                 :                MinZ <= other.MaxZ && MaxZ >= other.MinZ;
     244                 :     }
     245                 : 
     246                 :     int Contains(OGREnvelope3D const& other) const
     247                 :     {
     248                 :         return MinX <= other.MinX && MinY <= other.MinY &&
     249                 :                MaxX >= other.MaxX && MaxY >= other.MaxY &&
     250                 :                MaxZ >= other.MaxZ && MaxZ >= other.MaxZ;
     251                 :     }
     252                 : };
     253                 : #else
     254                 : typedef struct
     255                 : {
     256                 :     double      MinX;
     257                 :     double      MaxX;
     258                 :     double      MinY;
     259                 :     double      MaxY;
     260                 :     double      MinZ;
     261                 :     double      MaxZ;
     262                 : } OGREnvelope3D;
     263                 : #endif
     264                 : 
     265                 : 
     266                 : CPL_C_START
     267                 : 
     268                 : void CPL_DLL *OGRMalloc( size_t );
     269                 : void CPL_DLL *OGRCalloc( size_t, size_t );
     270                 : void CPL_DLL *OGRRealloc( void *, size_t );
     271                 : char CPL_DLL *OGRStrdup( const char * );
     272                 : void CPL_DLL OGRFree( void * );
     273                 : 
     274                 : typedef int OGRErr;
     275                 : 
     276                 : #define OGRERR_NONE                0
     277                 : #define OGRERR_NOT_ENOUGH_DATA     1    /* not enough data to deserialize */
     278                 : #define OGRERR_NOT_ENOUGH_MEMORY   2
     279                 : #define OGRERR_UNSUPPORTED_GEOMETRY_TYPE 3
     280                 : #define OGRERR_UNSUPPORTED_OPERATION 4
     281                 : #define OGRERR_CORRUPT_DATA        5
     282                 : #define OGRERR_FAILURE             6
     283                 : #define OGRERR_UNSUPPORTED_SRS     7
     284                 : #define OGRERR_INVALID_HANDLE      8
     285                 : 
     286                 : typedef int     OGRBoolean;
     287                 : 
     288                 : /* -------------------------------------------------------------------- */
     289                 : /*      ogr_geometry.h related definitions.                             */
     290                 : /* -------------------------------------------------------------------- */
     291                 : /**
     292                 :  * List of well known binary geometry types.  These are used within the BLOBs
     293                 :  * but are also returned from OGRGeometry::getGeometryType() to identify the
     294                 :  * type of a geometry object.
     295                 :  */
     296                 : 
     297                 : typedef enum 
     298                 : {
     299                 :     wkbUnknown = 0,         /**< unknown type, non-standard */
     300                 :     wkbPoint = 1,           /**< 0-dimensional geometric object, standard WKB */
     301                 :     wkbLineString = 2,      /**< 1-dimensional geometric object with linear
     302                 :                              *   interpolation between Points, standard WKB */
     303                 :     wkbPolygon = 3,         /**< planar 2-dimensional geometric object defined
     304                 :                              *   by 1 exterior boundary and 0 or more interior
     305                 :                              *   boundaries, standard WKB */
     306                 :     wkbMultiPoint = 4,      /**< GeometryCollection of Points, standard WKB */
     307                 :     wkbMultiLineString = 5, /**< GeometryCollection of LineStrings, standard WKB */
     308                 :     wkbMultiPolygon = 6,    /**< GeometryCollection of Polygons, standard WKB */
     309                 :     wkbGeometryCollection = 7, /**< geometric object that is a collection of 1
     310                 :                                     or more geometric objects, standard WKB */
     311                 :     wkbNone = 100,          /**< non-standard, for pure attribute records */
     312                 :     wkbLinearRing = 101,    /**< non-standard, just for createGeometry() */
     313                 :     wkbPoint25D = 0x80000001, /**< 2.5D extension as per 99-402 */
     314                 :     wkbLineString25D = 0x80000002, /**< 2.5D extension as per 99-402 */
     315                 :     wkbPolygon25D = 0x80000003, /**< 2.5D extension as per 99-402 */
     316                 :     wkbMultiPoint25D = 0x80000004, /**< 2.5D extension as per 99-402 */
     317                 :     wkbMultiLineString25D = 0x80000005, /**< 2.5D extension as per 99-402 */
     318                 :     wkbMultiPolygon25D = 0x80000006, /**< 2.5D extension as per 99-402 */
     319                 :     wkbGeometryCollection25D = 0x80000007 /**< 2.5D extension as per 99-402 */
     320                 : } OGRwkbGeometryType;
     321                 : 
     322                 : #define wkb25DBit 0x80000000
     323                 : #define wkbFlatten(x)  ((OGRwkbGeometryType) ((x) & (~wkb25DBit)))
     324                 : 
     325                 : #define ogrZMarker 0x21125711
     326                 : 
     327                 : const char CPL_DLL * OGRGeometryTypeToName( OGRwkbGeometryType eType );
     328                 : OGRwkbGeometryType CPL_DLL OGRMergeGeometryTypes( OGRwkbGeometryType eMain,
     329                 :                                                   OGRwkbGeometryType eExtra );
     330                 : 
     331                 : typedef enum 
     332                 : {
     333                 :     wkbXDR = 0,         /* MSB/Sun/Motoroloa: Most Significant Byte First   */
     334                 :     wkbNDR = 1          /* LSB/Intel/Vax: Least Significant Byte First      */
     335                 : } OGRwkbByteOrder;
     336                 : 
     337                 : #ifndef NO_HACK_FOR_IBM_DB2_V72
     338                 : #  define HACK_FOR_IBM_DB2_V72
     339                 : #endif
     340                 : 
     341                 : #ifdef HACK_FOR_IBM_DB2_V72
     342                 : #  define DB2_V72_FIX_BYTE_ORDER(x) ((((x) & 0x31) == (x)) ? (OGRwkbByteOrder) ((x) & 0x1) : (x))
     343                 : #  define DB2_V72_UNFIX_BYTE_ORDER(x) ((unsigned char) (OGRGeometry::bGenerate_DB2_V72_BYTE_ORDER ? ((x) | 0x30) : (x)))
     344                 : #else
     345                 : #  define DB2_V72_FIX_BYTE_ORDER(x) (x)
     346                 : #  define DB2_V72_UNFIX_BYTE_ORDER(x) (x)
     347                 : #endif
     348                 : 
     349                 : #define ALTER_NAME_FLAG            0x1
     350                 : #define ALTER_TYPE_FLAG            0x2
     351                 : #define ALTER_WIDTH_PRECISION_FLAG 0x4
     352                 : #define ALTER_ALL_FLAG             (ALTER_NAME_FLAG | ALTER_TYPE_FLAG | ALTER_WIDTH_PRECISION_FLAG)
     353                 : 
     354                 : /************************************************************************/
     355                 : /*                  ogr_feature.h related definitions.                  */
     356                 : /************************************************************************/
     357                 : 
     358                 : /**
     359                 :  * List of feature field types.  This list is likely to be extended in the
     360                 :  * future ... avoid coding applications based on the assumption that all
     361                 :  * field types can be known.
     362                 :  */
     363                 : 
     364                 : typedef enum 
     365                 : {
     366                 :   /** Simple 32bit integer */                   OFTInteger = 0,
     367                 :   /** List of 32bit integers */                 OFTIntegerList = 1,
     368                 :   /** Double Precision floating point */        OFTReal = 2,
     369                 :   /** List of doubles */                        OFTRealList = 3,
     370                 :   /** String of ASCII chars */                  OFTString = 4,
     371                 :   /** Array of strings */                       OFTStringList = 5,
     372                 :   /** deprecated */                             OFTWideString = 6,
     373                 :   /** deprecated */                             OFTWideStringList = 7,
     374                 :   /** Raw Binary data */                        OFTBinary = 8,
     375                 :   /** Date */                                   OFTDate = 9,
     376                 :   /** Time */                                   OFTTime = 10,
     377                 :   /** Date and Time */                          OFTDateTime = 11,
     378                 :                                                 OFTMaxType = 11
     379                 : } OGRFieldType;
     380                 : 
     381                 : /**
     382                 :  * Display justification for field values.
     383                 :  */
     384                 : 
     385                 : typedef enum 
     386                 : {
     387                 :     OJUndefined = 0,
     388                 :     OJLeft = 1,
     389                 :     OJRight = 2
     390                 : } OGRJustification;
     391                 : 
     392                 : #define OGRNullFID            -1
     393                 : #define OGRUnsetMarker        -21121
     394                 : 
     395                 : /************************************************************************/
     396                 : /*                               OGRField                               */
     397                 : /************************************************************************/
     398                 : 
     399                 : /**
     400                 :  * OGRFeature field attribute value union.
     401                 :  */
     402                 : 
     403                 : typedef union {
     404                 :     int         Integer;
     405                 :     double      Real;
     406                 :     char       *String;
     407                 :     
     408                 :     struct {
     409                 :         int     nCount;
     410                 :         int     *paList;
     411                 :     } IntegerList;
     412                 :     
     413                 :     struct {
     414                 :         int     nCount;
     415                 :         double  *paList;
     416                 :     } RealList;
     417                 :     
     418                 :     struct {
     419                 :         int     nCount;
     420                 :         char    **paList;
     421                 :     } StringList;
     422                 : 
     423                 :     struct {
     424                 :         int     nCount;
     425                 :         GByte   *paData;
     426                 :     } Binary;
     427                 :     
     428                 :     struct {
     429                 :         int     nMarker1;
     430                 :         int     nMarker2;
     431                 :     } Set;
     432                 : 
     433                 :     struct {
     434                 :         GInt16  Year;
     435                 :         GByte   Month;
     436                 :         GByte   Day;
     437                 :         GByte   Hour;
     438                 :         GByte   Minute;
     439                 :         GByte   Second;
     440                 :         GByte   TZFlag; /* 0=unknown, 1=localtime(ambiguous), 
     441                 :                            100=GMT, 104=GMT+1, 80=GMT-5, etc */
     442                 :     } Date;
     443                 : } OGRField;
     444                 : 
     445                 : int CPL_DLL OGRParseDate( const char *pszInput, OGRField *psOutput, 
     446                 :                           int nOptions );
     447                 : 
     448                 : /* -------------------------------------------------------------------- */
     449                 : /*      Constants from ogrsf_frmts.h for capabilities.                  */
     450                 : /* -------------------------------------------------------------------- */
     451                 : #define OLCRandomRead          "RandomRead"
     452                 : #define OLCSequentialWrite     "SequentialWrite"
     453                 : #define OLCRandomWrite         "RandomWrite"
     454                 : #define OLCFastSpatialFilter   "FastSpatialFilter"
     455                 : #define OLCFastFeatureCount    "FastFeatureCount"
     456                 : #define OLCFastGetExtent       "FastGetExtent"
     457                 : #define OLCCreateField         "CreateField"
     458                 : #define OLCDeleteField         "DeleteField"
     459                 : #define OLCReorderFields       "ReorderFields"
     460                 : #define OLCAlterFieldDefn      "AlterFieldDefn"
     461                 : #define OLCTransactions        "Transactions"
     462                 : #define OLCDeleteFeature       "DeleteFeature"
     463                 : #define OLCFastSetNextByIndex  "FastSetNextByIndex"
     464                 : #define OLCStringsAsUTF8       "StringsAsUTF8"
     465                 : #define OLCIgnoreFields        "IgnoreFields"
     466                 : 
     467                 : #define ODsCCreateLayer        "CreateLayer"
     468                 : #define ODsCDeleteLayer        "DeleteLayer"
     469                 : 
     470                 : #define ODrCCreateDataSource   "CreateDataSource"
     471                 : #define ODrCDeleteDataSource   "DeleteDataSource"
     472                 : 
     473                 : 
     474                 : /************************************************************************/
     475                 : /*                  ogr_featurestyle.h related definitions.             */
     476                 : /************************************************************************/
     477                 : 
     478                 : /**
     479                 :  * OGRStyleTool derived class types (returned by GetType()).
     480                 :  */
     481                 : 
     482                 : typedef enum ogr_style_tool_class_id
     483                 : {
     484                 :     OGRSTCNone   = 0,
     485                 :     OGRSTCPen    = 1,
     486                 :     OGRSTCBrush  = 2,
     487                 :     OGRSTCSymbol = 3,
     488                 :     OGRSTCLabel  = 4,
     489                 :     OGRSTCVector = 5
     490                 : } OGRSTClassId;
     491                 : 
     492                 : /**
     493                 :  * List of units supported by OGRStyleTools.
     494                 :  */
     495                 : typedef enum ogr_style_tool_units_id
     496                 : {
     497                 :     OGRSTUGround = 0,
     498                 :     OGRSTUPixel  = 1,
     499                 :     OGRSTUPoints = 2,
     500                 :     OGRSTUMM     = 3,
     501                 :     OGRSTUCM     = 4,
     502                 :     OGRSTUInches = 5
     503                 : } OGRSTUnitId;
     504                 : 
     505                 : /**
     506                 :  * List of parameters for use with OGRStylePen.
     507                 :  */
     508                 : typedef enum ogr_style_tool_param_pen_id
     509                 : {  
     510                 :     OGRSTPenColor       = 0,                   
     511                 :     OGRSTPenWidth       = 1,                   
     512                 :     OGRSTPenPattern     = 2,
     513                 :     OGRSTPenId          = 3,
     514                 :     OGRSTPenPerOffset   = 4,
     515                 :     OGRSTPenCap         = 5,
     516                 :     OGRSTPenJoin        = 6,
     517                 :     OGRSTPenPriority    = 7,
     518                 :     OGRSTPenLast        = 8
     519                 :               
     520                 : } OGRSTPenParam;
     521                 : 
     522                 : /**
     523                 :  * List of parameters for use with OGRStyleBrush.
     524                 :  */
     525                 : typedef enum ogr_style_tool_param_brush_id
     526                 : {  
     527                 :     OGRSTBrushFColor    = 0,                   
     528                 :     OGRSTBrushBColor    = 1,                   
     529                 :     OGRSTBrushId        = 2,
     530                 :     OGRSTBrushAngle     = 3,                   
     531                 :     OGRSTBrushSize      = 4,
     532                 :     OGRSTBrushDx        = 5,
     533                 :     OGRSTBrushDy        = 6,
     534                 :     OGRSTBrushPriority  = 7,
     535                 :     OGRSTBrushLast      = 8
     536                 :               
     537                 : } OGRSTBrushParam;
     538                 : 
     539                 : 
     540                 : /**
     541                 :  * List of parameters for use with OGRStyleSymbol.
     542                 :  */
     543                 : typedef enum ogr_style_tool_param_symbol_id
     544                 : {  
     545                 :     OGRSTSymbolId       = 0,
     546                 :     OGRSTSymbolAngle    = 1,
     547                 :     OGRSTSymbolColor    = 2,
     548                 :     OGRSTSymbolSize     = 3,
     549                 :     OGRSTSymbolDx       = 4,
     550                 :     OGRSTSymbolDy       = 5,
     551                 :     OGRSTSymbolStep     = 6,
     552                 :     OGRSTSymbolPerp     = 7,
     553                 :     OGRSTSymbolOffset   = 8,
     554                 :     OGRSTSymbolPriority = 9,
     555                 :     OGRSTSymbolFontName = 10,
     556                 :     OGRSTSymbolOColor   = 11,
     557                 :     OGRSTSymbolLast     = 12
     558                 :               
     559                 : } OGRSTSymbolParam;
     560                 : 
     561                 : /**
     562                 :  * List of parameters for use with OGRStyleLabel.
     563                 :  */
     564                 : typedef enum ogr_style_tool_param_label_id
     565                 : {  
     566                 :     OGRSTLabelFontName  = 0,
     567                 :     OGRSTLabelSize      = 1,
     568                 :     OGRSTLabelTextString = 2,
     569                 :     OGRSTLabelAngle     = 3,
     570                 :     OGRSTLabelFColor    = 4,
     571                 :     OGRSTLabelBColor    = 5,
     572                 :     OGRSTLabelPlacement = 6,
     573                 :     OGRSTLabelAnchor    = 7,
     574                 :     OGRSTLabelDx        = 8,
     575                 :     OGRSTLabelDy        = 9,
     576                 :     OGRSTLabelPerp      = 10,
     577                 :     OGRSTLabelBold      = 11,
     578                 :     OGRSTLabelItalic    = 12,
     579                 :     OGRSTLabelUnderline = 13,
     580                 :     OGRSTLabelPriority  = 14,
     581                 :     OGRSTLabelStrikeout = 15,
     582                 :     OGRSTLabelStretch   = 16,
     583                 :     OGRSTLabelAdjHor    = 17,
     584                 :     OGRSTLabelAdjVert   = 18,
     585                 :     OGRSTLabelHColor    = 19,
     586                 :     OGRSTLabelOColor    = 20,
     587                 :     OGRSTLabelLast      = 21
     588                 :               
     589                 : } OGRSTLabelParam;
     590                 : 
     591                 : /* ------------------------------------------------------------------- */
     592                 : /*                        Version checking                             */
     593                 : /* -------------------------------------------------------------------- */
     594                 : 
     595                 : /* Note to developers : please keep this section in sync with gdal.h */
     596                 : 
     597                 : #ifndef GDAL_VERSION_INFO_DEFINED
     598                 : #define GDAL_VERSION_INFO_DEFINED
     599                 : const char CPL_DLL * CPL_STDCALL GDALVersionInfo( const char * );
     600                 : #endif
     601                 : 
     602                 : #ifndef GDAL_CHECK_VERSION
     603                 : 
     604                 : /** Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor.
     605                 : 
     606                 :     The purpose of this method is to ensure that calling code will run with the GDAL
     607                 :     version it is compiled for. It is primarly intented for external plugins.
     608                 : 
     609                 :     @param nVersionMajor Major version to be tested against
     610                 :     @param nVersionMinor Minor version to be tested against
     611                 :     @param pszCallingComponentName If not NULL, in case of version mismatch, the method
     612                 :                                    will issue a failure mentionning the name of
     613                 :                                    the calling component.
     614                 :   */
     615                 : int CPL_DLL CPL_STDCALL GDALCheckVersion( int nVersionMajor, int nVersionMinor,
     616                 :                                           const char* pszCallingComponentName);
     617                 : 
     618                 : /** Helper macro for GDALCheckVersion */
     619                 : #define GDAL_CHECK_VERSION(pszCallingComponentName) \
     620                 :  GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)
     621                 : 
     622                 : #endif
     623                 : 
     624                 : CPL_C_END
     625                 : 
     626                 : #endif /* ndef OGR_CORE_H_INCLUDED */

Generated by: LCOV version 1.7