data_raster.cpp File Reference

Utility functions for Raster data IO in ASC, GDAL-supported, and MongoDB formats. More...

#include "data_raster.hpp"

Namespaces

namespace  ccgl
 Common Cross-platform Geographic Library (CCGL)
 
namespace  ccgl::data_raster
 Raster class to handle various raster data.
 

Functions

string ccgl::data_raster::RasterDataTypeToString (int type)
 Common functions independent to clsRasterData. More...
 
RasterDataType ccgl::data_raster::StringToRasterDataType (const string &stype)
 Convert string to RasterDataType.
 
RasterDataType ccgl::data_raster::TypeToRasterDataType (const std::type_info &t)
 Convert C++ data type to RasterDataType.
 
double ccgl::data_raster::DefaultNoDataByType (RasterDataType type)
 Default NoData value by data type.
 
GDALDataType ccgl::data_raster::CvtToGDALDataType (const RasterDataType type)
 
STRDBL_MAP ccgl::data_raster::InitialHeader ()
 Initialize header information in double.
 
void ccgl::data_raster::CopyHeader (const STRDBL_MAP &refers, STRDBL_MAP &dst)
 Copy header information from one to another. More...
 
STRING_MAP ccgl::data_raster::InitialStrHeader ()
 Initialize header information in string.
 
void ccgl::data_raster::UpdateStrHeader (STRING_MAP &strheader, const string &key, const string &val)
 Update header information in string.
 
RasterDataType ccgl::data_raster::RasterDataTypeInOptionals (const STRING_MAP &opts)
 Get output raster data type from optional inputs.
 
void ccgl::data_raster::InitialStatsMap (STRDBL_MAP &stats, map< string, double * > &stats2d)
 Initialize statistics values for 1D and 2D raster data.
 
bool ccgl::data_raster::WriteAscHeaders (const string &filename, const STRDBL_MAP &header)
 Write raster header information into a ASC file. More...
 

Detailed Description

Utility functions for Raster data IO in ASC, GDAL-supported, and MongoDB formats.

Remarks
  • 1. Apr. 2022 - lj - Separated from clsRasterData class for widely use.
  • 2. Aug. 2023 - lj - Add GDAL data types added from versions 3.5 and 3.7
Author
Liangjun Zhu, zlj(at)lreis.ac.cn