TerraLib 4.1
TePDIUtils Namespace Reference

Enumerations

enum  TePDIUtilsMemPol { TePDIUtilsAutoMemPol = 1, TePDIUtilsRamMemPol = 2, TePDIUtilsDiskMemPol = 3 }

Functions

bool TeAllocRAMRaster (TePDITypes::TePDIRasterPtrType &template_raster, TePDITypes::TePDIRasterPtrType &RAMRaster, unsigned int bands, bool force_new_dt, bool force_mm, TeDataType pixel_type)
 Allocates one RAM raster using another raster as template base.
bool TeAllocRAMRaster (TePDITypes::TePDIRasterPtrType &RAMRaster, unsigned int bands, unsigned int lines, unsigned int columns, bool force_mm, TeDataType pixel_type, TePDIRgbPalette *palette)
 Allocates a brand new RAM raster.
bool TeAllocRAMRaster (TePDITypes::TePDIRasterPtrType &RAMRaster, const TeRasterParams &params, bool force_mm)
 Allocates a brand new RAM raster using the supplied parameters.
bool TeAllocRAMRaster (TePDITypes::TePDIRasterPtrType &RAMRaster, const TeRasterParams &params, TePDIUtilsMemPol mempol)
 Allocates a brand new RAM raster using the supplied parameters.
bool TeAllocRAMRaster (const TeRasterParams &params, TePDITypes::TePDIRasterPtrType &rasterPointer)
 Create a new raster instance into memory using the supplied parameters.
bool TeRaster2Geotiff (const TePDITypes::TePDIRasterPtrType &in_raster, const std::string &file_name)
 Save the raster to a GeoTIFF file.
bool TeRaster2Geotiff (const TePDITypes::TePDIRasterPtrType &in_raster, const std::string &file_name, TeDataType pixel_type)
 Save the raster to a GeoTIFF file.
bool TeRaster2Geotiff (const TePDITypes::TePDIRasterPtrType &in_raster, const std::string &file_name, bool enable_progress)
 Save the raster to a GeoTIFF file.
bool TeRaster2RGBGeotiff (const TePDITypes::TePDIRasterPtrType &in_raster, const std::string &file_name, bool enable_progress)
 Save a 3 bands/channels raster to a RGB GeoTIFF file.
bool TeRaster2Jpeg (const TePDITypes::TePDIRasterPtrType &in_raster, const std::string &file_name, bool enable_progress, unsigned int qualityFactor)
 Save the raster to a Jpeg file.
bool TeCopyRasterPixels (TePDITypes::TePDIRasterPtrType &source_raster, unsigned int source_band, TePDITypes::TePDIRasterPtrType &target_raster, unsigned int target_band, bool discretize_levels, bool trunc_levels)
 Do pixel by pixel copy from one raster to another.
bool TeCopyRasterBands (TePDITypes::TePDIRasterPtrType &source_raster, TePDITypes::TePDIRasterPtrType &target_raster, bool discretize_levels, bool trunc_levels)
 Do pixel by pixel copy from one raster to another ( all bands ).
bool TeGetRasterMinMaxBounds (const TePDITypes::TePDIRasterPtrType &raster, unsigned int band, double &min, double &max)
 Used to find the allowed maximum and minimum level values that the supplied TeRaster band can have.
unsigned long int TeGetRasterReqMem (TeRasterParams &params)
 Used to find the raster required memory.
bool rasterCompare (TePDITypes::TePDIRasterPtrType &raster1, TePDITypes::TePDIRasterPtrType &raster2)
 Compares two rasters.
bool IsFloatBand (const TePDITypes::TePDIRasterPtrType &raster, unsigned int band)
 Given a raster band, verifies if the pixels are floating point pixels.
void MapCoords2RasterIndexes (const TeCoord2D &g_in, const TePDITypes::TePDIRasterPtrType &raster, TeCoord2D &g_out)
 Convert a TeCoord2D with projected coordinates to a geometry with indexed coordinates ( following the raster reference of lines and columns ).
void MapCoords2RasterIndexes (const TeBox &box_in, const TePDITypes::TePDIRasterPtrType &raster, TeBox &box_out)
 Convert a TeBox with projected coordinates to a TeBox with indexed coordinates ( following the raster reference of lines and columns ).
void MapRasterIndexes2Coords (const TeCoord2D &g_in, const TePDITypes::TePDIRasterPtrType &raster, TeCoord2D &g_out)
 Convert TeCoord2D with matrix indexed coordinates to a TeCoord2D with projected coordinates folowing a raster reference.
void MapRasterIndexes2Coords (const TeBox &g_in, const TePDITypes::TePDIRasterPtrType &raster, TeBox &g_out)
 Convert TeBox with matrix indexed coordinates to a TeBox with projected coordinates folowing a raster reference.
void makeSegmentSet (const TeLinearRing &g_in, TeLineSet &g_out)
 Breaks a TeLinearRing geometry into an segment set ( line segments of two points ).
bool IsDiscreteLut (const TePDITypes::TePDILutType &lut)
 Virifies if the lut has only discrete reference values ( integer ).
bool buildDetailedBox (TeRaster &raster, TePolygon &box_polygon)
 Builds a detailed box (world indexes) using all raster border pixels.
bool buildDetailedBox (const TePDITypes::TePDIRasterPtrType &raster, TePolygon &box_polygon)
 DEPRECATED - Builds a detailed box (world indexes) using all raster border pixels.
bool buildDetailedBBox (TeRaster &raster, TePolygon &box_polygon)
 Builds a detailed bounding box (world indexes) using all raster border pixels.
bool buildDetailedBBox (const TePDITypes::TePDIRasterPtrType &raster, TePolygon &box_polygon)
 DEPRECATED - Builds a detailed bounding box (world indexes) using all raster border pixels.
bool reprojectRaster (TeRaster &input_raster, unsigned int outNLines, unsigned int outNCols, TeProjection &target_projection, bool enableProgress, bool enableOptimization, TeRaster &output_raster)
 Reproject a raster geometry.
bool reprojectRaster (TeRaster &input_raster, TeProjection &target_projection, double target_resx, double target_resy, bool enableProgress, bool enableOptimization, TeRaster &output_raster)
 Reproject a raster geometry.
short TeRelation (const TeCoord2D &c, const TePDITileIndexer &indexer)
 Tells the relation between a point and a polygon by using a polygon tile indexer.
void TeSegSetIntersection (const TeLineSet &ls1, const TeLineSet &ls2, TePointSet &ps)
 Calculates the intersection set operation between two line segments sets.
TeDataType chooseBestPixelType (TePDITypes::TePDIRasterVectorType &rasters)
 Chooses the best pixel data type betweenn rasters.
void getBandMinMaxValues (const TePDITypes::TePDIRasterPtrType &raster, unsigned int channel, bool progress_enabled, unsigned int sample_step, double &min, double &max)
 Returns the minimum and maximum pixel values inside one raster channel.
bool convert2MultiBand (const TePDITypes::TePDIRasterPtrType &in_raster, bool progress_enabled, TePDITypes::TePDIRasterPtrType &out_raster)
 Generates a multi-band copy from the given raster.
bool compareGeometryPoints (const TeLinearRing &geom1, const TeLinearRing &geom2)
 Compares two TeLinerRing ignoring the points order.
bool resampleRasterByRes (const TePDITypes::TePDIRasterPtrType &input_raster, const TePDITypes::TePDIRasterPtrType &output_raster, double x_resolution_ratio, double y_resolution_ratio, TePDIInterpolator::InterpMethod interpol, bool enable_progress)
 Raster resampling to new resolution, keeping the original box and projection.
bool resampleRasterByLinsCols (const TePDITypes::TePDIRasterPtrType &input_raster, const TePDITypes::TePDIRasterPtrType &output_raster, unsigned int out_lines, unsigned int out_cols, bool enable_progress, TePDIInterpolator::InterpMethod interpol)
 Raster resampling to new resolution, keeping the original box and projection.
bool resampleRasterByLinsCols (const TePDITypes::TePDIRasterPtrType &input_raster, const std::vector< unsigned int > &inputBands, unsigned int out_lines, unsigned int out_cols, bool enable_progress, TePDIInterpolator::InterpMethod interpol, const TePDITypes::TePDIRasterPtrType &output_raster)
 Raster resampling to new resolution, keeping the original box and projection.
bool composeRaster (const TePDITypes::TePDIRasterVectorType &input_rasters, const std::vector< unsigned int > &input_channels, TePDITypes::TePDIRasterPtrType &output_raster, bool enable_progress)
 Compose raster channels into one single raster.
bool decomposeRaster (TeRaster &inputRaster, const std::vector< unsigned int > &inputChannels, TePDITypes::TePDIRasterVectorType &outputRasters, bool enableProgress)
 Decompose raster channels into many single rasters with one channel/band each.
bool loadRaster (const std::string &fileName, TePDITypes::TePDIRasterPtrType &memRasterPtr, bool enable_progress)
 Load a raster data file into RAM (using a SMARTMEM decoder)
template<typename Geometry >
void MapCoords2RasterIndexes (const Geometry &g_in, const TePDITypes::TePDIRasterPtrType &raster, Geometry &g_out)
 Convert a geometry with projected coordinates to a geometry with indexed coordinates ( following the raster reference of lines and columns ).
template<typename Geometry >
void MapRasterIndexes2Coords (const Geometry &g_in, const TePDITypes::TePDIRasterPtrType &raster, Geometry &g_out)
 Convert geometry with matrix indexed coordinates to a geometry with projected coordinates folowing a raster reference.
template<typename Geometry >
void makeSegmentSet (const Geometry &g_in, TeLineSet &g_out)
 Breaks a geometry into an segment set ( line segments of two points ).
template<typename Geometry >
bool compareGeometryPoints (const Geometry &geom1, const Geometry &geom2)
 Compares two geometries ignoring the points order inside each composite elemeent.

Detailed Description

This namespace contains base utilitary functions used by PDI classes.

Note:
THEY SHOLD NOT BE USED BY ANYONE. The support and interfaces can be changed in future. THIS IS FOR INTERNAL USE ONLY.

Enumeration Type Documentation

Enumerator:
TePDIUtilsAutoMemPol 

The memory policy will be choosed following the free RAM

TePDIUtilsRamMemPol 

Use RAM memory

TePDIUtilsDiskMemPol 

Use memory mapped disk files


Function Documentation

PDI_DLL bool TePDIUtils::buildDetailedBBox ( TeRaster raster,
TePolygon box_polygon 
)

Builds a detailed bounding box (world indexes) using all raster border pixels.

Parameters:
rasterInput raster.
box_polygonThe generated box (polygon representation).
Returns:
true if OK, false on errors.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::buildDetailedBBox ( const TePDITypes::TePDIRasterPtrType raster,
TePolygon box_polygon 
)

DEPRECATED - Builds a detailed bounding box (world indexes) using all raster border pixels.

Deprecated:
This method will be removed in the future, please use the other buildDetailedBox implementation.
Parameters:
rasterInput raster.
box_polygonThe generated box (polygon representation).
Returns:
true if OK, false on errors.
PDI_DLL bool TePDIUtils::buildDetailedBox ( TeRaster raster,
TePolygon box_polygon 
)

Builds a detailed box (world indexes) using all raster border pixels.

Parameters:
rasterInput raster.
box_polygonThe generated box (polygon representation).
Returns:
true if OK, false on errors.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::buildDetailedBox ( const TePDITypes::TePDIRasterPtrType raster,
TePolygon box_polygon 
)

DEPRECATED - Builds a detailed box (world indexes) using all raster border pixels.

Deprecated:
This method will be removed in the future, please use the other buildDetailedBox implementation.
Parameters:
rasterInput raster.
box_polygonThe generated box (polygon representation).
Returns:
true if OK, false on errors.
PDI_DLL TeDataType TePDIUtils::chooseBestPixelType ( TePDITypes::TePDIRasterVectorType rasters)

Chooses the best pixel data type betweenn rasters.

Parameters:
rastersInput rasters.
Returns:
The best data type
PDI_DLL bool TePDIUtils::compareGeometryPoints ( const TeLinearRing geom1,
const TeLinearRing geom2 
)

Compares two TeLinerRing ignoring the points order.

Parameters:
geom1The first geometry.
geom2The second geometry.
Returns:
true if both geometries has the same points, false otherwise.
Examples:
TePDIUtils_test.cpp.
template<typename Geometry >
bool TePDIUtils::compareGeometryPoints ( const Geometry &  geom1,
const Geometry &  geom2 
)

Compares two geometries ignoring the points order inside each composite elemeent.

Parameters:
geom1The first polygon.
geom2The second polygon.
Returns:
true if both polygons has the same points on each ring.
PDI_DLL bool TePDIUtils::composeRaster ( const TePDITypes::TePDIRasterVectorType input_rasters,
const std::vector< unsigned int > &  input_channels,
TePDITypes::TePDIRasterPtrType output_raster,
bool  enable_progress 
)

Compose raster channels into one single raster.

Parameters:
input_rastersInput rasters vector.
input_channelsInput rasters channels/bands vector.
output_rasterOutput raster.
enable_progressEnable/disable the progress interface.
Returns:
true if OK, false on errors.
Note:
The reference (projection, resolution, box) for the output raster will be taken from the first input channel (with index zero).
All input raster must have the same number of lines and columns.
PDI_DLL bool TePDIUtils::convert2MultiBand ( const TePDITypes::TePDIRasterPtrType in_raster,
bool  progress_enabled,
TePDITypes::TePDIRasterPtrType out_raster 
)

Generates a multi-band copy from the given raster.

Parameters:
in_rasterInput raster (must have a projection).
progress_enabledProgress interface enable/disable flag.
out_rasterOutput raster.
Returns:
true if ok, false on errors.
Note:
If out_raster isn't active, a new raster ( SMARMEM decoder ) will be returned.
If no conversion was made, the returned pointer will point to the input raster.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::decomposeRaster ( TeRaster inputRaster,
const std::vector< unsigned int > &  inputChannels,
TePDITypes::TePDIRasterVectorType outputRasters,
bool  enableProgress 
)

Decompose raster channels into many single rasters with one channel/band each.

Parameters:
inputRasterInput raster.
inputChannelsInput rasters channels/bands vector.
outputRastersOutput rasters vector.
enable_progressEnable/disable the progress interface.
Returns:
true if OK, false on errors.
Note:
There is no need to pre-initialize the outputRasters vector.
PDI_DLL void TePDIUtils::getBandMinMaxValues ( const TePDITypes::TePDIRasterPtrType raster,
unsigned int  channel,
bool  progress_enabled,
unsigned int  sample_step,
double &  min,
double &  max 
)

Returns the minimum and maximum pixel values inside one raster channel.

Parameters:
rasterInput raster.
channelInput channel.
minThe minimum level.
maxThe maximum level.
progress_enabledEnable/disable the progress interface.
sample_stepThe step size between lines/columns ( to use all lines/columns use sample_step = 0 ).
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::IsDiscreteLut ( const TePDITypes::TePDILutType lut)

Virifies if the lut has only discrete reference values ( integer ).

Parameters:
lutLut.
Returns:
true if only discrete values were found, otherwise false will be returned.
PDI_DLL bool TePDIUtils::IsFloatBand ( const TePDITypes::TePDIRasterPtrType raster,
unsigned int  band 
)

Given a raster band, verifies if the pixels are floating point pixels.

Parameters:
rasterThe input raster.
bandBand number.
Returns:
true if the the pixels are floating point pixels.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::loadRaster ( const std::string fileName,
TePDITypes::TePDIRasterPtrType memRasterPtr,
bool  enable_progress 
)

Load a raster data file into RAM (using a SMARTMEM decoder)

Parameters:
fileNameRaster file name
memRasterPtrThe output memory raster pointer.
enable_progressEnable/disable the progress interface.
Returns:
true if OK, false on errors.
Note:
The reference (projection, resolution, box) for the output raster will be taken from the first input channel (with index zero).
All input raster must have the same number of lines and columns.
Examples:
TePDIClassification_test.cpp, TePDICorrelationMatching_test.cpp, TePDIMMIOMatching_test.cpp, and TePDIOFMatching_test.cpp.
template<typename Geometry >
void TePDIUtils::makeSegmentSet ( const Geometry &  g_in,
TeLineSet g_out 
)

Breaks a geometry into an segment set ( line segments of two points ).

Parameters:
g_inInput geometry.
g_outOutput geometry.
PDI_DLL void TePDIUtils::makeSegmentSet ( const TeLinearRing g_in,
TeLineSet g_out 
)

Breaks a TeLinearRing geometry into an segment set ( line segments of two points ).

Parameters:
g_inInput geometry.
g_outOutput geometry.
Examples:
TePDIUtils_test.cpp.
PDI_DLL void TePDIUtils::MapCoords2RasterIndexes ( const TeBox box_in,
const TePDITypes::TePDIRasterPtrType raster,
TeBox box_out 
)

Convert a TeBox with projected coordinates to a TeBox with indexed coordinates ( following the raster reference of lines and columns ).

Parameters:
box_inInput box.
rasterReference raster.
box_outOutput box.
template<typename Geometry >
void TePDIUtils::MapCoords2RasterIndexes ( const Geometry &  g_in,
const TePDITypes::TePDIRasterPtrType raster,
Geometry &  g_out 
)

Convert a geometry with projected coordinates to a geometry with indexed coordinates ( following the raster reference of lines and columns ).

Parameters:
g_inInput geometry.
rasterReference raster.
g_outOutput geometry.
PDI_DLL void TePDIUtils::MapCoords2RasterIndexes ( const TeCoord2D g_in,
const TePDITypes::TePDIRasterPtrType raster,
TeCoord2D g_out 
)

Convert a TeCoord2D with projected coordinates to a geometry with indexed coordinates ( following the raster reference of lines and columns ).

Parameters:
g_inInput geometry.
rasterReference raster.
g_outOutput geometry.
Examples:
TePDIMMIOMatching_test.cpp, and TePDIOFMatching_test.cpp.
PDI_DLL void TePDIUtils::MapRasterIndexes2Coords ( const TeCoord2D g_in,
const TePDITypes::TePDIRasterPtrType raster,
TeCoord2D g_out 
)

Convert TeCoord2D with matrix indexed coordinates to a TeCoord2D with projected coordinates folowing a raster reference.

Parameters:
g_inInput geometry.
rasterReference raster.
g_outOutput geometry.
PDI_DLL void TePDIUtils::MapRasterIndexes2Coords ( const TeBox g_in,
const TePDITypes::TePDIRasterPtrType raster,
TeBox g_out 
)

Convert TeBox with matrix indexed coordinates to a TeBox with projected coordinates folowing a raster reference.

Parameters:
g_inInput geometry.
rasterReference raster.
g_outOutput geometry.
template<typename Geometry >
void TePDIUtils::MapRasterIndexes2Coords ( const Geometry &  g_in,
const TePDITypes::TePDIRasterPtrType raster,
Geometry &  g_out 
)

Convert geometry with matrix indexed coordinates to a geometry with projected coordinates folowing a raster reference.

Parameters:
g_inInput geometry.
rasterReference raster.
g_outOutput geometry.
PDI_DLL bool TePDIUtils::rasterCompare ( TePDITypes::TePDIRasterPtrType raster1,
TePDITypes::TePDIRasterPtrType raster2 
)

Compares two rasters.

Parameters:
raster1Input raster 1.
raster2Input raster 2.
Returns:
true if all the pixels from both rasters have the same levels, false if not.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::reprojectRaster ( TeRaster input_raster,
unsigned int  outNLines,
unsigned int  outNCols,
TeProjection target_projection,
bool  enableProgress,
bool  enableOptimization,
TeRaster output_raster 
)

Reproject a raster geometry.

