All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
SystematicScaleConfig.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file SystematicScaleConfig.cpp
22 
23  \brief
24 
25  \ingroup layout
26 */
27 
28 // TerraLib
29 #include "SystematicScaleConfig.h"
30 #include "Systematic.h"
31 
33 {
34 
35 }
36 
38 {
39 
40 }
41 
43 {
44  Systematic* systematic = new Systematic;
45 
46  double w = 0.;
47  double h = 0.;
48  int scale = 0;
49  double planarGap = 0.;
50  double geoGap = 0.;
51 
52  switch(type)
53  {
54  case S250000:
55  w = 1.5;
56  h = 1.;
57  scale = 250000;
58  planarGap = 10000;
59  geoGap = 15;//minutes
60  break;
61  case S100000:
62  w = 0.5;
63  h = 0.5;
64  scale = 100000;
65  planarGap = 4000;
66  geoGap = 10;//minutes
67  break;
68  case S50000:
69  w = 0.25;
70  h = 0.25;
71  scale = 50000;
72  planarGap = 2000;
73  geoGap = 5;//minutes
74  break;
75  case S25000:
76  w = 0.125;
77  h = 0.125;
78  scale = 25000;
79  planarGap = 10000;
80  geoGap = 2.5;//minutes
81  break;
82  case S0:
83  break;
84  default:
85  break;
86  }
87 
88  systematic->setWidth(w);
89  systematic->setHeight(h);
90  systematic->setScale(scale);
91  systematic->setPlanarGap(planarGap);
92  systematic->setGeoGap(geoGap);
93 
94  return systematic;
95 }
virtual void setGeoGap(double gap)
Definition: Systematic.cpp:87
virtual void setWidth(double w)
Definition: Systematic.cpp:47
virtual void setScale(int scale)
Definition: Systematic.cpp:67
S250000
Definition: AbstractType.h:121
S100000
Definition: AbstractType.h:121
virtual Systematic * getSystematic(SystematicScaleType type)
S50000
Definition: AbstractType.h:121
S25000
Definition: AbstractType.h:121
virtual void setHeight(double h)
Definition: Systematic.cpp:57
virtual void setPlanarGap(double gap)
Definition: Systematic.cpp:77