TheBoussinesqModel  3.2.1
 All Data Structures Files Functions Variables Typedefs Macros Pages
b_readgrid.h File Reference

Go to the source code of this file.

Functions

LINEVECTORread_linevector (char *filename, short print)
 
POLYGONread_polygon (FILE *fd, short print)
 
POLYGONVECTORread_polygonvector (char *filename, short print)
 
polygon_connection_attributesread_connections (FILE *fd, short print)
 
polygon_connection_attribute_arrayread_connection_attribute_array (char *filename, short print)
 
GRIDread_grid (char *keyname, short print)
 
SQUARE_GRIDread_square_grid (char *keyname, DOUBLEMATRIX *DTM, long(*index_pixel_from_a_bin)(long r, long c, LONGVECTOR *s_index), DOUBLEVECTOR *V, int(*check_novalues)(double x, DOUBLEVECTOR *V), short print)
 
LONGMATRIX_VECTORread_fine_indices (char *filename, short print)
 
LONGBINread_line_indices (char *filename, short print)
 
DOUBLESQUARE_GRIDread_doublesquare_grid (DOUBLERASTER_MAP *draster, char *keyname, long(*index_pixel_from_a_bin_coarse)(long r, long c, LONGVECTOR *s_index), long(*index_pixel_from_a_bin_fine)(long r, long c, LONGVECTOR *s_index), short print)
 

Detailed Description

Author
Emanuele Cordano
Attention

This file is part of Boussinesq.

Boussinesq is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Boussinesq is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Boussinesq. If not, see http://www.gnu.org/licenses/.

Definition in file b_readgrid.h.

Function Documentation

polygon_connection_attribute_array* read_connection_attribute_array ( char *  filename,
short  print 
)
Author
Emanuele Cordano
May 2008
Parameters
(char*)- name of filename
(short)-

It creates and reads a polygonvector from the following options:

Definition at line 227 of file b_readgrid.c.

References polygon_connection_attribute_array::element, new_connection_attributes(), polygon_connection_attribute_array::nh, polygon_connection_attribute_array::nl, no_PRINT, read_connections(), read_index(), t_fclose(), and t_fopen().

Referenced by read_grid().

polygon_connection_attributes* read_connections ( FILE *  fd,
short  print 
)
Author
Emanuele Cordano
Date
May 2009
Parameters
fd- (FILE *) file pointer
print- (short)

Definition at line 185 of file b_readgrid.c.

References polygon_connection_attributes::connections, polygon_connection_attributes::d_connections, free_doublevector(), new_doublevector(), new_longvector(), DOUBLEVECTOR::nh, LONGVECTOR::nl, no_PRINT, and read_doublearray().

Referenced by read_connection_attribute_array().

LONGMATRIX_VECTOR* read_fine_indices ( char *  filename,
short  print 
)
Author
Emanuele Cordano date May 2009
Parameters
(char*)- name of filename
(short)-

Definition at line 364 of file b_readgrid.c.

References LONGMATRIX_VECTOR::element, new_longmatrix_vector(), LONGMATRIX_VECTOR::nh, LONGMATRIX_VECTOR::nl, no_PRINT, LONGMATRIX::nrh, read_index(), read_longmatrix(), t_error(), t_fclose(), and t_fopen().

Referenced by read_doublesquare_grid().

LONGBIN* read_line_indices ( char *  filename,
short  print 
)
LINEVECTOR* read_linevector ( char *  filename,
short  print 
)
Author
Emanuele Cordano
Date
May 2009
Parameters
filename(char *) - name of the file where to read line_information
print(short)

It creates and reads a linevector from the following options: index{1} FILE CONTAINIG NECESSARY INFORMATION FOR LINES x y line_index lenght2d x_P1 y_P1 x_P2 y_P2

1: double matrix lines information {55550,8}

x coordinate of the middle point

y coordinate of the midddele point

iline_index of the line

lenght of the line

P1 x coordinate

P1 y coordinate

P2 x coordinate

P2 y coordinate

Definition at line 56 of file b_readgrid.c.

References LINEVECTOR::element, free_doublematrix(), free_point(), DOUBLEMATRIX::nch, new_line_from_points(), new_linevector(), new_point(), LINEVECTOR::nh, LINEVECTOR::nl, no_PRINT, DOUBLEMATRIX::nrh, NULL_ELEVATION, read_doublematrix(), read_index(), and t_fopen().

Referenced by read_grid().

POLYGON* read_polygon ( FILE *  fd,
short  print 
)

Emanuele Cordano

Date
May 2009
Parameters
(FILE*) - file pointer
(short)- print

Definition at line 113 of file b_readgrid.c.

References POLYGON::area2D, POLYGON::centroid, POLYGON::edge_indices, free_doublevector(), POLYGON::index, new_longvector(), new_point(), DOUBLEVECTOR::nh, LONGVECTOR::nl, NULL_ELEVATION, read_doublearray(), and t_error().

Referenced by read_polygonvector().

POLYGONVECTOR* read_polygonvector ( char *  filename,
short  print 
)
Author
Emanuele Cordano
May 2008
Parameters
(char*)- name of filename
(short)-

It creates and reads a polygonvector from the following options:

Definition at line 154 of file b_readgrid.c.

References POLYGONVECTOR::element, POLYGON::index, new_polygonvector(), POLYGONVECTOR::nh, POLYGONVECTOR::nl, no_PRINT, read_index(), read_polygon(), t_fclose(), and t_fopen().

Referenced by read_grid().

SQUARE_GRID* read_square_grid ( char *  keyname,
DOUBLEMATRIX DTM,
long(*)(long r, long c, LONGVECTOR *s_index)  index_pixel_from_a_bin,
DOUBLEVECTOR V,
int(*)(double x, DOUBLEVECTOR *V)  check_novalues,
short  print 
)
Author
Emanuele Cordano
Date
May 2009
Parameters
keyname(char *) - keyname of the SQUARE_GRID
DTM(DOUBLEMATRIX *) - Digital Terrain Model
long(*index_pixel_from_a_bin)(long r, long c,LONGVECTOR *s_index) - function for the space filling curve
V- (DOUBLEVECTOR *) - vector containig novalue information
int(*check_novalues)(double x, DOUBLEVECTOR *V) - function identintifyng novalue information
print(short)
Returns
a SQUARE GRID whose data are written in files with FLUIdTurtle formalism

first element of sqp->inices_pixel is assumed as a no-value

Definition at line 311 of file b_readgrid.c.

References SQUARE_GRID::grid, index_pixel_from_a_bin(), SQUARE_GRID::indices_horizontal_lines, SQUARE_GRID::indices_pixel, SQUARE_GRID::indices_vertex, SQUARE_GRID::indices_vertical_lines, INTEGER_NULL, m_indices_from_mask(), LONGMATRIX::ncl, SQUARE_GRID::nhorizontal_lines, SQUARE_GRID::novalue, LONGMATRIX::nrl, read_grid(), and t_error().

Referenced by read_doublesquare_grid().