16 std::cout <<
"Units in the manager:"<< std::endl;
20 std::cout <<
"\t Id:" << uptr->getId() <<
" name: " << uptr->getName() <<
" symbol: " << uptr->getSymbol() << std::endl;
27 std::cout <<
"Unit \"metre\" found."<< std::endl;
31 unsigned int id = munit->getId();
32 std::string symb = munit->getSymbol();
36 std::cout <<
"Unit " <<
id <<
" found."<< std::endl;
42 std::cout <<
"Unit " << symb <<
" found."<< std::endl;
58 std::cout << ex.
what() << std::endl;
66 std::cout <<
"Geographic:" << std::endl;
69 std::cout <<
"\t Id:" << uptr->getId() <<
" name: " << uptr->getName() <<
" symbol: " << uptr->getSymbol() << std::endl;
71 std::cout <<
"Projected:" << std::endl;
74 std::cout <<
"\t Id:" << uptr->getId() <<
" name: " << uptr->getName() <<
" symbol: " << uptr->getSymbol() << std::endl;
78 std::cout << ex.
what() << std::endl;
const_iterator begin() const
It returns an iterator to the beginning of the conteiner.
This file contains include headers for TerraLib Spatial Reference System module.
virtual const char * what() const
It outputs the exception message.
UnitOfMeasurePtr findBySymbol(const std::string &symbol) const
Returns a unit of measure identified by its symbol.
const_iterator end() const
It returns an iterator to the end of the conteiner.
void UOMManage()
This example shows TerraLib handles Units of Measure.
static UnitsOfMeasureManager & getInstance()
It returns a reference to the singleton instance.
std::map< unsigned int, UnitOfMeasurePtr >::const_iterator const_iterator
void UnitSRS()
This example test how to retrieve a SRS unit of measure.
double getConversion(const std::string &unitFromName, const std::string &unitToName) const
Calculates a multiplicative factor to convert from a given unit to its base unit and vice-versa...
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
#define TE_SRS_SAD69_UTM_ZONE_23S
boost::shared_ptr< UnitOfMeasure > UnitOfMeasurePtr
A set of module common examples.
UnitOfMeasurePtr find(unsigned int id) const
Returns a unit of measure identified by its identificaton.