TsReprojection.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/raster/TsReprojection.cpp
22 
23  \brief A test suit for the Raster Reprojection class.
24  */
25 
26 // TerraLib
27 #include <terralib_buildconfig.h>
28 
29 #include <terralib/raster.h>
30 #include "../Config.h"
31 
32 // Boost
33 #include <boost/test/unit_test.hpp>
34 #include <boost/shared_ptr.hpp>
35 
36 BOOST_AUTO_TEST_SUITE ( reprojection_tests )
37 
38 BOOST_AUTO_TEST_CASE (reprojection1_test)
39 {
40  /* Openning input raster */
41 
42  std::map<std::string, std::string> auxRasterInfo;
43 
44  auxRasterInfo["URI"] = TERRALIB_DATA_DIR "/geotiff/cbers_rgb342_crop1.tif";
45  boost::shared_ptr< te::rst::Raster > inputRasterPtr ( te::rst::RasterFactory::open(
46  auxRasterInfo ) );
47  BOOST_CHECK( inputRasterPtr.get() );
48 
49  /* Reprojecting */
50 
51  auxRasterInfo["URI"] = "TsReprojection_tcReprojection1.tif";
52  boost::shared_ptr< te::rst::Raster > outputRasterPtr(
53  inputRasterPtr->transform( 32621, auxRasterInfo, 1 ) );
54  BOOST_CHECK( outputRasterPtr.get() );
55 }
56 
57 BOOST_AUTO_TEST_CASE (reprojectin2_test)
58 {
59 }
60 
61 BOOST_AUTO_TEST_CASE (reprojection3_test)
62 {
63 }
64 
65 BOOST_AUTO_TEST_SUITE_END()
BOOST_AUTO_TEST_CASE(reprojectin2_test)
BOOST_AUTO_TEST_SUITE(reprojection_tests) BOOST_AUTO_TEST_CASE(reprojection1_test)
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.