It implements the Boundary Extract (vectorizer specialization - extract only one pixel value)
More...
#include <BoundaryExtract.h>
|
| BoundaryExtract (Raster *r, std::size_t b, unsigned int mp=0, const bool noDataExclusion=true) |
| Constructor.
|
|
bool | run (std::vector< te::gm::Geometry * > &polygons, double pixelvalue) |
| Returns true if current algorithm implementation runs ok, false otherwise.
|
|
| ~BoundaryExtract () |
| Destructor.
|
|
|
void | clear () |
| Clear all internally allocated resources.
|
|
bool | run (std::vector< te::gm::Geometry * > &polygons, std::vector< double > *const polygonsValues=0) |
| Returns true if current algorithm implementation runs ok, false otherwise.
|
|
bool | startingEdgeTest (const int &x, const int &y) |
| Tests if the current point is a edge start.
|
|
It implements the Boundary Extract (vectorizer specialization - extract only one pixel value)
This algorithm implements a vectorizer, which is an algorithm to convert an image with pixel-labels into a set of polygons. All connected pixels in the image with the same label will define an individual polygon. This algorithm is based on the implementation of the previous version of this library, the TerraLib 4.
- See also
- Raster, Geometry
Definition at line 64 of file BoundaryExtract.h.
◆ BoundaryExtract()
te::rst::BoundaryExtract::BoundaryExtract |
( |
Raster * |
r, |
|
|
std::size_t |
b, |
|
|
unsigned int |
mp = 0 , |
|
|
const bool |
noDataExclusion = true |
|
) |
| |
Constructor.
- Parameters
-
r | The input raster. |
b | The selected band of the raster to be vectorized. |
mp | The maximum allowed number of polygons to be created (default = 0, unlimited). |
noDataExclusion | If true, regions with no-data pixels will not generate geometries. |
◆ ~BoundaryExtract()
te::rst::BoundaryExtract::~BoundaryExtract |
( |
| ) |
|
◆ clear()
void te::rst::Vectorizer::clear |
( |
| ) |
|
|
protectedinherited |
Clear all internally allocated resources.
◆ detectEdge()
bool te::rst::BoundaryExtract::detectEdge |
( |
long |
segmentInitialCol, |
|
|
long |
segmentInitialRow, |
|
|
te::gm::LinearRing & |
outputLine |
|
) |
| |
|
protected |
Detects an edge of a cell in Raster.
- Parameters
-
segmentInitialCol | abscissa (column) of the upper-left point of the shape |
segmentInitialRow | ordinate (line) of the upper-left point of the shape |
line | 2D Line. |
- Returns
- true if ok, otherwise false
◆ run() [1/2]
bool te::rst::BoundaryExtract::run |
( |
std::vector< te::gm::Geometry * > & |
polygons, |
|
|
double |
pixelvalue |
|
) |
| |
Returns true if current algorithm implementation runs ok, false otherwise.
- Parameters
-
polygons | The vector of polygons (will be cleared) to get the result of the vectorization. |
polygonsValues | A pointer to a valid vector where the raster pixel values related to each polygon will be stored, or a NULL pointer. |
- Note
- The caller of this method must take the ownership of the returned geometries and must delete them when necessary.
◆ run() [2/2]
bool te::rst::Vectorizer::run |
( |
std::vector< te::gm::Geometry * > & |
polygons, |
|
|
std::vector< double > *const |
polygonsValues = 0 |
|
) |
| |
|
inherited |
Returns true if current algorithm implementation runs ok, false otherwise.
- Parameters
-
polygons | The vector of polygons (will be cleared) to get the result of the vectorization. |
polygonsValues | A pointer to a valid vector where the raster pixel values related to each polygon will be stored, or a NULL pointer. |
- Note
- The caller of this method must take the ownership of the returned geometries and must delete them when necessary.
◆ startingEdgeTest()
bool te::rst::Vectorizer::startingEdgeTest |
( |
const int & |
x, |
|
|
const int & |
y |
|
) |
| |
|
protectedinherited |
Tests if the current point is a edge start.
- Parameters
-
- Returns
- true if the current point is a edge start, false if not.
◆ m_directions
◆ m_maxPolygons
unsigned int te::rst::Vectorizer::m_maxPolygons |
|
protectedinherited |
The maximum allowed number of polygons to be created.
Definition at line 145 of file Vectorizer.h.
◆ m_nColumns
unsigned long te::rst::Vectorizer::m_nColumns |
|
protectedinherited |
◆ m_nLines
unsigned long te::rst::Vectorizer::m_nLines |
|
protectedinherited |
◆ m_noDataValue
double te::rst::Vectorizer::m_noDataValue |
|
protectedinherited |
◆ m_rasterBand
unsigned int te::rst::Vectorizer::m_rasterBand |
|
protectedinherited |
◆ m_rasterPtr
Raster* te::rst::Vectorizer::m_rasterPtr |
|
protectedinherited |
◆ m_resX
double te::rst::Vectorizer::m_resX |
|
protectedinherited |
◆ m_resY
double te::rst::Vectorizer::m_resY |
|
protectedinherited |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_release/src/terralib/raster/BoundaryExtract.h