16 std::string data_dir = TERRALIB_DATA_DIR;
22 std::string dsName(
"SoilMeasures");
24 std::map<std::string, std::string> options;
25 dsMem->createDataSet(dType, options);
28 std::unique_ptr<te::da::DataSetType> dType_ret = dsMem->getDataSetType(dsName);
29 std::cout << std::endl <<
"DATASETTYPE in memory has been created" << std::endl;
35 std::cout << std::endl <<
"DATASET " << dsName <<
" in memory has been created:" << std::endl;
39 dsMem->add(dsName,dSet, options);
42 std::unique_ptr<te::da::DataSet> ds_ret = dsMem->getDataSet(dsName);
43 std::cout << std::endl <<
"DATASET " << dsName <<
" was inserted in retrieved from datasource:" << std::endl;
48 catch(
const std::exception& e)
50 std::cout << std::endl <<
"An exception has occurred in Memory Example: " << e.what() << std::endl;
55 std::cout << std::endl <<
"An unexpected exception has occurred in Memory Example!" << std::endl;
static std::unique_ptr< DataSource > make(const std::string &driver, const te::core::URI &connInfo)
A class that models the description of a dataset.
te::da::DataSetType * CreateDataSetTypeInMemory(const std::string &datasettypename)
void MemoryExample()
This example shows how to create DataSet and DataSetType in memory.
te::da::DataSet * CreatingDataSetInMemoryGivingDt(te::da::DataSetType *dt)
Examples on how to access/manipulate DataSources in TerraLib.
A dataset is the unit of information manipulated by the data access module of TerraLib.
void PrintDataSet(std::string datasetName, te::da::DataSet *dataset)
It prints the data in a given dataset.