apisample.h

00001 /*------------------------------------------------------------------------
00002 
00003     BUFR encoding and decoding software and library
00004     Copyright (c) 2007,  Institute of Broadband Communication, TU-Graz
00005     on behalf of EUMETNET OPERA, http://www.knmi.nl/opera
00006 
00007     This library is free software; you can redistribute it and/or
00008     modify it under the terms of the GNU Lesser General Public
00009     License as published by the Free Software Foundation; version 2.1 
00010     of the License.
00011 
00012     This library is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00015     Lesser General Public License for more details.
00016 
00017     You should have received a copy of the GNU Lesser General Public
00018     License along with this library; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
00020 
00021 ----------------------------------------------------------------------------
00022 
00023 FILE:          APISAMPLE.H
00024 IDENT:         $Id: apisample.h,v 1.2 2007/12/18 14:40:58 fuxi Exp $
00025 
00026 AUTHOR:        Juergen Fuchsberger
00027                Institute of Broadband Communication, 
00028                Technical University Graz, Austria
00029 
00030 VERSION NUMBER:3.0
00031 
00032 DATE CREATED:  4-DEC-2007
00033 
00034 STATUS:        DEVELOPMENT FINISHED
00035 
00036 AMENDMENT RECORD:
00037 
00038 $Log: apisample.h,v $
00039 Revision 1.2  2007/12/18 14:40:58  fuxi
00040 added licence header
00041 
00042 Revision 1.1  2007/12/07 08:37:23  fuxi
00043 Initial revision
00044 
00045 
00046 --------------------------------------------------------------------------- */
00047 
00048 
00049 /* A coordinate pair */
00050 
00051 typedef struct point_s {
00052     varfl lat;      /* latitude */
00053     varfl lon;      /* longitude */
00054 } point_t;
00055 
00056 
00057 /* Meta information about image */
00058 
00059 typedef struct meta_s {
00060     int year;
00061     int month;
00062     int day;
00063     int hour;
00064     int min;
00065     point_t radar;  /* Radar position */
00066     varfl radar_height;
00067 } meta_t;
00068 
00069 /* Level slicing table */
00070 
00071 typedef struct scale_s {
00072     /* one method: */
00073     int nvals;       /* number of values in level slicing table */
00074     varfl vals[255]; /* scale values */
00075 
00076     /* another method: */
00077     varfl offset;    /* offset */
00078     varfl increment; /* increment */
00079 } scale_t;
00080 
00081 /* Radar image */
00082 
00083 typedef struct img_s {
00084     int type;       /* Image type */
00085     varfl qual;     /* quality indicator */
00086     int grid;       /* Co-ordinate grid type */
00087     point_t nw;     /* Northwest corner of the image */
00088     point_t ne;     /* NE corner */
00089     point_t se;     /* SE corner */
00090     point_t sw;     /* SW corner */
00091     int nrows;      /* Number of pixels per row */
00092     int ncols;      /* Number of pixels per column */
00093     varfl psizex;   /* Pixel size along x coordinate */
00094     varfl psizey;   /* Pixel size along y coordinate */
00095     scale_t scale;  /* Level slicing table */
00096     unsigned short* data; /* Image data */
00097 } img_t;
00098 
00099 /* Projection information */
00100 
00101 typedef struct proj_s {
00102     int type;       /* Projection type */
00103     varfl majax;    /* Semi-major axis or rotation ellipsoid */
00104     varfl minax;    /* Semi-minor axis or rotation ellipsoid */
00105     point_t orig;   /* Projection origin */
00106     int xoff;       /* False easting */
00107     int yoff;       /* False northing */
00108     varfl stdpar1;  /* 1st standard parallel */
00109     varfl stdpar2;  /* 2nd standard parallel */
00110 } proj_t;
00111 
00112 
00113 /* This is our internal data structure */
00114 
00115 typedef struct radar_data_s {
00116     int wmoblock;           /* WMO block number */
00117     int wmostat;            /* WMO station number */
00118     meta_t meta;            /* Meta information about the product */
00119     img_t img;              /* Radar reflectivity image */
00120     proj_t proj;            /* Projection information */
00121     
00122 } radar_data_t;

Generated on Tue Dec 18 16:52:44 2007 for OPERA BUFR software by  doxygen 1.5.4