15 std::unique_ptr<te::da::DataSet> dataset = transactor->
getDataSet(
"public.br_munic_2001");
18 std::unique_ptr<te::gm::Envelope> extent = dataset->getExtent(pos);
20 std::cout << std::endl
21 <<
"public.br_munic_2001 - extent = " 22 << extent->m_llx <<
", " 23 << extent->m_lly <<
", " 24 << extent->m_urx <<
", " 25 << extent->m_ury << std::endl;
35 std::unique_ptr<te::gm::Envelope> extent = dataset->getExtent(pos);
37 std::cout << std::endl
38 <<
"public.br_munic_2001 with pt spatial filter - extent = " 39 << extent->m_llx <<
", " 40 << extent->m_lly <<
", " 41 << extent->m_urx <<
", " 42 << extent->m_ury << std::endl;
52 std::unique_ptr<te::gm::Envelope> extent = dataset->getExtent(pos);
54 std::cout << std::endl
55 <<
"public.br_munic_2001 with pt spatial filter - extent = " 56 << extent->m_llx <<
", " 57 << extent->m_lly <<
", " 58 << extent->m_urx <<
", " 59 << extent->m_ury << std::endl;
A layer with reference to a dataset.
A point with x and y coordinate values.
Examples on how to access/manipulate DataSources in TerraLib.
A DataSourceTransactor can be viewed as a connection to the data source for reading/writing things in...
virtual std::unique_ptr< DataSet > getDataSet(const std::string &name, te::common::TraverseType travType=te::common::FORWARDONLY, bool connected=false, const te::common::AccessPolicy accessPolicy=te::common::RAccess)=0
It gets the dataset identified by the given name. A dataset can be connected or disconnected. A connected dataset, after its creation through the data source transactor, continues to depend on the connection given by its associated data source. Differently, a disconnected dataset, after its creation, no more depends of the connection given by the data source, and it continues to live after the connection has been released to the data source.
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
void DataSetGetExtent(te::da::DataSourceTransactor *transactor)
An example showing how to retrieve the extent of a DataSet.