17 std::cout <<
"This test creates an image crop with a provided envelope." << std::endl << std::endl;
19 std::map<std::string, std::string> irinfo;
21 irinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/cbers2b_rgb342_crop.tif";
30 std::map<std::string, std::string> orinfo;
32 orinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/raster-crop.tif";
39 std::cout <<
"Done!" << std::endl << std::endl;
41 catch(
const std::exception& e)
43 std::cout << std::endl <<
"An exception has occurred in MakeRasterCrop(): " << e.what() << std::endl;
47 std::cout << std::endl <<
"An unexpected exception has occurred in MakeRasterCrop()!" << std::endl;
virtual Raster * trim(const te::gm::Envelope *env, const std::map< std::string, std::string > &rinfo) const
Subsetting operation for trimming (cropping) the raster.
An utility struct for representing 2D coordinates.
This is the abstract factory for Rasters.
An Envelope defines a 2D rectangular region.
An abstract class for raster data strucutures.
Grid * getGrid()
It returns the raster grid.
These routines show how to use the raster module and the GDAL data source module. ...
void gridToGeo(const double &col, const double &row, double &x, double &y) const
Get the spatial location of a grid point.
void MakeRasterCrop()
Creates an image crop with a providen envelope.
This file contains include headers for the Vector Geometry model of TerraLib.
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.