Parameters:
input_rasterInput raster.
target_projectionTarget projection.
outNLinesOutput raster lines number.
outNColsOutput raster columns number.
enableProgressEnable the progress interface.
enableOptimizationEnable optimization (good for big rasters).
output_rasterOutput raster.
Returns:
true if OK, false on errors.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::reprojectRaster ( TeRaster input_raster,
TeProjection target_projection,
double  target_resx,
double  target_resy,
bool  enableProgress,
bool  enableOptimization,
TeRaster output_raster 
)

Reproject a raster geometry.

Parameters:
input_rasterInput raster.
target_projectionTarget projection.
target_resxTarget X resolution following the target projection.
target_resyTarget Y resolution following the target projection.
enableProgressEnable the progress interface.
enableOptimizationEnable optimization (good for big rasters).
output_rasterOutput raster.
Returns:
true if OK, false on errors.
PDI_DLL bool TePDIUtils::resampleRasterByLinsCols ( const TePDITypes::TePDIRasterPtrType input_raster,
const std::vector< unsigned int > &  inputBands,
unsigned int  out_lines,
unsigned int  out_cols,
bool  enable_progress,
TePDIInterpolator::InterpMethod  interpol,
const TePDITypes::TePDIRasterPtrType output_raster 
)

Raster resampling to new resolution, keeping the original box and projection.

Parameters:
input_rasterInput raster.
inputBandsInput raster used bands.
out_linesThe number of output lines.
out_colsThe number of output columns.
interpolInterpolation method.
enable_progressEnable/disable the progress interface.
output_rasterOutput raster.
Returns:
true if OK, false on errors.
Note:
( resolution_ratio = output_resolution / input_resolution ).
PDI_DLL bool TePDIUtils::resampleRasterByLinsCols ( const TePDITypes::TePDIRasterPtrType input_raster,
const TePDITypes::TePDIRasterPtrType output_raster,
unsigned int  out_lines,
unsigned int  out_cols,
bool  enable_progress,
TePDIInterpolator::InterpMethod  interpol 
)

Raster resampling to new resolution, keeping the original box and projection.

Parameters:
input_rasterInput raster.
out_linesThe number of output lines.
out_colsThe number of output columns.
interpolInterpolation method.
enable_progressEnable/disable the progress interface.
output_rasterOutput raster.
Returns:
true if OK, false on errors. @ All bands will be resampled.
Note:
( resolution_ratio = output_resolution / input_resolution ).
PDI_DLL bool TePDIUtils::resampleRasterByRes ( const TePDITypes::TePDIRasterPtrType input_raster,
const TePDITypes::TePDIRasterPtrType output_raster,
double  x_resolution_ratio,
double  y_resolution_ratio,
TePDIInterpolator::InterpMethod  interpol,
bool  enable_progress 
)

Raster resampling to new resolution, keeping the original box and projection.

Parameters:
input_rasterInput raster.
output_rasterOutput raster.
x_resolution_ratioX resolution ratio.
y_resolution_ratioY resolution ratio.
interpolInterpolation method.
enable_progressEnable/disable the progress interface.
Returns:
true if OK, false on errors.
Note:
( resolution_ratio = output_resolution / input_resolution ).
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::TeAllocRAMRaster ( TePDITypes::TePDIRasterPtrType RAMRaster,
unsigned int  bands,
unsigned int  lines,
unsigned int  columns,
bool  force_mm,
TeDataType  pixel_type,
TePDIRgbPalette palette 
)

Allocates a brand new RAM raster.

Note:
If there are not enought memory, memory mapping to disk files will be used.
Deprecated:
DEPRECATED - Use another implementation of this method because it will be removed in the future.
Parameters:
RAMRasterOutput raster.
bandsNumber of bands for the generated RAMRaster.
linesNumber of lines.
columnsNumber of Columns
force_mmForce disk memory mapped raster creation.
pixel_typePixel data type.
paletteA palette reference, for generation of a paletted raster ( must be 0 if not used ).
Returns:
true if OK. false on error.
PDI_DLL bool TePDIUtils::TeAllocRAMRaster ( TePDITypes::TePDIRasterPtrType RAMRaster,
const TeRasterParams params,
TePDIUtilsMemPol  mempol 
)

Allocates a brand new RAM raster using the supplied parameters.

Deprecated:
DEPRECATED - Use another implementation of this method because it will be removed in the future.
Parameters:
RAMRasterOutput raster.
paramsRaster parameters.
mempolMemory policy.
PDI_DLL bool TePDIUtils::TeAllocRAMRaster ( const TeRasterParams params,
TePDITypes::TePDIRasterPtrType rasterPointer 
)

Create a new raster instance into memory using the supplied parameters.

Parameters:
rasterPointerOutput raster pointer.
paramsRaster parameters.
PDI_DLL bool TePDIUtils::TeAllocRAMRaster ( TePDITypes::TePDIRasterPtrType template_raster,
TePDITypes::TePDIRasterPtrType RAMRaster,
unsigned int  bands,
bool  force_new_dt,
bool  force_mm,
TeDataType  pixel_type 
)

Allocates one RAM raster using another raster as template base.

Deprecated:
DEPRECATED - Use another implementation of this method because it will be removed in the future.
Note:
If there are not enought memory, memory mapping to disk files will be used.
Parameters:
template_rasterInput raster.
RAMRasterOutput raster.
bandsNumber of bands for the generated RAMRaster. If zero, the number of bands will match the input raster.
force_new_dtIf true, a new pixel data type will be used for all bands.
force_mmForce disk memory mapped raster creation.
pixel_typePixel data type.
Returns:
true if OK. false on error.
Examples:
TePDIArithmetic_test.cpp, TePDIBDFilter_test.cpp, TePDIBlender_test.cpp, TePDIClassification_test.cpp, TePDIColorTransform_test.cpp, TePDIContrast_test.cpp, TePDIDecorrelationEnhancement_test.cpp, TePDIFFT_test.cpp, TePDIFusion_test.cpp, TePDIHants_test.cpp, TePDIHistogram_test.cpp, TePDIInterpolator_test.cpp, TePDIJointHistogram_test.cpp, TePDILinearFilter_test.cpp, TePDIMIMatching_test.cpp, TePDIMixModel_test.cpp, TePDIMMIOMatching_test.cpp, TePDIMorfFilter_test.cpp, TePDIMosaic_test.cpp, TePDIOFMatching_test.cpp, TePDIParallelSegmenter_test.cpp, TePDIPrincipalComponents_test.cpp, TePDIRadarFilters_test.cpp, TePDIRaster2Vector_test.cpp, TePDIRegister_test.cpp, TePDISegmentation_test.cpp, TePDISensorSimulator_test.cpp, TePDIUtils_test.cpp, and TePDIWavelets_test.cpp.
PDI_DLL bool TePDIUtils::TeAllocRAMRaster ( TePDITypes::TePDIRasterPtrType RAMRaster,
const TeRasterParams params,
bool  force_mm 
)

Allocates a brand new RAM raster using the supplied parameters.

Deprecated:
DEPRECATED - Use another implementation of this method because it will be removed in the future.
Note:
If there are not enought memory, memory mapping to disk files will be used.
Parameters:
RAMRasterOutput raster.
paramsRaster parameters.
force_mmForce disk memory mapped raster creation.
Returns:
true if OK. false on error.
PDI_DLL bool TePDIUtils::TeCopyRasterBands ( TePDITypes::TePDIRasterPtrType source_raster,
TePDITypes::TePDIRasterPtrType target_raster,
bool  discretize_levels,
bool  trunc_levels 
)

Do pixel by pixel copy from one raster to another ( all bands ).

Parameters:
source_rasterInput raster.
target_rasterOutput raster.
discretize_levelsLevels will be rounded to the near integer.
trunc_levelsLevels outside a range ( from zero to the maximum Output raster allowed pixel value ) will be rounded to zero or the maximum Output raster allowed pixel value.
Returns:
true if OK. false on error.
Examples:
TePDIRegister_test.cpp, and TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::TeCopyRasterPixels ( TePDITypes::TePDIRasterPtrType source_raster,
unsigned int  source_band,
TePDITypes::TePDIRasterPtrType target_raster,
unsigned int  target_band,
bool  discretize_levels,
bool  trunc_levels 
)

