14 std::cout <<
"Reprojecting raster data using the raster driver internal capacity." << std::endl << std::endl;
17 std::map<std::string, std::string> rinfo;
18 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
22 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop_LL.tif";
26 std::cout <<
"End. Check the reprojected raster file: cbers2b_rgb342_crop_LL.tif." << std::endl << std::endl;
31 std::cout <<
"Reprojection failed!" << std::endl << std::endl;
36 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop_LL_P.tif";
40 std::cout <<
"End. Check the reprojected raster file: cbers2b_rgb342_crop_LL_P.tif." << std::endl << std::endl;
45 std::cout <<
"Reprojection failed!" << std::endl << std::endl;
50 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop_LL_PR.tif";
54 std::cout <<
"End. Check the reprojected raster file: cbers2b_rgb342_crop_LL_PR.tif." << std::endl << std::endl;
59 std::cout <<
"Reprojection to cbers2b_rgb342_crop_LL_PR failed!" << std::endl << std::endl;
64 catch(
const std::exception& e)
66 std::cout << std::endl <<
"An exception has occurred in ReprojectRasterUsingDriver(): " << e.what() << std::endl;
70 std::cout << std::endl <<
"An unexpected exception has occurred in ReprojectRasterUsingDriver()!" << std::endl;
78 std::cout <<
"Reprojecting raster data using TerraLib's own algorithm." << std::endl << std::endl;
81 std::map<std::string, std::string> rinfo;
82 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
86 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop_LL_ALG.tif";
90 std::cout <<
"End. Check the reprojected raster file: cbers2b_rgb342_crop_LL_ALG.tif." << std::endl << std::endl;
95 std::cout <<
"Reprojection to cbers2b_rgb342_crop_LL_ALG failed!" << std::endl << std::endl;
100 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop_LL_P_ALG.tif";
104 std::cout <<
"End. Check the reprojected raster file: cbers2b_rgb342_crop_LL_P_ALG.tif." << std::endl << std::endl;
109 std::cout <<
"Reprojection to cbers2b_rgb342_crop_LL_P_ALG failed !" << std::endl << std::endl;
114 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop_LL_PR_ALG.tif";
118 std::cout <<
"End. Check the reprojected raster file: cbers2b_rgb342_crop_LL_PR_ALG.tif." << std::endl << std::endl;
123 std::cout <<
"Reprojection to cbers2b_rgb342_crop_LL_PR_ALG failed!" << std::endl << std::endl;
128 catch(
const std::exception& e)
130 std::cout << std::endl <<
"An exception has occurred in ReprojectRasterUsingFunction(): " << e.what() << std::endl;
134 std::cout << std::endl <<
"An unexpected exception has occurred in ReprojectRasterUsingFunction()!" << std::endl;
It contains the algorithm to reproject raster data.
An abstract class for raster data strucutures.
This is the abstract factory for Rasters.
An abstract class for raster data strucutures.
void ReprojectRasterUsingFunction()
Reproject one raster using GDAL implementation.
virtual Raster * transform(int srid, const std::map< std::string, std::string > &rinfo, int m=1) const
Reprojects this raster to a distinct SRS. This method reprojects this raster to a distinct SRS...
TERASTEREXPORT te::rst::Raster * Reproject(te::rst::Raster const *const rin, int srid, const std::map< std::string, std::string > &routinfo, int m=te::rst::NearestNeighbor)
Reprojects a raster to another SRS.
These routines show how to use the raster module and the GDAL data source module. ...
void ReprojectRasterUsingDriver()
Reproject one raster using TerraLib implementation.
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.