GRASS GIS 7 Programmer's Manual  7.0.5(2016)-r00000
zones.c
Go to the documentation of this file.
1 #include <grass/config.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <string.h>
5 #include <math.h>
6 #include <grass/lidar.h>
7 
8 /*----------------------------------------------------------------------------------------*/
9 void P_zero_dim(struct Reg_dimens *dim)
10 {
11  dim->edge_h = 0.0;
12  dim->edge_v = 0.0;
13  dim->overlap = 0.0;
14  dim->sn_size = 0.0;
15  dim->ew_size = 0.0;
16  return;
17 }
18 
19 /*----------------------------------------------------------------------------------------*/
20 /*
21  --------------------------------------------
22  | Elaboration region |
23  | ------------------------------------ |
24  | | General region | |
25  | | ---------------------------- | |
26  | | | | | |
27  | | | | | |
28  | | | | | |
29  | | | Overlap region | | |
30  | | | | | |
31  | | | | | |
32  | | | | | |
33  | | ---------------------------- | |
34  | | | |
35  | ------------------------------------ |
36  | |
37  --------------------------------------------
38 
39  The terminology is misleading:
40  The Overlap region does NOT overlap with neighbouring segments,
41  but the Elaboration and General region do overlap
42 
43  Elaboration is used for interpolation
44  Interpolated points in Elaboration but outside General are discarded
45  Interpolated points in General but outside Overlap are weighed by
46  their distance to Overlap and summed up
47  Interpolated points in Overlap are taken as they are
48 
49  The buffer zones Elaboration - General and General - Overlap must be
50  large enough to avoid artefacts
51  */
52 
53 int
54 P_set_regions(struct Cell_head *Elaboration, struct bound_box * General,
55  struct bound_box * Overlap, struct Reg_dimens dim, int type)
56 {
57  /* Set the Elaboration, General, and Overlap region limits
58  * Returns 0 on success; -1 on failure*/
59  struct Cell_head orig;
60 
61  G_get_window(&orig);
62 
63  switch (type) {
64  case GENERAL_ROW: /* General case N-S direction */
65  Elaboration->north =
66  Elaboration->south + dim.overlap + (2 * dim.edge_h);
67  Elaboration->south = Elaboration->north - dim.sn_size;
68  General->N = Elaboration->north - dim.edge_h;
69  General->S = Elaboration->south + dim.edge_h;
70  Overlap->N = General->N - dim.overlap;
71  Overlap->S = General->S + dim.overlap;
72  return 0;
73 
74  case GENERAL_COLUMN: /* General case E-W direction */
75  Elaboration->west =
76  Elaboration->east - dim.overlap - (2 * dim.edge_v);
77  Elaboration->east = Elaboration->west + dim.ew_size;
78  General->W = Elaboration->west + dim.edge_v;
79  General->E = Elaboration->east - dim.edge_v;
80  Overlap->W = General->W + dim.overlap;
81  Overlap->E = General->E - dim.overlap;
82  return 0;
83 
84  case FIRST_ROW: /* Just started with first row */
85  Elaboration->north = orig.north + 2 * dim.edge_h;
86  Elaboration->south = Elaboration->north - dim.sn_size;
87  General->N = orig.north;
88  General->S = Elaboration->south + dim.edge_h;
89  Overlap->N = General->N;
90  Overlap->S = General->S + dim.overlap;
91  return 0;
92 
93  case LAST_ROW: /* Reached last row */
94  Elaboration->south = orig.south - 2 * dim.edge_h;
95  General->S = orig.south;
96  Overlap->S = General->S;
97  return 0;
98 
99  case FIRST_COLUMN: /* Just started with first column */
100  Elaboration->west = orig.west - 2 * dim.edge_v;
101  Elaboration->east = Elaboration->west + dim.ew_size;
102  General->W = orig.west;
103  General->E = Elaboration->east - dim.edge_v;
104  Overlap->W = General->W;
105  Overlap->E = General->E - dim.overlap;
106  return 0;
107 
108  case LAST_COLUMN: /* Reached last column */
109  Elaboration->east = orig.east + 2 * dim.edge_v;
110  General->E = orig.east;
111  Overlap->E = General->E;
112  return 0;
113  }
114 
115  return -1;
116 }
117 
118 /*----------------------------------------------------------------------------------------*/
119 int P_set_dim(struct Reg_dimens *dim, double pe, double pn, int *nsplx, int *nsply)
120 {
121  int total_splines, edge_splines, n_windows;
122  int lastsplines, lastsplines_min, lastsplines_max;
123  double E_extension, N_extension, edgeE, edgeN;
124  struct Cell_head orig;
125  int ret = 0;
126 
127  G_get_window(&orig);
128 
129  E_extension = orig.east - orig.west;
130  N_extension = orig.north - orig.south;
131  dim->ew_size = *nsplx * pe;
132  dim->sn_size = *nsply * pn;
133  edgeE = dim->ew_size - dim->overlap - 2 * dim->edge_v;
134  edgeN = dim->sn_size - dim->overlap - 2 * dim->edge_h;
135 
136  /* number of moving windows: E_extension / edgeE */
137  /* remaining steps: total steps - (floor(E_extension / edgeE) * E_extension) / passoE */
138  /* remaining steps must be larger than edge_v + overlap + half of overlap window */
139  total_splines = ceil(E_extension / pe);
140  edge_splines = edgeE / pe;
141  n_windows = E_extension / edgeE; /* without last one */
142  if (n_windows > 0) {
143  /* min size of the last overlap window = half of current overlap window */
144  /* max size of the last overlap window = elaboration - 3 * edge - overlap */
145  lastsplines_min = ceil((dim->ew_size / 2.0 - (dim->edge_v + dim->overlap)) / pe);
146  lastsplines_max = ceil((dim->ew_size - 3 * dim->edge_v - dim->overlap) / pe);
147  lastsplines = total_splines - edge_splines * n_windows;
148  while (lastsplines > lastsplines_max || lastsplines < lastsplines_min) {
149  *nsplx -= 1;
150  dim->ew_size = *nsplx * pe;
151  edgeE = dim->ew_size - dim->overlap - 2 * dim->edge_v;
152 
153  edge_splines = edgeE / pe;
154  n_windows = E_extension / edgeE; /* without last one */
155  lastsplines = total_splines - edge_splines * n_windows;
156  if (ret == 0)
157  ret = 1;
158  }
159  }
160 
161  total_splines = ceil(N_extension / pn);
162  edge_splines = edgeN / pn;
163  n_windows = N_extension / edgeN; /* without last one */
164  if (n_windows > 0) {
165  /* min size of the last overlap window = half of current overlap window */
166  /* max size of the last overlap window = elaboration - 3 * edge - overlap */
167  lastsplines_min = ceil((dim->sn_size / 2.0 - (dim->edge_h + dim->overlap)) / pn);
168  lastsplines_max = ceil((dim->sn_size - 3 * dim->edge_h - dim->overlap) / pn);
169  lastsplines = total_splines - edge_splines * n_windows;
170  while (lastsplines > lastsplines_max || lastsplines < lastsplines_min) {
171  *nsply -= 1;
172  dim->sn_size = *nsply * pn;
173  edgeN = dim->sn_size - dim->overlap - 2 * dim->edge_h;
174 
175  edge_splines = edgeN / pn;
176  n_windows = N_extension / edgeN; /* without last one */
177  lastsplines = total_splines - edge_splines * n_windows;
178  if (ret < 2)
179  ret += 2;
180  }
181  }
182 
183  return ret;
184 }
185 
186 /*----------------------------------------------------------------------------------------*/
187 int P_get_edge(int interpolator, struct Reg_dimens *dim, double pe, double pn)
188 {
189  /* Set the edge regions dimension
190  * Returns 1 on success of bilinear; 2 on success of bicubic, 0 on failure */
191  if (interpolator == P_BILINEAR) {
192  /* in case of edge artefacts, increase as multiples of 3 */
193  dim->edge_v = 9 * pe;
194  dim->edge_h = 9 * pn;
195  return 1;
196  }
197  else if (interpolator == P_BICUBIC) {
198  /* in case of edge artefacts, increase as multiples of 4 */
199  dim->edge_v = 12 * pe; /*3 */
200  dim->edge_h = 12 * pn;
201  return 2;
202  }
203  else
204  return 0; /* The interpolator is neither bilinear nor bicubic!! */
205 }
206 
207 /*----------------------------------------------------------------------------------------*/
208 int P_get_BandWidth(int interpolator, int nsplines)
209 {
210  /* Returns the interpolation matrixes BandWidth dimension */
211 
212  if (interpolator == P_BILINEAR) {
213  return (2 * nsplines + 1);
214  }
215  else {
216  return (4 * nsplines + 3);
217  }
218 }
219 
220 /*----------------------------------------------------------------------------------------*/
221 double
222 P_Mean_Calc(struct Cell_head *Elaboration, struct Point *obs, int npoints)
223 {
224  int i, mean_count = 0;
225  double mean = 0.0;
226  struct bound_box mean_box;
227 
228  Vect_region_box(Elaboration, &mean_box);
229  mean_box.W -= CONTOUR;
230  mean_box.E += CONTOUR;
231  mean_box.N += CONTOUR;
232  mean_box.S -= CONTOUR;
233 
234  for (i = 0; i < npoints; i++) { /* */
235  if (Vect_point_in_box
236  (obs[i].coordX, obs[i].coordY, obs[i].coordZ, &mean_box)) {
237  mean_count++;
238  mean += obs[i].coordZ;
239  }
240  }
241  if (mean_count == 0)
242  mean = .0;
243  else
244  mean /= (double)mean_count;
245 
246  return mean;
247 }
248 
249 double P_estimate_splinestep(struct Map_info *Map, double *dens, double *dist)
250 {
251  int type, npoints = 0;
252  double xmin = 0, xmax = 0, ymin = 0, ymax = 0;
253  double x, y, z;
254  struct line_pnts *points;
255  struct line_cats *categories;
256  struct bound_box region_box;
257  struct Cell_head orig;
258 
259  G_get_set_window(&orig);
260  Vect_region_box(&orig, &region_box);
261 
262  points = Vect_new_line_struct();
263  categories = Vect_new_cats_struct();
264 
265  Vect_rewind(Map);
266  while ((type = Vect_read_next_line(Map, points, categories)) > 0) {
267  if (!(type & GV_POINT))
268  continue;
269 
270  x = points->x[0];
271  y = points->y[0];
272  if (points->z != NULL)
273  z = points->z[0];
274  else
275  z = 0.0;
276 
277  /* only use points in current region */
278  if (Vect_point_in_box(x, y, z, &region_box)) {
279  npoints++;
280 
281  if (npoints > 1) {
282  if (xmin > x)
283  xmin = x;
284  else if (xmax < x)
285  xmax = x;
286  if (ymin > y)
287  ymin = y;
288  else if (ymax < y)
289  ymax = y;
290  }
291  else {
292  xmin = xmax = x;
293  ymin = ymax = y;
294  }
295  }
296  }
297  if (npoints > 0) {
298  /* estimated average distance between points in map units */
299  *dist = sqrt(((xmax - xmin) * (ymax - ymin)) / npoints);
300  /* estimated point density as number of points per square map unit */
301  *dens = npoints / ((xmax - xmin) * (ymax - ymin));
302  return 0;
303  }
304  else {
305  return -1;
306  }
307 }
308 
309 struct Point *P_Read_Vector_Region_Map(struct Map_info *Map,
310  struct Cell_head *Elaboration,
311  int *num_points, int dim_vect,
312  int layer)
313 {
314  int line_num, pippo, npoints, cat, type;
315  double x, y, z;
316  struct Point *obs;
317  struct line_pnts *points;
318  struct line_cats *categories;
319  struct bound_box elaboration_box;
320 
321  pippo = dim_vect;
322  obs = (struct Point *)G_calloc(pippo, sizeof(struct Point));
323 
324  points = Vect_new_line_struct();
325  categories = Vect_new_cats_struct();
326 
327  /* Reading points inside elaboration zone */
328  Vect_region_box(Elaboration, &elaboration_box);
329 
330  npoints = 0;
331  line_num = 0;
332 
333  Vect_rewind(Map);
334  while ((type = Vect_read_next_line(Map, points, categories)) > 0) {
335 
336  if (!(type & GV_POINT))
337  continue;
338 
339  line_num++;
340 
341  x = points->x[0];
342  y = points->y[0];
343  if (points->z != NULL)
344  z = points->z[0];
345  else
346  z = 0.0;
347 
348  /* Reading and storing points only if in elaboration_reg */
349  if (Vect_point_in_box(x, y, z, &elaboration_box)) {
350  npoints++;
351  if (npoints >= pippo) {
352  pippo += dim_vect;
353  obs =
354  (struct Point *)G_realloc((void *)obs,
355  (signed int)pippo *
356  sizeof(struct Point));
357  }
358 
359  /* Storing observation vector */
360  obs[npoints - 1].coordX = x;
361  obs[npoints - 1].coordY = y;
362  obs[npoints - 1].coordZ = z;
363  obs[npoints - 1].lineID = line_num; /* Storing also the line's number */
364 
365  Vect_cat_get(categories, layer, &cat);
366  obs[npoints - 1].cat = cat;
367  }
368  }
369  Vect_destroy_line_struct(points);
370  Vect_destroy_cats_struct(categories);
371 
372  *num_points = npoints;
373  return obs;
374 }
375 
376 struct Point *P_Read_Raster_Region_Map(SEGMENT *in_seg,
377  struct Cell_head *Elaboration,
378  struct Cell_head *Original,
379  int *num_points, int dim_vect)
380 {
381  int col, row, startcol, endcol, startrow, endrow, nrows, ncols;
382  int pippo, npoints;
383  double x, y, z;
384  struct Point *obs;
385  struct bound_box elaboration_box;
386 
387  pippo = dim_vect;
388  obs = (struct Point *)G_calloc(pippo, sizeof(struct Point));
389 
390  /* Reading points inside elaboration zone */
391  Vect_region_box(Elaboration, &elaboration_box);
392 
393  npoints = 0;
394  nrows = Original->rows;
395  ncols = Original->cols;
396 
397  if (Original->north > Elaboration->north)
398  startrow = (Original->north - Elaboration->north) / Original->ns_res - 1;
399  else
400  startrow = 0;
401  if (Original->north > Elaboration->south) {
402  endrow = (Original->north - Elaboration->south) / Original->ns_res + 1;
403  if (endrow > nrows)
404  endrow = nrows;
405  }
406  else
407  endrow = nrows;
408  if (Elaboration->west > Original->west)
409  startcol = (Elaboration->west - Original->west) / Original->ew_res - 1;
410  else
411  startcol = 0;
412  if (Elaboration->east > Original->west) {
413  endcol = (Elaboration->east - Original->west) / Original->ew_res + 1;
414  if (endcol > ncols)
415  endcol = ncols;
416  }
417  else
418  endcol = ncols;
419 
420  for (row = startrow; row < endrow; row++) {
421  for (col = startcol; col < endcol; col++) {
422 
423  Segment_get(in_seg, &z, row, col);
424 
425  if (!Rast_is_d_null_value(&z)) {
426 
427  x = Rast_col_to_easting((double)(col) + 0.5, Original);
428  y = Rast_row_to_northing((double)(row) + 0.5, Original);
429 
430  if (Vect_point_in_box(x, y, 0, &elaboration_box)) {
431  npoints++;
432  if (npoints >= pippo) {
433  pippo += dim_vect;
434  obs =
435  (struct Point *)G_realloc((void *)obs,
436  (signed int)pippo *
437  sizeof(struct Point));
438  }
439 
440  /* Storing observation vector */
441  obs[npoints - 1].coordX = x;
442  obs[npoints - 1].coordY = y;
443  obs[npoints - 1].coordZ = z;
444  }
445  }
446  }
447  }
448 
449  *num_points = npoints;
450  return obs;
451 }
452 
453 /*------------------------------------------------------------------------------------------------*/
454 int P_Create_Aux2_Table(dbDriver * driver, char *tab_name)
455 {
456  dbTable *auxiliar_tab;
457  dbColumn *column;
458 
459  auxiliar_tab = db_alloc_table(2);
460  db_set_table_name(auxiliar_tab, tab_name);
461  db_set_table_description(auxiliar_tab,
462  "Intermediate interpolated values");
463 
464  column = db_get_table_column(auxiliar_tab, 0);
465  db_set_column_name(column, "ID");
466  db_set_column_sqltype(column, DB_SQL_TYPE_INTEGER);
467 
468  column = db_get_table_column(auxiliar_tab, 1);
469  db_set_column_name(column, "Interp");
470  db_set_column_sqltype(column, DB_SQL_TYPE_REAL);
471 
472  if (db_create_table(driver, auxiliar_tab) == DB_OK) {
473  G_debug(1, _("<%s> created in database."), tab_name);
474  return TRUE;
475  }
476  else
477  G_warning(_("<%s> has not been created in database."), tab_name);
478 
479  return FALSE;
480 }
481 
482 /*------------------------------------------------------------------------------------------------*/
483 int P_Create_Aux4_Table(dbDriver * driver, char *tab_name)
484 {
485  dbTable *auxiliar_tab;
486  dbColumn *column;
487 
488  auxiliar_tab = db_alloc_table(4);
489  db_set_table_name(auxiliar_tab, tab_name);
490  db_set_table_description(auxiliar_tab,
491  "Intermediate interpolated values");
492 
493  column = db_get_table_column(auxiliar_tab, 0);
494  db_set_column_name(column, "ID");
495  db_set_column_sqltype(column, DB_SQL_TYPE_INTEGER);
496 
497  column = db_get_table_column(auxiliar_tab, 1);
498  db_set_column_name(column, "Interp");
499  db_set_column_sqltype(column, DB_SQL_TYPE_REAL);
500 
501  column = db_get_table_column(auxiliar_tab, 2);
502  db_set_column_name(column, "X");
503  db_set_column_sqltype(column, DB_SQL_TYPE_DOUBLE_PRECISION);
504 
505  column = db_get_table_column(auxiliar_tab, 3);
506  db_set_column_name(column, "Y");
507  db_set_column_sqltype(column, DB_SQL_TYPE_DOUBLE_PRECISION);
508 
509  if (db_create_table(driver, auxiliar_tab) == DB_OK) {
510  G_debug(1, _("<%s> created in database."), tab_name);
511  return TRUE;
512  }
513  else
514  G_warning(_("<%s> has not been created in database."), tab_name);
515 
516  return FALSE;
517 }
518 
519 /*------------------------------------------------------------------------------------------------*/
520 int P_Drop_Aux_Table(dbDriver * driver, char *tab_name)
521 {
522  dbString drop;
523 
524  db_init_string(&drop);
525  db_append_string(&drop, "drop table ");
526  db_append_string(&drop, tab_name);
527  return db_execute_immediate(driver, &drop);
528 }
529 
530 /*---------------------------------------------------------------------------------------*/
531 void P_Aux_to_Raster(double **matrix, int fd)
532 {
533  int ncols, col, nrows, row;
534  void *ptr, *raster;
535 
536  nrows = Rast_window_rows();
537  ncols = Rast_window_cols();
538 
539  raster = Rast_allocate_buf(DCELL_TYPE);
540 
541  for (row = 0; row < nrows; row++) {
542  G_percent(row, nrows, 2);
543 
544  Rast_set_d_null_value(raster, ncols);
545 
546  for (col = 0, ptr = raster; col < ncols;
547  col++, ptr = G_incr_void_ptr(ptr, Rast_cell_size(DCELL_TYPE))) {
548  Rast_set_d_value(ptr, (DCELL) (matrix[row][col]), DCELL_TYPE);
549  }
550  Rast_put_d_row(fd, raster);
551  }
552  G_percent(row, nrows, 2);
553 }
554 
555 /*------------------------------------------------------------------------------------------------*/
556 void
557 P_Aux_to_Vector(struct Map_info *Map, struct Map_info *Out, dbDriver * driver,
558  char *tab_name)
559 {
560 
561  int more, line_num, type, count = 0;
562  double coordX, coordY, coordZ;
563 
564  struct line_pnts *point;
565  struct line_cats *cat;
566  dbTable *table;
567  dbColumn *column;
568  dbValue *value;
569  dbCursor cursor;
570  dbString sql;
571 
572  char buf[1024];
573 
574  point = Vect_new_line_struct();
575  cat = Vect_new_cats_struct();
576 
577  db_init_string(&sql);
578  db_zero_string(&sql);
579 
580  sprintf(buf, "select ID, X, Y, sum(Interp) from %s group by ID, X, Y",
581  tab_name);
582 
583  db_append_string(&sql, buf);
584  db_open_select_cursor(driver, &sql, &cursor, DB_SEQUENTIAL);
585 
586  while (db_fetch(&cursor, DB_NEXT, &more) == DB_OK && more) {
587  count++;
588  table = db_get_cursor_table(&cursor);
589 
590  column = db_get_table_column(table, 0);
591  type = db_sqltype_to_Ctype(db_get_column_sqltype(column));
592  if (type == DB_C_TYPE_INT)
593  value = db_get_column_value(column);
594  else
595  continue;
596  line_num = db_get_value_int(value);
597 
598  column = db_get_table_column(table, 1);
599  type = db_sqltype_to_Ctype(db_get_column_sqltype(column));
600  if (type == DB_C_TYPE_DOUBLE)
601  value = db_get_column_value(column);
602  else
603  continue;
604  coordZ = db_get_value_double(value);
605 
606  column = db_get_table_column(table, 2);
607  type = db_sqltype_to_Ctype(db_get_column_sqltype(column));
608  if (type == DB_C_TYPE_DOUBLE)
609  value = db_get_column_value(column);
610  else
611  continue;
612  coordX = db_get_value_double(value);
613 
614  column = db_get_table_column(table, 3);
615  type = db_sqltype_to_Ctype(db_get_column_sqltype(column));
616  if (type == DB_C_TYPE_DOUBLE)
617  value = db_get_column_value(column);
618  else
619  continue;
620  coordY = db_get_value_double(value);
621 
622  Vect_copy_xyz_to_pnts(point, &coordX, &coordY, &coordZ, 1);
623  Vect_reset_cats(cat);
624  Vect_cat_set(cat, 1, 1);
625  Vect_write_line(Out, GV_POINT, point, cat);
626  }
627  return;
628 }
629 
void G_get_window(struct Cell_head *window)
Get the current region.
Definition: get_window.c:47
#define P_BILINEAR
Definition: lidar.h:63
int cat
Definition: lidar.h:86
double coordX
Definition: lidar.h:82
#define GENERAL_ROW
Definition: lidar.h:39
int Segment_get(SEGMENT *SEG, void *buf, off_t row, off_t col)
Get value from segment file.
Definition: segment/get.c:39
#define FALSE
Definition: dbfopen.c:117
void P_zero_dim(struct Reg_dimens *dim)
Definition: zones.c:9
double coordY
Definition: lidar.h:83
#define FIRST_ROW
Definition: lidar.h:41
struct Point * P_Read_Vector_Region_Map(struct Map_info *Map, struct Cell_head *Elaboration, int *num_points, int dim_vect, int layer)
Definition: zones.c:309
int count
int lineID
Definition: lidar.h:85
#define FIRST_COLUMN
Definition: lidar.h:43
void P_Aux_to_Vector(struct Map_info *Map, struct Map_info *Out, dbDriver *driver, char *tab_name)
Definition: zones.c:557
#define GENERAL_COLUMN
Definition: lidar.h:40
#define NULL
Definition: ccmath.h:32
double ew_size
Definition: lidar.h:77
int P_get_edge(int interpolator, struct Reg_dimens *dim, double pe, double pn)
Definition: zones.c:187
int P_Create_Aux4_Table(dbDriver *driver, char *tab_name)
Definition: zones.c:483
#define TRUE
Definition: dbfopen.c:118
#define CONTOUR
Definition: lidar.h:38
int G_debug(int level, const char *msg,...)
Print debugging message.
Definition: debug.c:65
void P_Aux_to_Raster(double **matrix, int fd)
Definition: zones.c:531
double P_estimate_splinestep(struct Map_info *Map, double *dens, double *dist)
Definition: zones.c:249
int P_Drop_Aux_Table(dbDriver *driver, char *tab_name)
Definition: zones.c:520
double coordZ
Definition: lidar.h:84
double edge_h
Definition: lidar.h:73
if(!DBFLoadRecord(psDBF, hEntity)) return NULL
double overlap
Definition: lidar.h:75
void G_percent(long n, long d, int s)
Print percent complete messages.
Definition: percent.c:62
#define LAST_COLUMN
Definition: lidar.h:44
double sn_size
Definition: lidar.h:76
int P_Create_Aux2_Table(dbDriver *driver, char *tab_name)
Definition: zones.c:454
int P_set_dim(struct Reg_dimens *dim, double pe, double pn, int *nsplx, int *nsply)
Definition: zones.c:119
double edge_v
Definition: lidar.h:74
int P_get_BandWidth(int interpolator, int nsplines)
Definition: zones.c:208
Definition: driver.h:22
void G_get_set_window(struct Cell_head *window)
Get the current working window (region)
double P_Mean_Calc(struct Cell_head *Elaboration, struct Point *obs, int npoints)
Definition: zones.c:222
Definition: lidar.h:80
int P_set_regions(struct Cell_head *Elaboration, struct bound_box *General, struct bound_box *Overlap, struct Reg_dimens dim, int type)
Definition: zones.c:54
void * G_incr_void_ptr(const void *ptr, size_t size)
Advance void pointer.
Definition: alloc.c:186
#define LAST_ROW
Definition: lidar.h:42
void G_warning(const char *msg,...)
Print a warning message to stderr.
Definition: gis/error.c:203
#define P_BICUBIC
Definition: lidar.h:64
struct Point * P_Read_Raster_Region_Map(SEGMENT *in_seg, struct Cell_head *Elaboration, struct Cell_head *Original, int *num_points, int dim_vect)
Definition: zones.c:376