27 #include "../geometry/Coord2D.h" 
   28 #include "../geometry/Envelope.h" 
   29 #include "../geometry/Point.h" 
   30 #include "../geometry/Polygon.h" 
   31 #include "../raster/Grid.h" 
  101                                               const std::vector<te::gm::Polygon*>& inputPolygons, 
te::rst::Raster& outputRaster,
 
  102                                               const unsigned int outputRasterBand, 
const bool enableProgressInterface) 
throw(te::rp::Exception)
 
  108   unsigned int pattern;
 
  112   if(inputPolygons.size() > 0)
 
  115     for (
unsigned i = 0; i < inputPolygons.size(); i++)
 
  125       pattern = rand() % 5 + 1;
 
  127       for(r = (
unsigned) startGridCoord.
y; r < endGridCoord.
y; r++)
 
  128         for(c = (
unsigned) startGridCoord.
x; c < endGridCoord.
x; c++)
 
  134             outputRaster.setValue(c, r, pattern, outputRasterBand);
 
  142     const unsigned int nrows = outputRaster.getNumberOfRows();
 
  143     const unsigned int ncols = outputRaster.getNumberOfColumns();
 
  145     for(r = 0; r < nrows; r++)
 
  147       for(c = 0; c < ncols; c++)
 
  150         pattern = rand() % 5 + 1;
 
  152         outputRaster.setValue(c, r, pattern, outputRasterBand);
 
bool initialize(StrategyParameters const *const strategyParams)
Initialize the classification strategy. 
 
virtual bool intersects(const Geometry *const rhs) const 
It returns true if the geometry object spatially intersects rhs geometry. 
 
An utility struct for representing 2D coordinates. 
 
#define TE_TR(message)
It marks a string in order to get translated. 
 
AbstractParameters * clone() const 
Create a clone copy of this instance. 
 
Raster Processing functions. 
 
#define TERP_TRUE_OR_RETURN_FALSE(value, message)
Checks if value is true. For false values a warning message will be logged and a return of context wi...
 
Raster classifier strategy factory base class. 
 
ClassifierDummyStrategyFactory()
 
const Parameters & operator=(const Parameters ¶ms)
 
A point with x and y coordinate values. 
 
An abstract class for raster data strucutures. 
 
Raster strategy parameters base class. 
 
bool m_isInitialized
True if this instance is initialized. 
 
te::rp::ClassifierStrategy * build()
Concrete factories (derived from this one) must implement this method in order to create objects...
 
Abstract parameters base interface. 
 
void reset()
Clear all internal allocated resources and reset the parameters instance to its initial state...
 
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings. 
 
Raster classifier strategy base class. 
 
unsigned int m_dummyParameter
A dummy parameter. 
 
ClassifierDummyStrategy::Parameters m_parameters
Internal execution parameters. 
 
Raster dummy Classifier strategy factory. 
 
Coord2D getUpperRight() const 
It returns the upper right coordinate of the envelope. 
 
~ClassifierDummyStrategy()
 
~ClassifierDummyStrategyFactory()
 
Coord2D getLowerLeft() const 
It returns the lower left coordinate of the envelope. 
 
Dummy strategy (just for testing purposes). 
 
const Envelope * getMBR() const 
It returns the minimum bounding rectangle for the geometry in an internal representation. 
 
ClassifierDummyStrategy()
 
bool execute(const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const std::vector< te::gm::Polygon * > &inputPolygons, te::rst::Raster &outputRaster, const unsigned int outputRasterBand, const bool enableProgressInterface)
Executes the classification strategy. 
 
Dummy strategy (just for testing purposes).