Loading...
Searching...
No Matches
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.

## Functions

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

Author
  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)

Copyright
  (C) 1993-1999 by Helena Mitasova and the GRASS Development Team
  This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.

Definition in file vinput2d.c.

## Function Documentation

## IL_vector_input_data_2d()

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

Parameters

  params | interpolation parameters
  Map | input vector map
  field | category field number
  zcol | name of the column containing z values
  scol | name of the column containing smooth values
  info | quadtree info
  n_points | number of points used for interpolation
  dmax | max distance between points

Definition at line 50 of file vinput2d.c.

References multtree::data, G_debug(), G_fatal_error(), G_important_message(), G_message(), G_verbose_message(), G_warning(), interp_params::kmax, interp_params::KMAX2, interp_params::kmin, NULL, process_point(), tree_info::root, translate_quad(), interp_params::wheresql, and interp_params::zmult.

## process_point()

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 )

Definition at line 306 of file vinput2d.c.

References amax1(), amin1(), multtree::data, G_warning(), MT_insert(), quad_point_new(), tree_info::root, x, quaddata::xmax, and quaddata::ymax.

Referenced by IL_vector_input_data_2d().