OmniSciDB  91042dcc5b
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GeoRasterTableFunctions.h File Reference
#include <vector>
#include "QueryEngine/OmniSciTypes.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_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)
 
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)
 

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 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 141 of file GeoRasterTableFunctions.h.

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

151  {
152  if (bin_dim_meters <= 0) {
153  return mgr.ERROR_MESSAGE("bin_dim_meters argument must be greater than 0");
154  }
155 
156  if (neighborhood_fill_radius < 0) {
157  return mgr.ERROR_MESSAGE(
158  "neighborhood_fill_radius argument must be greater than "
159  "or equal to 0");
160  }
161 
162  GeoRaster<T, Z> geo_raster(
163  input_x, input_y, input_z, bin_dim_meters, geographic_coords, true);
164 
165  if (neighborhood_fill_radius > 0) {
166  geo_raster.fill_bins_from_neighbors(neighborhood_fill_radius, fill_only_nulls);
167  }
168 
169  return geo_raster.outputDenseColumns(mgr, output_x, output_y, output_z);
170 }

+ 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 bin_dim_meters,
const bool  geographic_coords,
const int64_t  neighborhood_fill_radius,
const bool  fill_only_nulls,
const x_min,
const x_max,
const y_min,
const y_max,
Column< T > &  output_x,
Column< T > &  output_y,
Column< Z > &  output_z 
)

Definition at line 226 of file GeoRasterTableFunctions.h.

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

240  {
241  if (bin_dim_meters <= 0) {
242  return mgr.ERROR_MESSAGE("bin_dim_meters argument must be greater than 0");
243  }
244 
245  if (neighborhood_fill_radius < 0) {
246  return mgr.ERROR_MESSAGE(
247  "neighborhood_fill_radius argument must be greater than "
248  "or equal to 0");
249  }
250 
251  if (x_min >= x_max) {
252  return mgr.ERROR_MESSAGE("x_min must be less than x_max");
253  }
254 
255  if (y_min >= y_max) {
256  return mgr.ERROR_MESSAGE("y_min must be less than y_max");
257  }
258 
259  GeoRaster<T, Z> geo_raster(input_x,
260  input_y,
261  input_z,
262  bin_dim_meters,
263  geographic_coords,
264  true,
265  x_min,
266  x_max,
267  y_min,
268  y_max);
269 
270  if (neighborhood_fill_radius > 0) {
271  geo_raster.fill_bins_from_neighbors(neighborhood_fill_radius, fill_only_nulls);
272  }
273 
274  return geo_raster.outputDenseColumns(mgr, output_x, output_y, output_z);
275 }

+ 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 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 180 of file GeoRasterTableFunctions.h.

References GeoRaster< T, Z >::calculate_slope_and_aspect(), 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  GeoRaster<T, Z> geo_raster(
205  input_x, input_y, input_z, bin_dim_meters, geographic_coords, true);
206 
207  if (neighborhood_fill_radius > 0) {
208  geo_raster.fill_bins_from_neighbors(neighborhood_fill_radius, fill_only_nulls);
209  }
210 
211  const size_t output_rows =
212  geo_raster.outputDenseColumns(mgr, output_x, output_y, output_z);
213  geo_raster.calculate_slope_and_aspect(
214  output_slope, output_aspect, compute_slope_in_degrees);
215  return output_rows;
216 }

+ Here is the call graph for this function: