30 #include "../core/ContextItem.h" 
   31 #include "../../geometry/Envelope.h" 
   32 #include "../../geometry/Coord2D.h" 
   33 #include "../core/property/Property.h" 
   34 #include "../core/property/GeodesicGridSettingsConfigProperties.h" 
   35 #include "../../srs/Config.h" 
   36 #include "../core/WorldTransformer.h" 
   37 #include "../core/enum/Enums.h" 
   46   m_pointTextSizeCorner(12),
 
   50   m_lneCornerHrzDisplacement(10),
 
   51   m_lneCornerVrtDisplacement(10),
 
   52   m_lowerRightCornerText(false),
 
   53   m_upperRightCornerText(false),
 
   54   m_lowerLeftCornerText(false),
 
   55   m_upperLeftCornerText(false),
 
   56   m_visibleCornerTextsText(false),
 
   82     delete m_settingsConfig;
 
   89   if((!canvas) || (!utils))
 
  111   gridTextFreeMemory();
 
  113   drawVerticalLines(canvas, utils, box);
 
  114   drawHorizontalLines(canvas, utils, box);
 
  129   yInit = m_initialGridPointY;
 
  133     int nParts = (int)(dify/m_lneVrtGap);
 
  136       yInit = m_initialGridPointY;
 
  140       yInit = yInit + (nParts * m_lneVrtGap);
 
  167     if(m_visibleAllTexts)
 
  173         m_gridTexts[coordLeft] = text;
 
  180         m_gridTexts[coordRight] = text;
 
  204   xInit = m_initialGridPointX;
 
  208     int nParts = (int)(difx/m_lneHrzGap);
 
  211       xInit = m_initialGridPointX;
 
  215       xInit = xInit + (nParts * m_lneHrzGap);
 
  241     if(m_visibleAllTexts)
 
  247         m_gridTexts[coordRight] = text;
 
  254         m_gridTexts[coordRight] = text;
 
  271   if(m_initialGridPointX <= 0)
 
  273     m_initialGridPointX = init.
x;
 
  275   if(m_initialGridPointY <= 0)
 
  277     m_initialGridPointY = init.
y;
 
  284       m_lneHrzGap = std::fabs(init.
x - end.
x);
 
  288       m_lneVrtGap = m_lneHrzGap;
 
  292     m_lneVrtGap = m_lneHrzGap = 0.001;
 
  303   setVisibleCornerTextsText(visible);
 
  308   m_visibleCornerTextsText = visible;
 
  310   m_lowerRightCornerText = visible;
 
  311   m_upperRightCornerText = visible;
 
  312   m_lowerLeftCornerText = visible;
 
  313   m_upperLeftCornerText = visible;
 
  318   return m_visibleCornerTextsText;
 
virtual void convertToMillimeter(WorldTransformer transf, te::gm::LinearRing *line)
Convert LinearRing from one coordinate system to mm. 
 
virtual std::string convertDecimalToDegree(const double &value, bool bDegrees, bool bMinutes, bool bSeconds)
Converts decimal geo coordinates to degrees. 
 
Class that represents a "Model" part of GridMap MVC component. Its coordinate system is the same of s...
 
virtual void setFontFamily(const std::string &family)=0
It sets the text font family. 
 
te::layout::WorldTransformer getTransformGeo(te::gm::Envelope boxgeo, te::gm::Envelope boxmm)
Returns a WorldTransformer object to transformations between geo coordinates and millimeter coordinat...
 
virtual void drawHorizontalLines(te::map::Canvas *canvas, Utils *utils, te::gm::Envelope box)
 
const double & getUpperRightX() const 
It returns a constant refernce to the x coordinate of the upper right corner. 
 
virtual void drawText(int x, int y, const std::string &txt, float angle=0.0, te::at::HorizontalAlignment hAlign=te::at::Start, te::at::VerticalAlignment vAlign=te::at::Baseline)=0
It draws a text. 
 
const double & getLowerLeftY() const 
It returns a constant refernce to the y coordinate of the lower left corner. 
 
An utility struct for representing 2D coordinates. 
 
const double & getUpperRightY() const 
It returns a constant refernce to the x coordinate of the upper right corner. 
 
EnumType * m_type
type of the MVC component 
 
virtual void setVisibleCornerTextsText(bool visible)
 
virtual void drawVerticalLines(te::map::Canvas *canvas, Utils *utils, te::gm::Envelope box)
 
A LinearRing is a LineString that is both closed and simple. 
 
static Enums & getInstance()
It returns a reference to the singleton instance. 
 
A point with x and y coordinate values. 
 
int calculatePlanarZone(te::gm::Envelope latLongBox)
Calculates the area from a box in coordinated latlong. 
 
virtual bool isVisibleCornerTextsText()
 
An Envelope defines a 2D rectangular region. 
 
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib. 
 
virtual te::gm::LinearRing * addCoordsInX(te::gm::Envelope box, double axisCoord, double gap)
Creates a line with n points in x axis. Method used to create the grid lines on a map...
 
virtual void calculateGaps(te::gm::Envelope box)
 
virtual void drawLineW(te::gm::LinearRing *line)
Draw a line in world coordinates (mm). 
 
virtual void remapToPlanar(te::gm::Envelope *latLongBox, int zone)
Map latlong to UTM zone. 
 
virtual void setPlanarBox(te::gm::Envelope box)
 
A canvas is an abstraction of a drawing area. 
 
virtual ~GridGeodesicModel()
 
const double & getLowerLeftX() const 
It returns a constant reference to the x coordinate of the lower left corner. 
 
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color. 
 
Coord2D getUpperRight() const 
It returns the upper right coordinate of the envelope. 
 
double m_lneHrzDisplacement
 
virtual void setLineColor(const te::color::RGBAColor &color)=0
It sets the pen color used to draw line geometries. 
 
virtual te::gm::LinearRing * addCoordsInY(te::gm::Envelope box, double axisCoord, double gap)
Creates a line with n points in y axis. Method used to create the grid lines on a map...
 
Coord2D getLowerLeft() const 
It returns the lower left coordinate of the envelope. 
 
Utility class with functions to manipulate the canvas and conversion between projections. 
 
virtual void setVisibleAllTexts(bool visible)
 
bool isValid() const 
It tells if the rectangle is valid or not. 
 
virtual void draw(te::map::Canvas *canvas, Utils *utils, te::gm::Envelope box, int srid)
 
double m_lneVrtDisplacement
 
virtual void setTextPointSize(double size)=0
It sets the text point Size.