16 std::cout <<
"This example shows how to create an 1bit Raster in memory, and how to save an 1bit Raster in Tiff format." << std::endl << std::endl;
23 std::vector<te::rst::BandProperty*> bprops;
29 bprops[0]->m_nblocksx = 1;
30 bprops[0]->m_nblocksy = 1;
38 if ((c > 5 && c < 25) && (r > 10 && r < 20))
48 std::map<std::string, std::string> rinfo;
49 rinfo[
"URI"] = TERRALIB_DATA_DIR
"/geotiff/creating-1bit-raster.tif";
63 if ((c > 5 && c < 25) && (r > 10 && r < 20))
72 std::cout <<
"Done!" << std::endl << std::endl;
74 catch(
const std::exception& e)
76 std::cout << std::endl <<
"An exception has occurred in Raster1Bit(): " << e.what() << std::endl;
80 std::cout << std::endl <<
"An unexpected exception has occurred in Raster1Bit()!" << std::endl;
unsigned int getNumberOfRows() const
Returns the grid number of rows.
virtual void setValue(unsigned int c, unsigned int r, const double value, std::size_t b=0)
Sets the attribute value in a band of a cell.
A raster band description.
unsigned int getNumberOfColumns() const
Returns the raster number of columns.
void Raster1Bit()
This example shows how to create an 1bit Raster in memory, and how to save an 1bit Raster in Tiff for...
An abstract class for raster data strucutures.
unsigned int getNumberOfRows() const
Returns the raster number of rows.
unsigned int getNumberOfColumns() const
Returns the grid number of columns.
These routines show how to use the raster module and the GDAL data source module. ...
static Raster * make()
It creates and returns an empty raster with default raster driver.
This file contains include headers for the Vector Geometry model of TerraLib.
A rectified grid is the spatial support for raster data.
Utilitary functions to access GDAL and match some of its concepts to TerraLib concepts.