Sirius  0.0.0
Namespaces | Classes | Typedefs | Enumerations | Functions
sirius::gdal Namespace Reference

Namespaces

 detail
 

Classes

class  Exception
 Exception wrapper for GDAL error. More...
 
struct  GeoReference
 Data class that represents GDAL geo reference information. More...
 
class  InputStream
 Stream an image in block. More...
 
class  ResampledOutputStream
 Write a resampled image by block. More...
 
struct  StreamBlock
 Stream block. More...
 

Typedefs

using DatasetUPtr = std::unique_ptr<::GDALDataset, detail::DatasetDeleter >
 

Enumerations

enum  ErrorCode {
  ErrorCode::kNone = CPLE_None, ErrorCode::kAppDefined = CPLE_AppDefined, ErrorCode::kOutOfMemory = CPLE_OutOfMemory, ErrorCode::kFileIO = CPLE_FileIO,
  ErrorCode::kOpenFailed = CPLE_OpenFailed, ErrorCode::kIllegalArg = CPLE_IllegalArg, ErrorCode::kNotSupported = CPLE_NotSupported, ErrorCode::kAssertionFailed = CPLE_AssertionFailed,
  ErrorCode::kNoWriteAccess = CPLE_NoWriteAccess, ErrorCode::kUserInterrupt = CPLE_UserInterrupt, ErrorCode::kObjectNull = CPLE_ObjectNull, ErrorCode::kHttpResponse = CPLE_HttpResponse,
  ErrorCode::kAWSBucketNotFound = CPLE_AWSBucketNotFound, ErrorCode::kAWSObjectNotFound = CPLE_AWSObjectNotFound, ErrorCode::kAWSAccessDenied = CPLE_AWSAccessDenied, ErrorCode::kAWSInvalidCredentials = CPLE_AWSInvalidCredentials,
  ErrorCode::kAWSSignatureDoesNotMatch = CPLE_AWSSignatureDoesNotMatch
}
 Enum of gdal error codes. More...
 

Functions

void SaveFFTAsImage (const fftw_complex *fft, const Size &image_size, const std::string &output_filepath)
 
std::error_code make_error_code (::CPLErrorNum errc)
 Make an error code from ::CPLErrorNum enum. More...
 
Image LoadImage (const std::string &filepath)
 
void SaveImage (const Image &image, const std::string &output_filepath, const GeoReference &geoRef={})
 
DatasetUPtr LoadDataset (const std::string &filepath)
 
DatasetUPtr CreateDataset (const std::string &filepath, int w, int h, int n_bands, const GeoReference &geo_ref={})
 
GeoReference ComputeResampledGeoReference (const std::string &input_path, const ZoomRatio &zoom_ratio)
 Compute resampled georeference information. More...
 
std::vector< double > ComputeResampledGeoTransform (GDALDataset *dataset, const ZoomRatio &zoom_ratio)
 Compute output image origin and pixel size. More...
 

Typedef Documentation

◆ DatasetUPtr

using sirius::gdal::DatasetUPtr = typedef std::unique_ptr<::GDALDataset, detail::DatasetDeleter>

Enumeration Type Documentation

◆ ErrorCode

Enum of gdal error codes.

Enumerator
kNone 
kAppDefined 
kOutOfMemory 
kFileIO 
kOpenFailed 
kIllegalArg 
kNotSupported 
kAssertionFailed 
kNoWriteAccess 
kUserInterrupt 
kObjectNull 
kHttpResponse 
kAWSBucketNotFound 
kAWSObjectNotFound 
kAWSAccessDenied 
kAWSInvalidCredentials 
kAWSSignatureDoesNotMatch 

Function Documentation

◆ ComputeResampledGeoReference()

GeoReference sirius::gdal::ComputeResampledGeoReference ( const std::string &  input_path,
const ZoomRatio zoom_ratio 
)

Compute resampled georeference information.

Parameters
input_pathinput image path
zoom_ratiozoom ratio

◆ ComputeResampledGeoTransform()

std::vector<double> sirius::gdal::ComputeResampledGeoTransform ( GDALDataset *  dataset,
const ZoomRatio zoom_ratio 
)

Compute output image origin and pixel size.

Parameters
datasetinput dataset
zoom_ratiozoom ratio to be applied
Returns
new geo transform

◆ CreateDataset()

DatasetUPtr sirius::gdal::CreateDataset ( const std::string &  filepath,
int  w,
int  h,
int  n_bands,
const GeoReference geo_ref = {} 
)

◆ LoadDataset()

DatasetUPtr sirius::gdal::LoadDataset ( const std::string &  filepath)

◆ LoadImage()

Image sirius::gdal::LoadImage ( const std::string &  filepath)

◆ make_error_code()

std::error_code sirius::gdal::make_error_code ( ::CPLErrorNum  errc)

Make an error code from ::CPLErrorNum enum.

Parameters
errcerror code
Returns
Generated error code

◆ SaveFFTAsImage()

void sirius::gdal::SaveFFTAsImage ( const fftw_complex *  fft,
const Size image_size,
const std::string &  output_filepath 
)

◆ SaveImage()

void sirius::gdal::SaveImage ( const Image image,
const std::string &  output_filepath,
const GeoReference geoRef = {} 
)