#include "TINExamples.h"#include <terralib/core/filesystem/FileSystem.h>#include <terralib/core/plugin.h>#include <terralib/common/TerraLib.h>#include <terralib/core/uri/URI.h>#include <terralib/core/uri/Utils.h>#include <terralib/dataaccess/datasource/DataSourceFactory.h>#include <terralib/mnt/core/CalculateGrid.h>#include <terralib/mnt/core/CreateIsolinesCore.h>#include <terralib/mnt/core/TINCreateIsolines.h>#include <terralib/mnt/core/TINCalculateGrid.h>#include <terralib/mnt/core/TINGeneration.h>#include <terralib/mnt/core/Utils.h>#include <terralib_buildconfig.h>#include "iostream"#include <boost/filesystem.hpp>#include <terralib/dataaccess/datasource/DataSourceTransactor.h>#include <terralib/dataaccess/utils/Utils.h>#include <terralib/datatype/Property.h>#include <terralib/datatype/SimpleProperty.h>#include <terralib/datatype/StringProperty.h>#include <terralib/geometry/Envelope.h>#include <terralib/geometry/Geometry.h>#include <terralib/geometry/GeometryProperty.h>#include <terralib/geometry/LineString.h>#include <terralib/geometry/Point.h>#include <terralib/geometry/TIN.h>#include <terralib/geometry/GEOSGeometryFactory.h>#include <terralib/geometry/GEOSWriter.h>#include <terralib/geometry/GEOSReader.h>#include <terralib/memory/DataSet.h>#include <terralib/memory/DataSetItem.h>#include <geos.h>#include <geos/triangulate/DelaunayTriangulationBuilder.h>Go to the source code of this file.
Functions | |
| void | CalculateGrid () |
| te::da::DataSet * | create_ds_memory (const std::string &datasetName, te::da::DataSetType *datasettype, std::unique_ptr< geos::geom::Geometry > results) |
| void | CreateIsolines () |
| void | GenerateIso () |
| void | GenerateTIN () |
More... | |
| void | LoadIsolines (const std::string &filename, te::gm::MultiPoint &mpt, te::gm::MultiLineString &isolines, std::string &geostype, std::string atributo) |
| int | main (int, char **) |
| void | SaveTIN_shp (std::string dir, std::string out, std::unique_ptr< geos::geom::Geometry > results) |
| void | TesteGEOS () |
| void | TINCalculateGrid () |
| void CalculateGrid | ( | ) |
Definition at line 478 of file examples/TIN/main.cpp.
References te::core::FileSystem::exists(), te::mnt::Isolines, te::da::DataSourceFactory::make(), te::mnt::Media, te::core::FileSystem::remove(), te::mnt::CalculateGrid::run(), te::mnt::Samples, te::mnt::CalculateGrid::setInput(), te::mnt::CalculateGrid::setOutput(), te::mnt::CalculateGrid::setParams(), and te::mnt::CalculateGrid::setSRID().
Referenced by main(), and te::mnt::MNTGenerationDialog::onOkPushButtonClicked().
| te::da::DataSet* create_ds_memory | ( | const std::string & | datasetName, |
| te::da::DataSetType * | datasettype, | ||
| std::unique_ptr< geos::geom::Geometry > | results | ||
| ) |
Definition at line 81 of file examples/TIN/main.cpp.
References te::mem::DataSet::add(), te::dt::AbstractData::clone(), DataSet(), ds, te::gm::GeometryCollection::getGeometryN(), te::gm::LineString::getNPoints(), te::gm::Geometry::getNPoints(), te::gm::GeometryCollection::getNumGeometries(), te::gm::CurvePolygon::getNumRings(), te::gm::LineString::getPointN(), te::gm::CurvePolygon::getRingN(), p, te::mem::DataSetItem::setGeometry(), te::mem::DataSetItem::setInt32(), te::gm::GeometryCollection::setSRID(), and te::mem::DataSetItem::setString().
Referenced by SaveTIN_shp().
| void CreateIsolines | ( | ) |
Definition at line 552 of file examples/TIN/main.cpp.
References te::core::FileSystem::exists(), te::mnt::CreateIsolines::getPrepareRaster(), te::da::DataSourceFactory::make(), te::core::FileSystem::remove(), te::mnt::CreateIsolines::run(), te::mnt::CreateIsolines::setInput(), te::mnt::CreateIsolines::setOutput(), and te::mnt::CreateIsolines::setParams().
Referenced by main(), and te::mnt::CreateIsolinesDialog::onOkPushButtonClicked().
| void GenerateIso | ( | ) |
Definition at line 370 of file examples/TIN/main.cpp.
References te::core::FileSystem::exists(), te::da::DataSourceFactory::make(), te::core::FileSystem::remove(), te::mnt::TINCreateIsolines::run(), te::mnt::TINCreateIsolines::setInput(), te::mnt::TINCreateIsolines::setOutput(), te::mnt::TINCreateIsolines::setParams(), and te::mnt::Tin::setSRID().
Referenced by main().
| void GenerateTIN | ( | ) |
Definition at line 304 of file examples/TIN/main.cpp.
References te::core::FileSystem::exists(), te::mnt::Isolines, te::da::DataSourceFactory::make(), te::core::FileSystem::remove(), te::mnt::TINGeneration::run(), te::mnt::Samples, te::mnt::TINGeneration::setInput(), te::mnt::TINGeneration::setOutput(), te::mnt::TINGeneration::setParams(), and te::mnt::Tin::setSRID().
Referenced by main().
| void LoadIsolines | ( | const std::string & | filename, |
| te::gm::MultiPoint & | mpt, | ||
| te::gm::MultiLineString & | isolines, | ||
| std::string & | geostype, | ||
| std::string | atributo | ||
| ) |
Definition at line 164 of file examples/TIN/main.cpp.
References te::gm::GeometryCollection::add(), te::gm::LineString::clone(), te::da::DataSourceTransactor::getDataSetNames(), te::da::DataSet::getDouble(), te::da::DataSet::getGeometry(), te::gm::GeometryCollection::getGeometryN(), te::gm::LineString::getNPoints(), te::gm::GeometryCollection::getNumGeometries(), te::da::DataSet::getNumProperties(), te::gm::LineString::getPointN(), te::da::DataSet::getPropertyDataType(), te::da::DataSet::getPropertyName(), te::gm::Geometry::getSRID(), te::gm::Point::getX(), te::gm::LineString::getX(), te::gm::Point::getY(), te::gm::LineString::getY(), te::gm::LineStringZType, te::da::DataSourceFactory::make(), te::da::DataSet::moveNext(), te::gm::MultiLineStringZType, p, te::mnt::pointListSimplify(), te::gm::PointZType, te::gm::LineString::setPointZ(), te::gm::LineString::setSRID(), te::gm::Point::setZ(), te::da::DataSet::size(), and te::gm::LineString::size().
Referenced by TesteGEOS().
Definition at line 600 of file examples/TIN/main.cpp.
References CalculateGrid(), te::core::PluginManager::clear(), CreateIsolines(), TerraLib::finalize(), GenerateIso(), GenerateTIN(), te::common::Singleton< TerraLib >::getInstance(), TerraLib::initialize(), te::core::PluginManager::instance(), and LoadModules().
| void SaveTIN_shp | ( | std::string | dir, |
| std::string | out, | ||
| std::unique_ptr< geos::geom::Geometry > | results | ||
| ) |
Definition at line 123 of file examples/TIN/main.cpp.
References te::da::Create(), create_ds_memory(), dt, te::core::FileSystem::exists(), te::dt::INT32_TYPE, te::da::DataSourceFactory::make(), te::gm::MultiPolygonZType, te::core::FileSystem::remove(), te::dt::SimpleProperty::setAutoNumber(), te::gm::GeometryProperty::setSRID(), and te::dt::STRING_TYPE.
Referenced by TesteGEOS().
| void TesteGEOS | ( | ) |
Definition at line 262 of file examples/TIN/main.cpp.
References LoadIsolines(), te::gm::MultiLineStringZType, te::gm::MultiPointZType, SaveTIN_shp(), te::gm::GeometryCollection::setSRID(), and te::gm::GEOSWriter::write().
| void TINCalculateGrid | ( | ) |
Definition at line 422 of file examples/TIN/main.cpp.
References te::core::FileSystem::exists(), te::da::DataSourceFactory::make(), te::mnt::Quintico, te::core::FileSystem::remove(), te::mnt::TINCalculateGrid::run(), te::mnt::TINCalculateGrid::setInput(), te::mnt::TINCalculateGrid::setOutput(), te::mnt::TINCalculateGrid::setParams(), and te::mnt::Tin::setSRID().
Referenced by te::mnt::MNTGenerationDialog::onOkPushButtonClicked().