ogr_oci.h

来自「支持各种栅格图像和矢量图像读取的库」· C头文件 代码 · 共 540 行 · 第 1/2 页

H
540
字号
    int                 nOrdinalCount;    int                 nOrdinalMax;    double             *padfOrdinals;    int                 nElemInfoCount;    int                 nElemInfoMax;    int                *panElemInfo;    void                PushOrdinal( double );    void                PushElemInfo( int, int, int );    OGRErr              TranslateToSDOGeometry( OGRGeometry *,                                                int *pnGType );    OGRErr              TranslateElementGroup( OGRGeometry *poGeometry );    int                 bLaunderColumnNames;    int                 bPreservePrecision;    OGRSpatialReference *poSRS;    char              **papszOptions;    int                 bTruncationReported;    void                ReportTruncation( OGRFieldDefn * );    void                ParseDIMINFO( const char *, double *, double *,                                      double * );                        OGROCIWritableLayer();    virtual            ~OGROCIWritableLayer();public:    virtual OGRSpatialReference *GetSpatialRef() { return poSRS; }    virtual OGRErr      CreateField( OGRFieldDefn *poField,                                     int bApproxOK = TRUE );    // following methods are not base class overrides    void                SetOptions( char ** );    void                SetDimension( int );    void                SetLaunderFlag( int bFlag )                                 { bLaunderColumnNames = bFlag; }    void                SetPrecisionFlag( int bFlag )                                 { bPreservePrecision = bFlag; }};/************************************************************************//*                          OGROCILoaderLayer                           *//************************************************************************/#define LDRM_UNKNOWN  0#define LDRM_STREAM   1#define LDRM_VARIABLE 2#define LDRM_BINARY   3class OGROCILoaderLayer : public OGROCIWritableLayer{    OGREnvelope         sExtent;    int                 iNextFIDToWrite;    char                *pszLoaderFilename;        FILE                *fpLoader;    int                 bHeaderWritten;    FILE                *fpData;    int                 nLDRMode;    void                WriteLoaderHeader();    void                FinalizeNewLayer();    OGRErr              WriteFeatureStreamMode( OGRFeature * );    OGRErr              WriteFeatureVariableMode( OGRFeature * );    OGRErr              WriteFeatureBinaryMode( OGRFeature * );  public:                        OGROCILoaderLayer( OGROCIDataSource *,                                           const char * pszName,                                           const char *pszGeomCol,                                            int nSRID,                                            const char *pszLoaderFile );                        ~OGROCILoaderLayer();    virtual void        ResetReading();    virtual int         GetFeatureCount( int );    virtual void        SetSpatialFilter( OGRGeometry * ) {}    virtual OGRErr      SetAttributeFilter( const char * )                                 { return OGRERR_UNSUPPORTED_OPERATION; }    virtual OGRFeature *GetNextFeature();    virtual OGRErr      CreateFeature( OGRFeature *poFeature );        virtual OGRSpatialReference *GetSpatialRef() { return poSRS; }    virtual int         TestCapability( const char * );};/************************************************************************//*                           OGROCITableLayer                            *//************************************************************************/class OGROCITableLayer : public OGROCIWritableLayer{    int                 bUpdateAccess;    int                 bNewLayer;    OGREnvelope         sExtent;    int                 iNextFIDToWrite;    int                 bHaveSpatialIndex;    OGRFeatureDefn     *ReadTableDefinition(const char *);    void                BuildWhere(void);    char               *BuildFields(void);    void                BuildFullQueryStatement(void);    char               *pszQuery;    char               *pszWHERE;    int                 bValidTable;    OCIArray           *hOrdVARRAY;    OCIArray           *hElemInfoVARRAY;    void                FinalizeNewLayer();    void                TestForSpatialIndex( const char * );    OGROCIStatement   *poBoundStatement;     int                 nWriteCacheMax;    int                 nWriteCacheUsed;    SDO_GEOMETRY_TYPE  *pasWriteGeoms;    SDO_GEOMETRY_TYPE **papsWriteGeomMap;    SDO_GEOMETRY_ind   *pasWriteGeomInd;    SDO_GEOMETRY_ind  **papsWriteGeomIndMap;        void              **papWriteFields;    OCIInd            **papaeWriteFieldInd;    int                *panWriteFIDs;    int                 AllocAndBindForWrite();    OGRErr              FlushPendingFeatures();    OGRErr              UnboundCreateFeature( OGRFeature *poFeature );    OGRErr              BoundCreateFeature( OGRFeature *poFeature );  public:                        OGROCITableLayer( OGROCIDataSource *,                                          const char * pszName,                                          int nSRID, int bUpdate, int bNew );                        ~OGROCITableLayer();    virtual void        ResetReading();    virtual int         GetFeatureCount( int );    virtual void        SetSpatialFilter( OGRGeometry * );    virtual OGRErr      SetAttributeFilter( const char * );    virtual OGRFeature *GetNextFeature();    virtual OGRFeature *GetFeature( long nFeatureId );    virtual OGRErr      SetFeature( OGRFeature *poFeature );    virtual OGRErr      CreateFeature( OGRFeature *poFeature );    virtual OGRErr      DeleteFeature( long nFID );        virtual int         TestCapability( const char * );    virtual OGRErr      SyncToDisk();    // following methods are not base class overrides    int                 IsValid() { return bValidTable; }};/************************************************************************//*                          OGROCISelectLayer                           *//************************************************************************/class OGROCISelectLayer : public OGROCILayer{    OGRFeatureDefn     *ReadTableDefinition( OGROCIStatement * poStatement );  public:                        OGROCISelectLayer( OGROCIDataSource *,                                           const char * pszName,                                           OGROCIStatement *poStatement );                        ~OGROCISelectLayer();};/************************************************************************//*                           OGROCIDataSource                           *//************************************************************************/class OGROCIDataSource : public OGRDataSource{    OGROCILayer       **papoLayers;    int                 nLayers;        char               *pszName;    char               *pszDBName;    int                 bDSUpdate;    OGROCISession      *poSession;    // We maintain a list of known SRID to reduce the number of trips to    // the database to get SRSes.     int                 nKnownSRID;    int                *panSRID;    OGRSpatialReference **papoSRS;      public:                        OGROCIDataSource();                        ~OGROCIDataSource();    OGROCISession      *GetSession() { return poSession; }    int                 Open( const char *, int bUpdate, int bTestOpen );    int                 OpenTable( const char *pszTableName,                                    int nSRID, int bUpdate, int bTestOpen );    const char          *GetName() { return pszName; }    int                 GetLayerCount() { return nLayers; }    OGRLayer            *GetLayer( int );    virtual OGRLayer    *CreateLayer( const char *,                                       OGRSpatialReference * = NULL,                                      OGRwkbGeometryType = wkbUnknown,                                      char ** = NULL );    int                 TestCapability( const char * );    void                DeleteLayer( const char * );    void                ValidateLayer( const char * );        virtual OGRLayer *  ExecuteSQL( const char *pszSQLCommand,                                    OGRGeometry *poSpatialFilter,                                    const char *pszDialect );    virtual void        ReleaseResultSet( OGRLayer * poLayer );    int                 FetchSRSId( OGRSpatialReference * poSRS );    OGRSpatialReference *FetchSRS( int nSRID );};/************************************************************************//*                             OGROCIDriver                             *//************************************************************************/class OGROCIDriver : public OGRSFDriver{  public:                ~OGROCIDriver();                    const char *GetName();    OGRDataSource *Open( const char *, int );    virtual OGRDataSource *CreateDataSource( const char *pszName,                                             char ** = NULL );        int                 TestCapability( const char * );};#endif /* ndef _OGR_OCI_H_INCLUDED */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?