OmniSciDB  cde582ebc3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeoRasterTableFunctions.h File Reference
#include <vector>
#include "QueryEngine/heavydbTypes.h"
#include "GeoRasterTableFunctions.cpp"
+ Include dependency graph for GeoRasterTableFunctions.h:

Go to the source code of this file.

Classes

struct  GeoRaster< T, Z >
 

Functions

template<typename T , typename Z >
TEMPLATE_NOINLINE int32_t tf_geo_rasterize__cpu_template (TableFunctionManager &mgr, const Column< T > &input_x, const Column< T > &input_y, const Column< Z > &input_z, const T bin_dim_meters, const bool geographic_coords, const int64_t neighborhood_fill_radius, const bool fill_only_nulls, Column< T > &output_x, Column< T > &output_y, Column< Z > &output_z)
 
template<typename T , typename Z >
TEMPLATE_NOINLINE int32_t tf_geo_rasterize__cpu_template (TableFunctionManager &mgr, const Column< T > &input_x, const Column< T > &input_y, const Column< Z > &input_z, const T bin_dim_meters, const bool geographic_coords, const int64_t neighborhood_fill_radius, const bool fill_only_nulls, const T x_min, const T x_max, const T y_min, const T y_max, Column< T > &output_x, Column< T > &output_y, Column< Z > &output_z)
 
template<typename T , typename Z >
TEMPLATE_NOINLINE int32_t tf_geo_rasterize_slope__cpu_template (TableFunctionManager &mgr, const Column< T > &input_x, const Column< T > &input_y, const Column< Z > &input_z, const T bin_dim_meters, const bool geographic_coords, const int64_t neighborhood_fill_radius, const bool fill_only_nulls, const bool compute_slope_in_degrees, Column< T > &output_x, Column< T > &output_y, Column< Z > &output_z, Column< Z > &output_slope, Column< Z > &output_aspect)
 

Function Documentation

template<typename T , typename Z >
TEMPLATE_NOINLINE int32_t tf_geo_rasterize__cpu_template ( TableFunctionManager mgr,
const Column< T > &  input_x,
const Column< T > &  input_y,
const Column< Z > &  input_z,
const T  bin_dim_meters,
const bool  geographic_coords,
const int64_t  neighborhood_fill_radius,
const bool  fill_only_nulls,
Column< T > &  output_x,
Column< T > &  output_y,
Column< Z > &  output_z 
)

Definition at line 146 of file GeoRasterTableFunctions.h.

References GeoRaster< T, Z >::fill_bins_from_neighbors(), and GeoRaster< T, Z >::outputDenseColumns().

156  {
157  GeoRaster<T, Z> geo_raster(
158  input_x, input_y, input_z, bin_dim_meters, geographic_coords, true);
159 
160  if (neighborhood_fill_radius > 0) {
161  geo_raster.fill_bins_from_neighbors(neighborhood_fill_radius, fill_only_nulls);
162  }
163 
164  return geo_raster.outputDenseColumns(mgr, output_x, output_y, output_z);
165 }

+ Here is the call graph for this function:

template<typename T , typename Z >
TEMPLATE_NOINLINE int32_t tf_geo_rasterize__cpu_template ( TableFunctionManager mgr,
const Column< T > &  input_x,
const Column< T > &  input_y,
const Column< Z > &  input_z,
const T  bin_dim_meters,
const bool  geographic_coords,
const int64_t  neighborhood_fill_radius,
const bool  fill_only_nulls,
const T  x_min,
const T  x_max,
const T  y_min,
const T  y_max,
Column< T > &  output_x,
Column< T > &  output_y,
Column< Z > &  output_z 
)

Definition at line 179 of file GeoRasterTableFunctions.h.

References GeoRaster< T, Z >::fill_bins_from_neighbors(), and GeoRaster< T, Z >::outputDenseColumns().

193  {
194  if (bin_dim_meters <= 0) {
195  return mgr.ERROR_MESSAGE("bin_dim_meters argument must be greater than 0");
196  }
197 
198  if (neighborhood_fill_radius < 0) {
199  return mgr.ERROR_MESSAGE(
200  "neighborhood_fill_radius argument must be greater than "
201  "or equal to 0");
202  }
203 
204  if (x_min >= x_max) {
205  return mgr.ERROR_MESSAGE("x_min must be less than x_max");
206  }
207 
208  if (y_min >= y_max) {
209  return mgr.ERROR_MESSAGE("y_min must be less than y_max");
210  }
211 
212  GeoRaster<T, Z> geo_raster(input_x,
213  input_y,
214  input_z,
215  bin_dim_meters,
216  geographic_coords,
217  true,
218  x_min,
219  x_max,
220  y_min,
221  y_max);
222 
223  if (neighborhood_fill_radius > 0) {
224  geo_raster.fill_bins_from_neighbors(neighborhood_fill_radius, fill_only_nulls);
225  }
226 
227  return geo_raster.outputDenseColumns(mgr, output_x, output_y, output_z);
228 }

+ Here is the call graph for this function:

template<typename T , typename Z >
TEMPLATE_NOINLINE int32_t tf_geo_rasterize_slope__cpu_template ( TableFunctionManager mgr,
const Column< T > &  input_x,
const Column< T > &  input_y,
const Column< Z > &  input_z,
const T  bin_dim_meters,
const bool  geographic_coords,
const int64_t  neighborhood_fill_radius,
const bool  fill_only_nulls,
const bool  compute_slope_in_degrees,
Column< T > &  output_x,
Column< T > &  output_y,
Column< Z > &  output_z,
Column< Z > &  output_slope,
Column< Z > &  output_aspect 
)

Definition at line 241 of file GeoRasterTableFunctions.h.

References GeoRaster< T, Z >::calculate_slope_and_aspect(), GeoRaster< T, Z >::fill_bins_from_neighbors(), and GeoRaster< T, Z >::outputDenseColumns().

254  {
255  if (bin_dim_meters <= 0) {
256  return mgr.ERROR_MESSAGE("bin_dim_meters argument must be greater than 0");
257  }
258 
259  if (neighborhood_fill_radius < 0) {
260  return mgr.ERROR_MESSAGE(
261  "neighborhood_fill_radius argument must be greater than "
262  "or equal to 0");
263  }
264 
265  GeoRaster<T, Z> geo_raster(
266  input_x, input_y, input_z, bin_dim_meters, geographic_coords, true);
267 
268  if (neighborhood_fill_radius > 0) {
269  geo_raster.fill_bins_from_neighbors(neighborhood_fill_radius, fill_only_nulls);
270  }
271 
272  const size_t output_rows =
273  geo_raster.outputDenseColumns(mgr, output_x, output_y, output_z);
274  geo_raster.calculate_slope_and_aspect(
275  output_slope, output_aspect, compute_slope_in_degrees);
276  return output_rows;
277 }

+ Here is the call graph for this function: