Version: 0.6.0
map.h
1 /******************************************************************************
2  * Project: wxGIS
3  * Purpose: wxGISMap 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/carto/carto.h"
24 #include "wxgis/carto/layer.h"
25 
32 class WXDLLIMPEXP_GIS_CRT wxGISMap
33 {
34 public:
35  wxGISMap(void);
36  virtual ~wxGISMap(void);
37  virtual void SetName(const wxString &sName) {m_sMapName = sName;};
38  virtual wxString GetName(void) const {return m_sMapName;};
39  virtual bool AddLayer(wxGISLayer* pLayer);
40  virtual void ChangeLayerOrder(size_t nOldIndex, size_t nNewIndex);
41  virtual void Clear(void);
42  virtual size_t GetLayerCount(void) const {return m_paLayers.size();};
43  virtual wxGISLayer* const GetLayerByIndex(size_t nIndex);
44  virtual wxGISLayer* const GetLayerById(short nId);
45  virtual wxString GetDescription(void) const { return m_sDescription; };
46  virtual void SetDescription(const wxString &sDescription){m_sDescription = sDescription;};
47  virtual OGREnvelope GetFullExtent(void) const;
48  virtual void SetSpatialReference(const wxGISSpatialReference &SpatialReference);
49  virtual wxGISSpatialReference GetSpatialReference(void) const;
50  virtual bool HasLayerType(wxGISEnumDatasetType eType) const;
51 protected:
52  wxString m_sMapName, m_sDescription;
53  wxVector<wxGISLayer*> m_paLayers;
54  wxGISSpatialReference m_SpatialReference;
55  wxGISDisplay *m_pGISDisplay;
56  OGREnvelope m_FullExtent;
57  bool m_bFullExtIsInit;
58  short m_nIdCounter;
59  wxCriticalSection m_CritSect;
60 };
61 
68 class WXDLLIMPEXP_GIS_CRT wxGISExtentStack :
69  public wxGISMap
70 {
71 public:
72  wxGISExtentStack(void);
73  virtual ~wxGISExtentStack(void);
74  virtual bool CanRedo(void);
75  virtual bool CanUndo(void);
76  virtual void Redo(void);
77  virtual void Undo(void);
78  virtual void Clear(void);
79  virtual size_t GetSize(void) const;
80  virtual void Do(const OGREnvelope &Env);
81  virtual OGREnvelope GetCurrentExtent(void) const;
82  virtual void SetExtent(const OGREnvelope &Env);
83 protected:
84  wxVector<OGREnvelope> m_staEnvelope;
85  int m_nPos;
86  OGREnvelope m_CurrentExtent;
87 };
Definition: gisdisplay.h:43
Definition: layer.h:35
Definition: map.h:32
Definition: gdalinh.h:57
Definition: map.h:68