TsRadarFunctions.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2 
3  This file is part of the TerraLib - a Framework for building GIS enabled applications.
4 
5  TerraLib is free software: you can redistribute it and/or modify
6  it under the terms of the GNU Lesser General Public License as published by
7  the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  TerraLib is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser General Public License
16  along with TerraLib. See COPYING. If not, write to
17  TerraLib Team at <terralib-team@terralib.org>.
18  */
19 
20 /*!
21  \file terralib/unittest/rp/radar_functions/TsRadarFunctions.cpp
22 
23  \brief A test suit for raster processing Radar Functions.
24 */
25 
26 // TerraLib
27 #include "../Config.h"
28 #include <terralib/rp.h>
29 #include <terralib/raster.h>
30 
31 // Boost
32 #define BOOST_TEST_NO_MAIN
33 #include <boost/test/unit_test.hpp>
34 #include <boost/shared_ptr.hpp>
35 
36 BOOST_AUTO_TEST_SUITE (radar_functions_tests)
37 
38 BOOST_AUTO_TEST_CASE(sampleFunction_test)
39 {
40  /* Openning input raster */
41 
42  std::map<std::string, std::string> auxRasterInfo;
43 
44  auxRasterInfo["URI"] = TERRALIB_DATA_DIR "/geotiff/cbers2b_rgb342_crop.tif";
45  std::unique_ptr< te::rst::Raster > diskRasterPtr( te::rst::RasterFactory::open(
46  auxRasterInfo ) );
47 
48  BOOST_CHECK( diskRasterPtr.get() );
49  BOOST_CHECK( te::rp::radar::SampleFunction( *diskRasterPtr ) == false );
50 }
51 
52 BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_SUITE(radar_functions_tests) BOOST_AUTO_TEST_CASE(sampleFunction_test)
This file contains include headers for the TerraLib Raster Processing module.
bool SampleFunction(const te::rst::Raster &)
Just a sample function.
BOOST_AUTO_TEST_CASE(encoding_test_utf8_latin1)
static Raster * open(const std::map< std::string, std::string > &rinfo, te::common::AccessPolicy p=te::common::RAccess)
It opens a raster with the given parameters and default raster driver.