GRASS GIS 7 Programmer's Manual  7.5.svn(2018)-r73101
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vinput2d.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <grass/bitmap.h>
#include <grass/linkm.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
#include <grass/vector.h>
#include <grass/glocale.h>
#include <grass/interpf.h>
Include dependency graph for vinput2d.c:

Go to the source code of this file.


int IL_vector_input_data_2d (struct interp_params *params, struct Map_info *Map, int field, char *zcol, char *scol, struct tree_info *info, double *xmin, double *xmax, double *ymin, double *ymax, double *zmin, double *zmax, int *n_points, double *dmax)
int process_point (double x, double y, double z, double sm, struct tree_info *info, double zmult, double *xmin, double *xmax, double *ymin, double *ymax, double *zmin, double *zmax, int *npoint, int *OUTRANGE, int *total)

Detailed Description

Written by H. Mitasova, I. Kosinovsky, D. Gerdes Fall 1993 University of Illinois US Army Construction Engineering Research Lab
Mitasova (University of Illinois), I. Kosinovsky, (USA-CERL), and D.Gerdes (USA-CERL)
modified by McCauley in August 1995
modified by Mitasova in August 1995
modofied by Mitasova in Nov 1999 (dmax fix)

Definition in file vinput2d.c.

Function Documentation

int IL_vector_input_data_2d ( struct interp_params params,
struct Map_info Map,
int  field,
char *  zcol,
char *  scol,
struct tree_info info,
double *  xmin,
double *  xmax,
double *  ymin,
double *  ymax,
double *  zmin,
double *  zmax,
int n_points,
double *  dmax 

Insert into a quad tree

Inserts input data inside the region into a quad tree. Also translates data. Returns number of segments in the quad tree.

As z values may be used (in Map):

  • z coordinates in 3D file -> field = 0
  • categories -> field > 0, zcol = NULL
  • attributes -> field > 0, zcol != NULL
paramsinterpolation parameters
Mapinput vector map
fieldcategory field number
zcolname of the column containing z values
scolname of the column containing smooth values
infoquadtree info
n_pointsnumber of points used for interpolation
dmaxmax distance between points

Definition at line 51 of file vinput2d.c.

References _, cat, multtree::data, DB_C_TYPE_DOUBLE, DB_C_TYPE_INT, db_CatValArray_free(), db_CatValArray_get_value_double(), db_CatValArray_get_value_int(), db_CatValArray_init(), db_close_database_shutdown_driver(), db_column_Ctype(), db_init_handle(), db_init_string(), DB_OK, db_open_database(), db_select_CatValArray(), db_set_handle(), db_start_driver(), Cell_head::ew_res, G_debug(), G_fatal_error(), G_important_message(), G_message(), G_verbose_message(), G_warning(), GV_BOUNDARY, GV_LINE, GV_POINT, int, interp_params::kmax, interp_params::KMAX2, interp_params::kmin, quaddata::n_cols, quaddata::n_rows, Cell_head::ns_res, NULL, process_point(), tree_info::root, translate_quad(), Vect_cat_get(), Vect_get_field(), Vect_get_full_name(), Vect_is_3d(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_read_next_line(), interp_params::wheresql, quaddata::x_orig, quaddata::xmax, quaddata::y_orig, quaddata::ymax, and interp_params::zmult.

int process_point ( double  x,
double  y,
double  z,
double  sm,
struct tree_info info,
double  zmult,
double *  xmin,
double *  xmax,
double *  ymin,
double *  ymax,
double *  zmin,
double *  zmax,
int npoint,
int total