#include <terralib_buildconfig.h>#include <terralib/raster.h>#include <terralib/dataaccess.h>#include <terralib/geometry.h>#include <terralib/memory.h>#include <terralib/rp.h>#include "../Config.h"#include <memory>#include <boost/test/unit_test.hpp>#include <boost/shared_ptr.hpp>Go to the source code of this file.
Functions | |
| BOOST_AUTO_TEST_CASE (rasterIteratorConstructor1_test) | |
| BOOST_AUTO_TEST_CASE (rasterIteratorConstructor2_test) | |
| BOOST_AUTO_TEST_CASE (rasterIteratorConstructor3_test) | |
| BOOST_AUTO_TEST_CASE (rasterIteratorGetRow_test) | |
| BOOST_AUTO_TEST_CASE (rasterIteratorGetCol_test) | |
| BOOST_AUTO_TEST_CASE (polygonIterator1_test) | |
| BOOST_AUTO_TEST_CASE (polygonIterator2_test) | |
| BOOST_AUTO_TEST_CASE (polygonIterator3_outsidepol_test) | |
| BOOST_AUTO_TEST_CASE (polygonIterator_NDisjointBBOXIterationT_test1) | |
| BOOST_AUTO_TEST_CASE (polygonIterator_NDisjointBBOXIterationT_test2) | |
| BOOST_AUTO_TEST_SUITE (rasterIterator_tests) void drawPolygonInRaster(const te | |
| bool | Copy2DiskRaster (const te::rst::Raster &inputRaster, const std::string &fileName) |
| void | Copy2DiskShp (std::vector< te::gm::Polygon * > polygons, std::string shpName) |
| te::gm::LinearRing * | createRotatedSquare (const double &xCenter, const double &yCenter, const double &diagonalSize, int srid) |
| te::gm::LinearRing * | createSquare (const double &xCenter, const double &yCenter, const double &lateralSize, int srid) |
| void | CreateTestRaster (unsigned int nBands, unsigned int nLines, unsigned int nCols, boost::shared_ptr< te::rst::Raster > &rasterPointer, bool zero) |
| BOOST_AUTO_TEST_CASE | ( | rasterIteratorConstructor1_test | ) |
Definition at line 238 of file TsRasterIterator.cpp.
| BOOST_AUTO_TEST_CASE | ( | rasterIteratorConstructor2_test | ) |
Definition at line 242 of file TsRasterIterator.cpp.
| BOOST_AUTO_TEST_CASE | ( | rasterIteratorConstructor3_test | ) |
Definition at line 246 of file TsRasterIterator.cpp.
| BOOST_AUTO_TEST_CASE | ( | rasterIteratorGetRow_test | ) |
Definition at line 250 of file TsRasterIterator.cpp.
| BOOST_AUTO_TEST_CASE | ( | rasterIteratorGetCol_test | ) |
Definition at line 254 of file TsRasterIterator.cpp.
| BOOST_AUTO_TEST_CASE | ( | polygonIterator1_test | ) |
Definition at line 258 of file TsRasterIterator.cpp.
References band, te::rst::PolygonIterator< T >::begin(), col, Copy2DiskRaster(), CreateTestRaster(), te::rst::PolygonIterator< T >::end(), te::rst::PolygonIterator< T >::getColumn(), te::gm::GetGeomFromEnvelope(), te::rst::PolygonIterator< T >::getRow(), and rasterPointer.
| BOOST_AUTO_TEST_CASE | ( | polygonIterator2_test | ) |
Definition at line 311 of file TsRasterIterator.cpp.
References band, te::rst::PolygonIterator< T >::begin(), te::gm::LinearRing::clone(), col, Copy2DiskRaster(), Copy2DiskShp(), createRotatedSquare(), createSquare(), te::rst::PolygonIterator< T >::end(), te::rst::PolygonIterator< T >::getColumn(), te::gm::GetGeomFromEnvelope(), te::rst::PolygonIterator< T >::getRow(), te::sa::Grid, l1, l2, l3, line, te::gm::LineStringType, te::rst::RasterFactory::make(), nCols, nLines, te::gm::PolygonType, rasterPointer, te::gm::LineString::setPoint(), and te::dt::UCHAR_TYPE.
| BOOST_AUTO_TEST_CASE | ( | polygonIterator3_outsidepol_test | ) |
Definition at line 482 of file TsRasterIterator.cpp.
References Copy2DiskShp(), createSquare(), te::gm::Envelope::getCenter(), te::rst::Grid::getExtent(), te::rst::Grid::getResolutionX(), te::rst::Grid::getResolutionY(), te::rst::Grid::getSRID(), te::gm::LineStringType, te::gm::Envelope::m_lly, te::gm::Envelope::m_urx, te::gm::Envelope::m_ury, te::gm::PolygonType, te::gm::LineString::setPoint(), te::gm::LineString::setSRID(), te::gm::Coord2D::x, and te::gm::Coord2D::y.
| BOOST_AUTO_TEST_CASE | ( | polygonIterator_NDisjointBBOXIterationT_test1 | ) |
Definition at line 585 of file TsRasterIterator.cpp.
References band, te::rst::PolygonIterator< T >::begin(), col, Copy2DiskRaster(), CreateTestRaster(), te::rst::PolygonIterator< T >::end(), te::rst::PolygonIterator< T >::getColumn(), te::gm::GetGeomFromEnvelope(), te::rst::PolygonIterator< T >::getRow(), and rasterPointer.
| BOOST_AUTO_TEST_CASE | ( | polygonIterator_NDisjointBBOXIterationT_test2 | ) |
Definition at line 632 of file TsRasterIterator.cpp.
References band, te::rst::PolygonIterator< T >::begin(), te::gm::LinearRing::clone(), col, Copy2DiskRaster(), Copy2DiskShp(), createRotatedSquare(), createSquare(), te::rst::PolygonIterator< T >::end(), te::rst::PolygonIterator< T >::getColumn(), te::gm::GetGeomFromEnvelope(), te::rst::PolygonIterator< T >::getRow(), te::sa::Grid, l1, l2, l3, line, te::gm::LineStringType, te::rst::RasterFactory::make(), nCols, nLines, te::gm::PolygonType, rasterPointer, te::gm::LineString::setPoint(), and te::dt::UCHAR_TYPE.
| BOOST_AUTO_TEST_SUITE | ( | rasterIterator_tests | ) | const |
Definition at line 43 of file TsRasterIterator.cpp.
References band, te::rst::PolygonIterator< T >::begin(), col, te::rst::PolygonIterator< T >::end(), te::rst::PolygonIterator< T >::getColumn(), te::rst::PolygonIterator< T >::getRow(), line, te::rst::RasterFactory::make(), nCols, nLines, rasterPointer, and te::dt::UCHAR_TYPE.
| bool Copy2DiskRaster | ( | const te::rst::Raster & | inputRaster, |
| const std::string & | fileName | ||
| ) |
Definition at line 157 of file TsRasterIterator.cpp.
References col, te::rst::Raster::getAccessPolicy(), te::rst::Raster::getBand(), te::rst::Raster::getGrid(), te::rst::Raster::getNumberOfBands(), te::rst::Raster::getNumberOfColumns(), te::rst::Raster::getNumberOfRows(), te::rst::Band::getProperty(), te::rst::Band::getValue(), te::rst::RasterFactory::make(), nCols, te::common::RAccess, and te::rst::Band::setValue().
Referenced by BOOST_AUTO_TEST_CASE().
| void Copy2DiskShp | ( | std::vector< te::gm::Polygon * > | polygons, |
| std::string | shpName | ||
| ) |
Definition at line 124 of file TsRasterIterator.cpp.
References te::da::Create(), te::da::DataSourceFactory::make(), te::gm::PolygonType, te::mem::DataSetItem::setGeometry(), and te::gm::GeometryProperty::setSRID().
Referenced by BOOST_AUTO_TEST_CASE().
| te::gm::LinearRing* createRotatedSquare | ( | const double & | xCenter, |
| const double & | yCenter, | ||
| const double & | diagonalSize, | ||
| int | srid | ||
| ) |
Definition at line 225 of file TsRasterIterator.cpp.
References te::gm::LineStringType, and te::gm::LineString::setPoint().
Referenced by BOOST_AUTO_TEST_CASE().
| te::gm::LinearRing* createSquare | ( | const double & | xCenter, |
| const double & | yCenter, | ||
| const double & | lateralSize, | ||
| int | srid | ||
| ) |
Definition at line 212 of file TsRasterIterator.cpp.
References te::gm::LineStringType, and te::gm::LineString::setPoint().
Referenced by BOOST_AUTO_TEST_CASE().
| void CreateTestRaster | ( | unsigned int | nBands, |
| unsigned int | nLines, | ||
| unsigned int | nCols, | ||
| boost::shared_ptr< te::rst::Raster > & | rasterPointer, | ||
| bool | zero | ||
| ) |
Definition at line 94 of file TsRasterIterator.cpp.
References band, col, line, te::rst::RasterFactory::make(), nCols, nLines, pixelValue, and te::dt::UINT32_TYPE.
Referenced by BOOST_AUTO_TEST_CASE().