pihmRasterLIBS/gridio.h

Go to the documentation of this file.
00001 /***********************************************************/
00002 /*                                                         */
00003 /* gridio.h                                                */
00004 /*                                                         */
00005 /* Grid Data manipulation functions -- header file       */
00006 /*                                                         */
00007 /*                                                         */
00008 /* David Tarboton                                           */
00009 /* Utah Water Research Laboratory                          */
00010 /* Utah State University                                   */
00011 /* Logan, UT 84322-8200                                    */
00012 /*                                                         */
00013 /***********************************************************/
00014 
00015 #include <stdio.h>
00016 #include <string.h>
00017 #include <stdlib.h>
00018 #include <ctype.h>
00019 #include <limits.h>
00020 #include <math.h>
00021 #include "gioapi.h"
00022 
00023 /*  ESRI Application Programmers Interface include file  */
00024 
00025 #define NA (10.0*FLT_MIN)
00026 #ifndef PI
00027 #define PI 3.14159265359
00028 #endif
00029 #define LINELEN 40
00030 #ifndef MAXLN
00031 #define MAXLN 4096
00032 #endif
00033 
00034 /* data types */
00035 #define RPSHRDTYPE  1
00036 #define RPINTDTYPE  2
00037 #define RPFLTDTYPE  3
00038 
00039 /* byte sizes corresponding to data types above */
00040 #define RPSHRSIZE (sizeof(short))
00041 #define RPINTSIZE (sizeof(int))
00042 #define RPFLTSIZE (sizeof(float))
00043 
00044 //#define DLL   /*  Toggle this definition depending upon whether functions are to be
00045   //  exported or not   */
00046 
00047 //#ifdef DLL
00048 
00049 //#else
00050 
00051 void fgridread(char *file,void *dem, int *datatype, int *nx, int *ny,
00052                            float *dx, float *dy, double bndbox[4],double *csize,
00053                            float *ndv,int *filetype, int *igy);
00054 void fgridwrite(char *file,void *dem, int *datatype, int *nx, int *ny,
00055                            float *dx, float *dy, double bndbox[4],double *csize,
00056                            float *ndv,int *filetype, int *igy);    
00057 int gridwrite(char *file, void **data, int datatype, int nx, int ny, float dx, 
00058  float dy, double bndbox[4], double csize, float ndv, int filetype);
00059 
00060 int gridread(char *file, void ***data, int datatype, int *nx, int *ny,
00061  float *dx, float *dy, double bndbox[4], double *csize, float *ndv, int *filetype);
00062 
00063 void eol(FILE *fp);
00064 
00065 int readline(FILE *fp,char *fline);  
00066 
00067 void **matalloc(int nx,int ny,int datatype);
00068 
00069 int nameadd(char *full,char *arg,char *suff);  
00070 
00071 //#endif
00072 

Generated on Sun Aug 5 17:34:00 2007 for PIHMgis by  doxygen 1.5.2