![]() |
Manual for OpenFLUID 2.1.10 |
Interface for managing Raster Data format.
#include <landr/RasterDataset.hpp>
Public Member Functions | |
RasterDataset (openfluid::core::GeoRasterValue &Value) | |
Create a virtual (in memory) copy of Value GDALDataset. More... | |
RasterDataset (const RasterDataset &Other) | |
Copy constructor. More... | |
~RasterDataset () | |
Delete the virtual GDALDataset. More... | |
GDALDataset * | source () |
Returns the GDALDataset related to this RasterDataset. More... | |
GDALDataset * | source () const |
Returns the const GDALDataset related to this RasterDataset. More... | |
GDALRasterBand * | rasterBand (unsigned int RasterBandIndex=1) |
Gets the RasterBand indexed with RasterBandIndex of the dataset. More... | |
std::pair< int, int > | getPixelFromCoordinate (geos::geom::Coordinate Coo) |
Returns the column and line index of a pixel from the coordinate of the pixel. More... | |
geos::geom::Coordinate * | computeOrigin () |
Returns the geos::geom::Coordinate origin of this RasterDataset. More... | |
double | getPixelWidth () |
Returns the pixel width of this RasterDataset. More... | |
double | getPixelHeight () |
Returns the pixel height of this RasterDataset. More... | |
std::vector< float > | getValuesOfLine (int LineIndex, unsigned int RasterBandIndex=1) |
Returns a vector of the pixel values of a line of this RasterDataset. More... | |
std::vector< float > | getValuesOfColumn (int ColIndex, unsigned int RasterBandIndex=1) |
Returns a vector of the pixel values of a column of this RasterDataset. More... | |
float | getValueOfPixel (int ColIndex, int LineIndex, unsigned int RasterBandIndex=1) |
Returns the pixel value with column and line index. More... | |
float | getValueOfCoordinate (geos::geom::Coordinate Coo, unsigned int RasterBandIndex=1) |
Returns the pixel value with coordinate. More... | |
openfluid::landr::VectorDataset * | polygonize (const std::string &FileName, std::string FieldName="", unsigned int RasterBandIndex=1) |
Creates a new VectorDataset with polygons for all connected regions of pixels in the raster sharing a common pixel value. More... | |
OGREnvelope | envelope () |
Returns the OGREnvelope associated to this RasterDataset. More... | |
Static Public Member Functions | |
static std::string | getDefaultPolygonizedFieldName () |
openfluid::landr::RasterDataset::RasterDataset | ( | openfluid::core::GeoRasterValue & | Value | ) |
Create a virtual (in memory) copy of Value GDALDataset.
Value | The GeoRasterValue to copy |
openfluid::base::FrameworkException | if fails |
openfluid::landr::RasterDataset::RasterDataset | ( | const RasterDataset & | Other | ) |
Copy constructor.
openfluid::base::FrameworkException | if fails |
openfluid::landr::RasterDataset::~RasterDataset | ( | ) |
Delete the virtual GDALDataset.
geos::geom::Coordinate* openfluid::landr::RasterDataset::computeOrigin | ( | ) |
Returns the geos::geom::Coordinate origin of this RasterDataset.
OGREnvelope openfluid::landr::RasterDataset::envelope | ( | ) |
Returns the OGREnvelope associated to this RasterDataset.
|
static |
std::pair<int, int> openfluid::landr::RasterDataset::getPixelFromCoordinate | ( | geos::geom::Coordinate | Coo | ) |
Returns the column and line index of a pixel from the coordinate of the pixel.
Coo | A geos::geom::Coordinate. |
double openfluid::landr::RasterDataset::getPixelHeight | ( | ) |
Returns the pixel height of this RasterDataset.
double openfluid::landr::RasterDataset::getPixelWidth | ( | ) |
Returns the pixel width of this RasterDataset.
float openfluid::landr::RasterDataset::getValueOfCoordinate | ( | geos::geom::Coordinate | Coo, |
unsigned int | RasterBandIndex = 1 |
||
) |
Returns the pixel value with coordinate.
Coo | The geos::geom::Coordinate. |
RasterBandIndex | The raster band index (default is 1). |
float openfluid::landr::RasterDataset::getValueOfPixel | ( | int | ColIndex, |
int | LineIndex, | ||
unsigned int | RasterBandIndex = 1 |
||
) |
Returns the pixel value with column and line index.
ColIndex | The column index. |
LineIndex | The line index. |
RasterBandIndex | The raster band index (default is 1). |
std::vector<float> openfluid::landr::RasterDataset::getValuesOfColumn | ( | int | ColIndex, |
unsigned int | RasterBandIndex = 1 |
||
) |
Returns a vector of the pixel values of a column of this RasterDataset.
ColIndex | The column index to get the pixel values. |
RasterBandIndex | The raster band index (default is 1). |
std::vector<float> openfluid::landr::RasterDataset::getValuesOfLine | ( | int | LineIndex, |
unsigned int | RasterBandIndex = 1 |
||
) |
Returns a vector of the pixel values of a line of this RasterDataset.
LineIndex | The line index to get the pixel values. |
RasterBandIndex | The raster band index (default is 1). |
openfluid::landr::VectorDataset* openfluid::landr::RasterDataset::polygonize | ( | const std::string & | FileName, |
std::string | FieldName = "" , |
||
unsigned int | RasterBandIndex = 1 |
||
) |
Creates a new VectorDataset with polygons for all connected regions of pixels in the raster sharing a common pixel value.
Use openfluid::landr::VectorDataset::copyToDisk() to keep this vectorDataset on disk
FileName | The name of the new VectorDataset. |
FieldName | The name of the field to be created for storing the pixel value, limited to 10 characters (or will be truncated). Default is set to "PixelVal". Type of field is OFTReal . |
RasterBandIndex | The raster band index (default is 1). |
GDALRasterBand* openfluid::landr::RasterDataset::rasterBand | ( | unsigned int | RasterBandIndex = 1 | ) |
Gets the RasterBand indexed with RasterBandIndex of the dataset.
Is owned by its dataset, should never be destroyed with the C++ delete operator.
RasterBandIndex | The rasterBand to get, default 1 |
GDALDataset* openfluid::landr::RasterDataset::source | ( | ) |
Returns the GDALDataset related to this RasterDataset.
GDALDataset* openfluid::landr::RasterDataset::source | ( | ) | const |
Returns the const GDALDataset related to this RasterDataset.