Do pixel by pixel copy from one raster to another.

Parameters:
source_rasterInput raster.
source_bandSouce band.
target_rasterOutput raster.
target_bandTarget band.
discretize_levelsLevels will be rounded to the near integer.
trunc_levelsLevels outside a range ( from zero to the maximum Output raster allowed pixel value ) will be rounded to zero or the maximum Output raster allowed pixel value.
Returns:
true if OK. false on error.
Examples:
TePDIMorfFilter_test.cpp.
PDI_DLL bool TePDIUtils::TeGetRasterMinMaxBounds ( const TePDITypes::TePDIRasterPtrType raster,
unsigned int  band,
double &  min,
double &  max 
)

Used to find the allowed maximum and minimum level values that the supplied TeRaster band can have.

Parameters:
rasterInput raster.
bandBand number.
minMinimum allowed value.
maxMaximum allowed value..
Returns:
true if OK, false on error.
Examples:
TePDIUtils_test.cpp.
PDI_DLL unsigned long int TePDIUtils::TeGetRasterReqMem ( TeRasterParams params)

Used to find the raster required memory.

Parameters:
paramsInput raster parameters.
Returns:
The amount of required memory.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::TeRaster2Geotiff ( const TePDITypes::TePDIRasterPtrType in_raster,
const std::string file_name,
bool  enable_progress 
)

Save the raster to a GeoTIFF file.

Parameters:
in_rasterInput raster.
file_nameOutput file name.
enable_progressEnable/disable progress interface.
Returns:
true if OK. false on error.
PDI_DLL bool TePDIUtils::TeRaster2Geotiff ( const TePDITypes::TePDIRasterPtrType in_raster,
const std::string file_name,
TeDataType  pixel_type 
)

Save the raster to a GeoTIFF file.

Parameters:
in_rasterInput raster.
file_nameOutput file name.
pixel_typeThe type of pixels.
Returns:
true if OK. false on error.
Note:
DEPRECATED: Use other TeRaster2Geotiff implementation.
PDI_DLL bool TePDIUtils::TeRaster2Jpeg ( const TePDITypes::TePDIRasterPtrType in_raster,
const std::string file_name,
bool  enable_progress,
unsigned int  qualityFactor 
)

Save the raster to a Jpeg file.

Parameters:
in_rasterInput raster.
file_nameOutput file name.
enable_progressEnable/disable progress interface.
qualityFactorQuality factor from 0% to 100%.
Returns:
true if OK. false on error.
Examples:
TePDIUtils_test.cpp.
PDI_DLL bool TePDIUtils::TeRaster2RGBGeotiff ( const TePDITypes::TePDIRasterPtrType in_raster,
const std::string file_name,
bool  enable_progress 
)

Save a 3 bands/channels raster to a RGB GeoTIFF file.

Parameters:
in_raster3 band/channels input raster.
file_nameOutput file name.
enable_progressEnable/disable progress interface.
Returns:
true if OK. false on error.
Examples:
TePDIUtils_test.cpp.
PDI_DLL short TePDIUtils::TeRelation ( const TeCoord2D c,
const TePDITileIndexer indexer 
)

Tells the relation between a point and a polygon by using a polygon tile indexer.

Note:
The boundary case is not checked.
Parameters:
cThe input point.
indexerThe polygon tile indexer.
Returns:
TeINSIDE or TeOUTSIDE.
Examples:
TePDIUtils_test.cpp.
PDI_DLL void TePDIUtils::TeSegSetIntersection ( const TeLineSet ls1,
const TeLineSet ls2,
TePointSet ps 
)

Calculates the intersection set operation between two line segments sets.

Note:
Each line must have just 2 points.
Parameters:
ls1The input line set 1.
ls2The input line set 2.
psThe output point set.
Examples:
TePDIUtils_test.cpp.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines