Version: 0.6.0
rasterdataset.h
1 /******************************************************************************
2  * Project: wxGIS (GIS Catalog)
3  * Purpose: RasterDataset class.
4  * Author: Dmitry Baryshnikov (aka Bishop), polimax@mail.ru
5  ******************************************************************************
6 * Copyright (C) 2009-2011,2013 Dmitry Baryshnikov
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation, either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <http://www.gnu.org/licenses/>.
20  ****************************************************************************/
21 #pragma once
22 
23 #include "wxgis/datasource/dataset.h"
24 
32 class WXDLLIMPEXP_GIS_DS wxGISRasterDataset :
33  public wxGISDataset
34 {
35  DECLARE_CLASS(wxGISRasterDataset)
36 public:
37  wxGISRasterDataset(const CPLString &sPath = "", wxGISEnumRasterDatasetType nType = enumRasterUnknown);
38  virtual ~wxGISRasterDataset(void);
39  // wxGISDataset
40  virtual const wxGISSpatialReference GetSpatialReference(void);
41  virtual wxString GetName(void);
42  virtual void Close(void);
43  virtual void Cache(ITrackCancel* const pTrackCancel = NULL){};
44  virtual bool Rename(const wxString &sNewName, ITrackCancel* const pTrackCancel = NULL);
45  virtual bool Copy(const CPLString &szDestPath, ITrackCancel* const pTrackCancel = NULL);
46  virtual bool Move(const CPLString &szDestPath, ITrackCancel* const pTrackCancel = NULL);
47  virtual char **GetFileList();
48  // wxGISRasterDataset
49  virtual bool Open(bool bUpdate = false, bool bShared = true);
50  virtual OGREnvelope GetEnvelope(void);
51  virtual GDALDataType GetDataType(void);
52  virtual GDALDataset* GetRaster(void){return m_poDataset;};
53  virtual GDALDataset* GetMainRaster(void){return m_poMainDataset;};
54  virtual bool HasOverviews(void){return m_bHasOverviews;};
55  virtual void SetHasOverviews(bool bVal){m_bHasOverviews = bVal;};
56  virtual bool HasStatistics(void){return m_bHasStats;};
57  virtual void SetHasStatistics(bool bVal){m_bHasStats = bVal;};
58  virtual int GetWidth(void){return m_nXSize;};
59  virtual int GetHeight(void){return m_nYSize;};
60  virtual int GetBandCount(void){return m_nBandCount;};
61  virtual bool GetPixelData(void *data, int nXOff, int nYOff, int nXSize, int nYSize, int nBufXSize, int nBufYSize, GDALDataType eDT, int nBandCount, int *panBandList);
62  virtual bool HasNoData(int nBand){return !IsDoubleEquil(m_paNoData[nBand - 1], NOTNODATA);};
63  virtual double GetNoData(int nBand){return m_paNoData[nBand - 1];};
64  virtual bool WriteWorldFile(wxGISEnumWldExtType eType);
65 protected:
66  bool FixSAGARaster(const CPLString &szDestPath, const CPLString &szDestName);
67 protected:
68  OGREnvelope m_stExtent;
69  GDALDataset *m_poDataset;
70  GDALDataset *m_poMainDataset;
71  bool m_bHasOverviews;
72  bool m_bHasStats;
73  int m_nXSize;
74  int m_nYSize;
75  int m_nBandCount;
76  GDALDataType m_nDataType;
77  double *m_paNoData;
78 };
79 
Definition: rasterdataset.h:32
A TrackCancel interface class.
Definition: core.h:144
Definition: dataset.h:33
Definition: gdalinh.h:57