sgsPy
structurally guided sampling
Loading...
Searching...
No Matches
helper.h
#include <iostream>
#include <filesystem>
#include <mutex>
#include <boost/unordered/unordered_flat_map.hpp>
#include <xoshiro.h>
#include <gdal_priv.h>
#include <ogrsf_frmts.h>
#include <ogr_core.h>

Go to the source code of this file.

Classes

struct  sgs::helper::Index
struct  sgs::helper::Field
struct  sgs::helper::VRTBandDatasetInfo
class  sgs::helper::Variance
class  sgs::helper::RandValController
struct  sgs::helper::PointHash

Namespaces

namespace  sgs
namespace  sgs::helper

Macros

#define MAXINT8   127
#define MAXINT16   32767

Typedefs

typedef boost::unordered::unordered_flat_map< std::pair< int, int >, std::vector< std::pair< double, double > >, PointHashsgs::helper::NeighborMap

Functions

void sgs::helper::setStratBandTypeAndSize (size_t maxStrata, GDALDataType *p_type, size_t *p_size)
template<typename T>
sgs::helper::getPixelValueDependingOnType (GDALDataType type, void *p_data, size_t index)
void sgs::helper::setStrataPixelDependingOnType (GDALDataType type, void *p_data, size_t index, bool isNan, size_t strata)
void sgs::helper::printTypeWarningsForInt32Conversion (GDALDataType type)
GDALDataset * sgs::helper::createVirtualDataset (std::string driverName, int width, int height, double *geotransform, std::string projection)
GDALDataset * sgs::helper::createDataset (std::string filename, std::string driverName, int width, int height, double *geotransform, std::string projection, RasterBandMetaData *bands, size_t bandCount, bool useTiles, std::map< std::string, std::string > &driverOptions)
void sgs::helper::addBandToMEMDataset (GDALDataset *p_dataset, RasterBandMetaData &band)
void sgs::helper::createVRTBandDataset (GDALDataset *p_dataset, RasterBandMetaData &band, std::string tempFolder, std::string key, std::vector< VRTBandDatasetInfo > &VRTBandInfo, std::map< std::string, std::string > &driverOptions)
void sgs::helper::addBandToVRTDataset (GDALDataset *p_dataset, RasterBandMetaData &band, VRTBandDatasetInfo &info)
void sgs::helper::rasterBandIO (RasterBandMetaData &band, void *p_buffer, int xBlockSize, int yBlockSize, int xBlock, int yBlock, int xValid, int yValid, bool read, bool threaded=true)
void sgs::helper::addPoint (OGRPoint *p_point, OGRLayer *p_layer)
void sgs::helper::addPoint (const OGRPoint *p_point, OGRLayer *p_layer)
void sgs::helper::addPoint (OGRPoint *p_point, OGRLayer *p_layer, Field *p_field)
void sgs::helper::addPoint (const OGRPoint *p_point, OGRLayer *p_layer, Field *p_field)
void sgs::helper::addPoint (OGRPoint *p_point, OGRLayer *p_layer, std::vector< Field * > *p_fields)
void sgs::helper::addPoint (const OGRPoint *p_point, OGRLayer *p_layer, std::vector< Field * > *p_fields)
template<typename T>
sgs::helper::point2index (double xCoord, double yCoord, double *IGT, T width)
uint64_t sgs::helper::getProbabilityMultiplier (double width, double height, double pixelWidth, double pixelHeight, int startMult, int numSamples, bool useMindist, double accessibleArea)
bool sgs::helper::is_valid_sample (double x, double y, NeighborMap &neighbor_map, float mindist, float mindist_sq)
std::pair< double, double > sgs::helper::sample_to_point (double *GT, Index &index)
std::pair< double, double > sgs::helper::sample_to_point (double *GT, int xs, int ys)

Macro Definition Documentation

◆ MAXINT16

#define MAXINT16   32767

◆ MAXINT8

#define MAXINT8   127