26#ifndef __TERRALIB_RASTER_INTERNAL_UTILS_H
27#define __TERRALIB_RASTER_INTERNAL_UTILS_H
36#include "../common/MathUtils.h"
130 const std::string& rType = std::string(
"GDAL"));
170 const std::map<std::string, std::string>& rinfo,
171 const std::string& rType = std::string(
"GDAL"));
186 const std::vector< te::gm::Geometry const *> geometries,
187 const std::map<std::string, std::string>& rinfo,
188 const std::string& rType );
231 const unsigned int bandIndex,
232 std::map<double, unsigned>& rHistogram );
254 const unsigned int bandIndex,
255 const unsigned int rowStart,
256 const unsigned int colStart,
257 const unsigned int finalRow,
258 const unsigned int finalCol,
259 const unsigned int histoBins,
260 const unsigned int sampleStep,
261 const unsigned int maxThreads,
262 std::map<double, unsigned>& rHistogram,
263 std::map<double, unsigned>& iHistogram );
275 const std::map<double, unsigned>& histogram,
292 const std::map<double, unsigned>& inputHistogram,
293 std::map<double, unsigned>& outputHistogram,
294 const unsigned int outputBinsNumber,
295 const double outputMinValue,
296 const double outputMaxValue );
304 const std::map<double, unsigned>& inputHistogram,
305 std::map<double, unsigned>& outputHistogram );
327 const std::vector< unsigned int >& inputRasterBands,
329 const unsigned int interpWindowRadius,
330 const unsigned int firstRow,
331 const unsigned int firstColumn,
332 const unsigned int height,
333 const unsigned int width,
334 const unsigned int newheight,
335 const unsigned int newwidth,
336 const unsigned int maxThreads,
337 const std::map<std::string, std::string>& rinfo,
338 const std::string& dataSourceType,
339 std::unique_ptr< te::rst::Raster >& resampledRasterPtr );
It describes one band (or dimension) of a raster.
It interpolates one pixel based on a selected algorithm.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
A raster band description.
A rectified grid is the spatial support for raster data.
An abstract class for raster data strucutures.
TERASTEREXPORT std::vector< te::gm::Point * > GetRandomPointsInRaster(const te::rst::Raster &inputRaster, unsigned int numberOfPoints=1000, bool ignoreNoDataValues=false)
Creates a vector of random positions (points) inside the raster.
TERASTEREXPORT te::rst::RasterPtr CropRaster(const te::rst::Raster &rin, const te::gm::Polygon &pin, const std::map< std::string, std::string > &rinfo, const std::string &rType=std::string("GDAL"))
Creates a raster crop using a polygon delimiter.
TERASTEREXPORT void GetDataTypeRanges(const int &dataType, double &min, double &max)
Return the values range of a given data type.
TERASTEREXPORT bool getRealHistogram(const te::rst::Raster &raster, const unsigned int bandIndex, std::map< double, unsigned > &rHistogram)
Compute and return the real histogram of the band.
TERASTEREXPORT std::string ConvertColorInterpTypeToString(const te::rst::ColorInterp &ci)
Function used to convert from a Color Interp Enum to a string.
InterpolationMethod
Allowed interpolation methods.
PaletteInterpretation
Palette interpratation types.
TERASTEREXPORT bool interpolateHistogram(const std::map< double, unsigned > &inputHistogram, std::map< double, unsigned > &outputHistogram, const unsigned int outputBinsNumber, const double outputMinValue, const double outputMaxValue)
Create a interpolated histogram from the input histogram with the new bins number.
TERASTEREXPORT bool rasterResample(const te::rst::Raster &inputRaster, const std::vector< unsigned int > &inputRasterBands, const te::rst::Interpolator::Method interpMethod, const unsigned int interpWindowRadius, const unsigned int firstRow, const unsigned int firstColumn, const unsigned int height, const unsigned int width, const unsigned int newheight, const unsigned int newwidth, const unsigned int maxThreads, const std::map< std::string, std::string > &rinfo, const std::string &dataSourceType, std::unique_ptr< te::rst::Raster > &resampledRasterPtr)
Resample a subset of the raster, given a box.
TERASTEREXPORT void FillBand(te::rst::Band *bin, const std::complex< double > &value)
Fill a Raster Band with provided value.
TERASTEREXPORT void getInterpMethods(std::vector< std::pair< te::rst::InterpolationMethod, std::string > > &interpMethods)
Get the avaliable interpolation methods.
TERASTEREXPORT void fillHistogramGaps(const std::map< double, unsigned > &inputHistogram, std::map< double, unsigned > &outputHistogram)
Create a a new histogram with all missing integer values filled with zero frequencies.
TERASTEREXPORT te::rst::RasterPtr CreateCopy(const te::rst::Raster &rin, const std::string &uri, const std::string &rType=std::string("GDAL"))
Create a new raster from existing one.
TERASTEREXPORT void getHistogramStats(const std::map< double, unsigned > &histogram, double &min, double &max, double &mean, double &stdDev)
Compute statiscts from the given histogram.
TERASTEREXPORT int GetPixelSize(int datatype)
Returns the byte size of a given datatype.
boost::shared_ptr< Raster > RasterPtr
TERASTEREXPORT int Round(double val)
Round a double value to a integer value.
TERASTEREXPORT void Copy(const Raster &rin, Raster &rout)
Copies the pixel values from one raster to another.
TERASTEREXPORT void FillRaster(te::rst::Raster *rin, const std::complex< double > &value)
Fill a Raster with provided value (all bands).
TERASTEREXPORT std::string ConvertPalleteInterpTypeToString(const te::rst::PaletteInterpretation &pi)
Function used to convert from a Pallete Interp Enum to a string.
TERASTEREXPORT std::vector< BandProperty * > GetBandProperties(const std::map< std::string, std::string > &rinfo)
Returns a vector of band properties, based on a given raster info.
TERASTEREXPORT Grid * GetGrid(const std::map< std::string, std::string > &rinfo)
Returns a grid based on a given raster info.
TERASTEREXPORT bool getHistograms(const te::rst::Raster &raster, const unsigned int bandIndex, const unsigned int rowStart, const unsigned int colStart, const unsigned int finalRow, const unsigned int finalCol, const unsigned int histoBins, const unsigned int sampleStep, const unsigned int maxThreads, std::map< double, unsigned > &rHistogram, std::map< double, unsigned > &iHistogram)
Compute and return the histogram soccurring values (real and imaginary) in a window of the band.
ColorInterp
Color model component use.
A rectified grid is the spatial support for raster data.
Band implementation for TerraLib 4.x.
Raster implementaton for TerraLib 4.x.
#define TERASTEREXPORT
You can use this macro in order to export/import classes and functions from this module.
Proxy configuration file for TerraView (see terraview_config.h).