| TerraLib 4.1

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Examples

- Namespace List
- Namespace Members

Enumerations | Functions
TePDIUtils Namespace Reference
Image Processing.

## 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

enum TePDIUtils::TePDIUtilsMemPol

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:

  raster | Input raster.
  box_polygon | The 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:

  raster | Input raster.
  box_polygon | The 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:

  raster | Input raster.
  box_polygon | The 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:

  raster | Input raster.
  box_polygon | The 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:

  rasters | Input 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:

  geom1 | The first geometry.
  geom2 | The 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:

  geom1 | The first polygon.
  geom2 | The 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_rasters | Input rasters vector.
  input_channels | Input rasters channels/bands vector.
  output_raster | Output raster.
  enable_progress | Enable/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_raster | Input raster (must have a projection).
  progress_enabled | Progress interface enable/disable flag.
  out_raster | Output 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:

  inputRaster | Input raster.
  inputChannels | Input rasters channels/bands vector.
  outputRasters | Output rasters vector.
  enable_progress | Enable/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:

  raster | Input raster.
  channel | Input channel.
  min | The minimum level.
  max | The maximum level.
  progress_enabled | Enable/disable the progress interface.
  sample_step | The 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:

  lut | Lut.

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:

  raster | The input raster.
  band | Band 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:

  fileName | Raster file name
  memRasterPtr | The output memory raster pointer.
  enable_progress | Enable/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_in | Input geometry.
  g_out | Output 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_in | Input geometry.
  g_out | Output 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_in | Input box.
  raster | Reference raster.
  box_out | Output 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_in | Input geometry.
  raster | Reference raster.
  g_out | Output 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_in | Input geometry.
  raster | Reference raster.
  g_out | Output 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_in | Input geometry.
  raster | Reference raster.
  g_out | Output 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_in | Input geometry.
  raster | Reference raster.
  g_out | Output 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_in | Input geometry.
  raster | Reference raster.
  g_out | Output geometry.

PDI_DLL bool TePDIUtils::rasterCompare | ( | TePDITypes::TePDIRasterPtrType & | raster1,
|  | TePDITypes::TePDIRasterPtrType & | raster2
| ) |  |

Compares two rasters.

Parameters:

  raster1 | Input raster 1.
  raster2 | Input 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_raster | Input raster.
  target_projection | Target projection.
  outNLines | Output raster lines number.
  outNCols | Output raster columns number.
  enableProgress | Enable the progress interface.
  enableOptimization | Enable optimization (good for big rasters).
  output_raster | Output 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_raster | Input raster.
  target_projection | Target projection.
  target_resx | Target X resolution following the target projection.
  target_resy | Target Y resolution following the target projection.
  enableProgress | Enable the progress interface.
  enableOptimization | Enable optimization (good for big rasters).
  output_raster | Output 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_raster | Input raster.
  inputBands | Input raster used bands.
  out_lines | The number of output lines.
  out_cols | The number of output columns.
  interpol | Interpolation method.
  enable_progress | Enable/disable the progress interface.
  output_raster | Output 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_raster | Input raster.
  out_lines | The number of output lines.
  out_cols | The number of output columns.
  interpol | Interpolation method.
  enable_progress | Enable/disable the progress interface.
  output_raster | Output 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_raster | Input raster.
  output_raster | Output raster.
  x_resolution_ratio | X resolution ratio.
  y_resolution_ratio | Y resolution ratio.
  interpol | Interpolation method.
  enable_progress | Enable/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:

  RAMRaster | Output raster.
  bands | Number of bands for the generated RAMRaster.
  lines | Number of lines.
  columns | Number of Columns
  force_mm | Force disk memory mapped raster creation.
  pixel_type | Pixel data type.
  palette | A 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:

  RAMRaster | Output raster.
  params | Raster parameters.
  mempol | Memory policy.

PDI_DLL bool TePDIUtils::TeAllocRAMRaster | ( | const TeRasterParams & | params,
|  | TePDITypes::TePDIRasterPtrType & | rasterPointer
| ) |  |

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

Parameters:

  rasterPointer | Output raster pointer.
  params | Raster 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_raster | Input raster.
  RAMRaster | Output raster.
  bands | Number of bands for the generated RAMRaster. If zero, the number of bands will match the input raster.
  force_new_dt | If true, a new pixel data type will be used for all bands.
  force_mm | Force disk memory mapped raster creation.
  pixel_type | Pixel 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:

  RAMRaster | Output raster.
  params | Raster parameters.
  force_mm | Force 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_raster | Input raster.
  target_raster | Output raster.
  discretize_levels | Levels will be rounded to the near integer.
  trunc_levels | Levels 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_raster | Input raster.
  source_band | Souce band.
  target_raster | Output raster.
  target_band | Target band.
  discretize_levels | Levels will be rounded to the near integer.
  trunc_levels | Levels 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:

  raster | Input raster.
  band | Band number.
  min | Minimum allowed value.
  max | Maximum 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:

  params | Input 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_raster | Input raster.
  file_name | Output file name.
  enable_progress | Enable/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
| ) |  |

Save the raster to a GeoTIFF file.

Parameters:

  in_raster | Input raster.
  file_name | Output file name.

Returns:
  true if OK. false on error.

Note:
  DEPRECATED: Use other TeRaster2Geotiff implementation.

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, TePDILinearFilter_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::TeRaster2Geotiff | ( | const TePDITypes::TePDIRasterPtrType & | in_raster,
|  | const std::string & | file_name,
|  | TeDataType | pixel_type
| ) |  |

Save the raster to a GeoTIFF file.

Parameters:

  in_raster | Input raster.
  file_name | Output file name.
  pixel_type | The 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_raster | Input raster.
  file_name | Output file name.
  enable_progress | Enable/disable progress interface.
  qualityFactor | Quality 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_raster | 3 band/channels input raster.
  file_name | Output file name.
  enable_progress | Enable/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:

  c | The input point.
  indexer | The 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:

  ls1 | The input line set 1.
  ls2 | The input line set 2.
  ps | The output point set.

Examples:
  TePDIUtils_test.cpp.

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines