Skip to content

File grid_ops.hpp

FileList > grid > grid_ops.hpp

Go to the source code of this file

  • #include <cmath>
  • #include <cstdint>
  • #include <deque>
  • #include <limits>
  • #include <map>
  • #include <numeric>
  • #include <optional>
  • #include "grid.hpp"
  • #include "utilities/coordinate.hpp"
  • #include "utilities/progress_tracker.hpp"

Public Types

Type Name
enum DownsampleMethod

Public Functions

Type Name
void apply_coverage_mask (GeoGrid< T > & grid, const GeoGrid< bool > & coverage)
GeoGrid< std::optional< std::byte > > bool_grid (const GeoGrid< T > & grid, T threshold, ProgressTracker && progress_tracker)
GeoGrid< bool > compute_lidar_coverage_mask (size_t width, size_t height, const GeoTransform & transform, const GeoProjection & projection, IsEmptyFn && is_empty, ProgressTracker && progress_tracker)
Extent2D coverage_extent (const GeoGrid< bool > & coverage)
GeoGrid< T > downsample (const GeoGrid< T > & grid, size_t factor, ProgressTracker && progress_tracker, DownsampleMethod method=DownsampleMethod::MEDIAN)
void enforce_downsample_nodata (GeoGrid< T > & coarse, const GeoGrid< T > & fine, size_t factor)
void fill_grid_from_coverage (GeoGrid< T > & dest, const GeoGrid< bool > & coverage, const T & data_value, const T & nodata_value)
void interpolate_holes (GeoGrid< T > & grid, ProgressTracker && progress_tracker)
void mask_outside_coverage (GeoGrid< T > & dest, const GeoGrid< bool > & coverage, const T & nodata_value)
void remove_outliers (GeoGrid< T > & grid, ProgressTracker && progress_tracker, double z_threshold=1, bool z_only=false)
bool sample_coverage_at_pixel (const GeoGrid< bool > & coverage, const GeoTransform & dest_transform, size_t col, size_t row)

Public Static Functions

Type Name
bool has_value (double value)

Macros

Type Name
define SQ (x) ((x) \* (x))

Public Types Documentation

enum DownsampleMethod

enum DownsampleMethod {
    MEAN,
    MEDIAN
};

Public Functions Documentation

function apply_coverage_mask

template<typename T>
void apply_coverage_mask (
    GeoGrid< T > & grid,
    const GeoGrid< bool > & coverage
) 

function bool_grid

template<typename T>
GeoGrid< std::optional< std::byte > > bool_grid (
    const GeoGrid< T > & grid,
    T threshold,
    ProgressTracker && progress_tracker
) 

function compute_lidar_coverage_mask

template<typename IsEmptyFn>
GeoGrid< bool > compute_lidar_coverage_mask (
    size_t width,
    size_t height,
    const GeoTransform & transform,
    const GeoProjection & projection,
    IsEmptyFn && is_empty,
    ProgressTracker && progress_tracker
) 

function coverage_extent

inline Extent2D coverage_extent (
    const GeoGrid< bool > & coverage
) 

function downsample

template<typename T>
GeoGrid< T > downsample (
    const GeoGrid< T > & grid,
    size_t factor,
    ProgressTracker && progress_tracker,
    DownsampleMethod method=DownsampleMethod::MEDIAN
) 

function enforce_downsample_nodata

template<typename T>
void enforce_downsample_nodata (
    GeoGrid< T > & coarse,
    const GeoGrid< T > & fine,
    size_t factor
) 

function fill_grid_from_coverage

template<typename T>
void fill_grid_from_coverage (
    GeoGrid< T > & dest,
    const GeoGrid< bool > & coverage,
    const T & data_value,
    const T & nodata_value
) 

function interpolate_holes

template<typename T>
void interpolate_holes (
    GeoGrid< T > & grid,
    ProgressTracker && progress_tracker
) 

function mask_outside_coverage

template<typename T>
void mask_outside_coverage (
    GeoGrid< T > & dest,
    const GeoGrid< bool > & coverage,
    const T & nodata_value
) 

function remove_outliers

template<typename T>
void remove_outliers (
    GeoGrid< T > & grid,
    ProgressTracker && progress_tracker,
    double z_threshold=1,
    bool z_only=false
) 

function sample_coverage_at_pixel

inline bool sample_coverage_at_pixel (
    const GeoGrid< bool > & coverage,
    const GeoTransform & dest_transform,
    size_t col,
    size_t row
) 

Public Static Functions Documentation

function has_value

static inline bool has_value (
    double value
) 

Macro Definition Documentation

define SQ

#define SQ (
    x
) `((x) * (x))`


The documentation for this class was generated from the following file /home/runner/work/Blaze/Blaze/src/lib/grid/grid_ops.hpp