te::sa::SamplePointsGeneratorStratified Class Reference

Class to generate samples points using stratified strategy. More...

#include <SamplePointsGeneratorStratified.h>

Inheritance diagram for te::sa::SamplePointsGeneratorStratified:
te::sa::SamplePointsGeneratorAbstract

Public Member Functions

void execute ()
 Function to execute the kernel operation. More...
 
std::vector< std::string > getClassNames ()
 
void isProportionalToArea (bool isProp)
 
 SamplePointsGeneratorStratified ()
 Default constructor. More...
 
void setEnvelope (te::gm::Envelope env)
 
void setInputAttributeName (std::string attrName)
 
void setInputDataSet (std::auto_ptr< te::da::DataSet > dataSet)
 
void setNumberOfPoints (int nPoints)
 
void setOutputDataSetName (std::string dataSetName)
 
void setOutputDataSource (te::da::DataSourcePtr ds)
 
void setSRID (int srid)
 
virtual ~SamplePointsGeneratorStratified ()
 Virtual destructor. More...
 

Protected Member Functions

void createClassMap ()
 
virtual std::auto_ptr< te::da::DataSetTypecreateDataSetType ()
 
virtual std::auto_ptr< te::mem::DataSetgenerateSamples (te::da::DataSetType *dsType)
 
te::gm::PointgetPoint (const te::gm::Envelope *env)
 
te::gm::PointgetPointInGeometry (te::gm::Geometry *g)
 
void saveDataSet (te::mem::DataSet *dataSet, te::da::DataSetType *dsType)
 

Protected Attributes

std::string m_attrName
 Attribute used to get from input data the selected attribute. More...
 
std::map< std::string, std::vector< te::gm::Geometry * > > m_classMap
 Attribute with polygons for each class from input dataset. More...
 
std::auto_ptr< te::da::DataSetm_dataSet
 Attribute with input data. More...
 
boost::random::uniform_int_distribution m_distInt
 
boost::random::uniform_real_distribution m_distReal
 
te::da::DataSourcePtr m_ds
 Pointer to the output datasource. More...
 
te::gm::Envelope m_env
 Attribute used to restrict the area to generate the samples. More...
 
boost::random::mt19937 m_gen
 
int m_nPoints
 Attribute used to define the number of points to be generated. More...
 
std::string m_outputDataSetName
 Attribute that defines the output dataset name. More...
 
bool m_propToArea
 Attribute used to indicate if the number of samples has to be proportional to the area. More...
 
int m_srid
 Attribute with spatial reference information. More...
 
te::sa::SamplePointsGeneratorType m_type
 Generator Type. More...
 

Detailed Description

Class to generate samples points using stratified strategy.

Definition at line 58 of file SamplePointsGeneratorStratified.h.

Constructor & Destructor Documentation

te::sa::SamplePointsGeneratorStratified::SamplePointsGeneratorStratified ( )

Default constructor.

virtual te::sa::SamplePointsGeneratorStratified::~SamplePointsGeneratorStratified ( )
virtual

Virtual destructor.

Member Function Documentation

void te::sa::SamplePointsGeneratorStratified::createClassMap ( )
protected

Function used to create the class map

virtual std::auto_ptr<te::da::DataSetType> te::sa::SamplePointsGeneratorStratified::createDataSetType ( )
protectedvirtual

Function used to create the output dataset type

Implements te::sa::SamplePointsGeneratorAbstract.

void te::sa::SamplePointsGeneratorAbstract::execute ( )
inherited

Function to execute the kernel operation.

virtual std::auto_ptr<te::mem::DataSet> te::sa::SamplePointsGeneratorStratified::generateSamples ( te::da::DataSetType dsType)
protectedvirtual

Function used to create the output data

Implements te::sa::SamplePointsGeneratorAbstract.

std::vector<std::string> te::sa::SamplePointsGeneratorStratified::getClassNames ( )

Function used to get the names for the generated classes

te::gm::Point* te::sa::SamplePointsGeneratorAbstract::getPoint ( const te::gm::Envelope env)
protectedinherited

Function used to generate a randon point inside a defined envelope

te::gm::Point* te::sa::SamplePointsGeneratorStratified::getPointInGeometry ( te::gm::Geometry g)
protected

