29 #include "../../geometry/Point.h"
30 #include "../../memory/DataSet.h"
31 #include "../../srs/Config.h"
36 m_distReal = boost::random::uniform_real_distribution<>(0, 1);
45 std::auto_ptr<te::da::DataSetType> dsType = createDataSetType();
47 std::auto_ptr<te::mem::DataSet> dsMem = generateSamples(dsType.get());
49 saveDataSet(dsMem.get(), dsType.get());
64 m_outputDataSetName = dataSetName;
80 std::map<std::string, std::string> options;
82 m_ds->createDataSet(dsType, options);
84 m_ds->add(m_outputDataSetName, dataSet, options);
92 double randX = m_distReal(m_gen);
97 double randY = m_distReal(m_gen);
SamplePointsGeneratorAbstract()
Default constructor.
void saveDataSet(te::mem::DataSet *dataSet, te::da::DataSetType *dsType)
void setEnvelope(te::gm::Envelope env)
boost::shared_ptr< DataSource > DataSourcePtr
A class that models the description of a dataset.
virtual ~SamplePointsGeneratorAbstract()
Virtual destructor.
boost::random::uniform_real_distribution m_distReal
void setOutputDataSource(te::da::DataSourcePtr ds)
const double & getUpperRightX() const
It returns a constant refernce to the x coordinate of the upper right corner.
const double & getLowerLeftY() const
It returns a constant refernce to the y coordinate of the lower left corner.
const double & getUpperRightY() const
It returns a constant refernce to the x coordinate of the upper right corner.
Implementation of a random-access dataset class for the TerraLib In-Memory Data Access driver...
A point with x and y coordinate values.
An Envelope defines a 2D rectangular region.
#define TE_UNKNOWN_SRS
A numeric value to represent a unknown SRS identification in TerraLib.
te::gm::Point * getPoint(const te::gm::Envelope *env)
void execute()
Function to execute the kernel operation.
bool moveBeforeFirst()
It moves the internal pointer to a position before the first item in the collection.
void setOutputDataSetName(std::string dataSetName)
void setX(const double &x)
It sets the Point x-coordinate value.
const double & getLowerLeftX() const
It returns a constant reference to the x coordinate of the lower left corner.
void setY(const double &y)
It sets the Point y-coordinate value.
This file contains a virtual class to generate samples points.