Function used to generate a randon point inside a defined geometry

void te::sa::SamplePointsGeneratorStratified::isProportionalToArea ( bool  isProp)

Function used to set if the number of samples has to be proportional to the area

void te::sa::SamplePointsGeneratorAbstract::saveDataSet ( te::mem::DataSet dataSet,
te::da::DataSetType dsType 
)
protectedinherited

Function used to save the output dataset

void te::sa::SamplePointsGeneratorAbstract::setEnvelope ( te::gm::Envelope  env)
inherited

Function used to set the envelope parameter

void te::sa::SamplePointsGeneratorStratified::setInputAttributeName ( std::string  attrName)

Function used to set attribute from input data selected to generate the samples

void te::sa::SamplePointsGeneratorStratified::setInputDataSet ( std::auto_ptr< te::da::DataSet dataSet)

Function used to set the input dataset

void te::sa::SamplePointsGeneratorStratified::setNumberOfPoints ( int  nPoints)

Function used to set the number of points to be generated

void te::sa::SamplePointsGeneratorAbstract::setOutputDataSetName ( std::string  dataSetName)
inherited

Function used to set the output dataset name parameter

void te::sa::SamplePointsGeneratorAbstract::setOutputDataSource ( te::da::DataSourcePtr  ds)
inherited

Function used to set the output data source parameter

void te::sa::SamplePointsGeneratorAbstract::setSRID ( int  srid)
inherited

Function used to set the envelope parameter

Member Data Documentation

std::string te::sa::SamplePointsGeneratorStratified::m_attrName
protected

Attribute used to get from input data the selected attribute.

Definition at line 105 of file SamplePointsGeneratorStratified.h.

std::map<std::string, std::vector<te::gm::Geometry*> > te::sa::SamplePointsGeneratorStratified::m_classMap
protected

Attribute with polygons for each class from input dataset.

Definition at line 109 of file SamplePointsGeneratorStratified.h.

std::auto_ptr<te::da::DataSet> te::sa::SamplePointsGeneratorStratified::m_dataSet
protected

Attribute with input data.

Definition at line 103 of file SamplePointsGeneratorStratified.h.

boost::random::uniform_int_distribution te::sa::SamplePointsGeneratorStratified::m_distInt
protected

Definition at line 111 of file SamplePointsGeneratorStratified.h.

boost::random::uniform_real_distribution te::sa::SamplePointsGeneratorAbstract::m_distReal
protectedinherited

Definition at line 114 of file SamplePointsGeneratorAbstract.h.

te::da::DataSourcePtr te::sa::SamplePointsGeneratorAbstract::m_ds
protectedinherited

Pointer to the output datasource.

Definition at line 106 of file SamplePointsGeneratorAbstract.h.

te::gm::Envelope te::sa::SamplePointsGeneratorAbstract::m_env
protectedinherited

Attribute used to restrict the area to generate the samples.

Definition at line 104 of file SamplePointsGeneratorAbstract.h.

boost::random::mt19937 te::sa::SamplePointsGeneratorAbstract::m_gen
protectedinherited

Definition at line 112 of file SamplePointsGeneratorAbstract.h.

int te::sa::SamplePointsGeneratorStratified::m_nPoints
protected

Attribute used to define the number of points to be generated.

Definition at line 101 of file SamplePointsGeneratorStratified.h.

std::string te::sa::SamplePointsGeneratorAbstract::m_outputDataSetName
protectedinherited

Attribute that defines the output dataset name.

Definition at line 108 of file SamplePointsGeneratorAbstract.h.

bool te::sa::SamplePointsGeneratorStratified::m_propToArea
protected

Attribute used to indicate if the number of samples has to be proportional to the area.

Definition at line 107 of file SamplePointsGeneratorStratified.h.

int te::sa::SamplePointsGeneratorAbstract::m_srid
protectedinherited

Attribute with spatial reference information.

Definition at line 102 of file SamplePointsGeneratorAbstract.h.

te::sa::SamplePointsGeneratorType te::sa::SamplePointsGeneratorAbstract::m_type
protectedinherited

Generator Type.

Definition at line 110 of file SamplePointsGeneratorAbstract.h.


The documentation for this class was generated from the following file: