~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to frmts/envisat/records.h

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/******************************************************************************
 
2
 * $Id: records.h 22488 2011-06-02 17:04:47Z rouault $
 
3
 *
 
4
 * Project:  APP ENVISAT Support
 
5
 * Purpose:  Low Level Envisat file access (read/write) API.
 
6
 * Author:   Antonio Valentino <antonio.valentino@tiscali.it>
 
7
 *
 
8
 ******************************************************************************
 
9
 * Copyright (c) 2011, Antonio Valentino
 
10
 *
 
11
 * Permission is hereby granted, free of charge, to any person obtaining a
 
12
 * copy of this software and associated documentation files (the "Software"),
 
13
 * to deal in the Software without restriction, including without limitation
 
14
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
15
 * and/or sell copies of the Software, and to permit persons to whom the
 
16
 * Software is furnished to do so, subject to the following conditions:
 
17
 *
 
18
 * The above copyright notice and this permission notice shall be included
 
19
 * in all copies or substantial portions of the Software.
 
20
 *
 
21
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
 
22
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
23
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 
24
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
25
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
26
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 
27
 * DEALINGS IN THE SOFTWARE.
 
28
 ****************************************************************************/
 
29
 
 
30
#ifndef __RECORDS_H__
 
31
#define __RECORDS_H__
 
32
 
 
33
#include "gdal.h"
 
34
 
 
35
#ifdef __cplusplus
 
36
extern "C"
 
37
{
 
38
#endif
 
39
 
 
40
 
 
41
#define MJD_FIELD_SIZE 12
 
42
 
 
43
/*! Field data types */
 
44
typedef enum {
 
45
    /*! Unknown or unspecified type */      EDT_Unknown = GDT_Unknown,
 
46
    /*! Eight bit unsigned integer */       EDT_UByte = GDT_Byte,
 
47
    /*! Eight bit signed integer */         EDT_SByte = GDT_TypeCount + 0,
 
48
    /*! Sixteen bit unsigned integer */     EDT_UInt16 = GDT_UInt16,
 
49
    /*! Sixteen bit signed integer */       EDT_Int16 = GDT_Int16,
 
50
    /*! Thirty two bit unsigned integer */  EDT_UInt32 = GDT_UInt32,
 
51
    /*! Thirty two bit signed integer */    EDT_Int32 = GDT_Int32,
 
52
    /*! Thirty two bit floating point */    EDT_Float32 = GDT_Float32,
 
53
    /*! Sixty four bit floating point */    EDT_Float64 = GDT_Float64,
 
54
    /*! Complex Int16 */                    EDT_CInt16 = GDT_CInt16,
 
55
    /*! Complex Int32 */                    EDT_CInt32 = GDT_CInt32,
 
56
    /*! Complex Float32 */                  EDT_CFloat32 = GDT_CFloat32,
 
57
    /*! Complex Float64 */                  EDT_CFloat64 = GDT_CFloat64,
 
58
    /*! Modified Julian Dated */            EDT_MJD = GDT_TypeCount + 1,
 
59
    /*! ASCII characters */                 EDT_Char = GDT_TypeCount + 2,
 
60
    EDT_TypeCount = GDT_TypeCount + 3       /* maximum type # + 1 */
 
61
} EnvisatDataType;
 
62
 
 
63
typedef struct {
 
64
    const char* szName;
 
65
    const int nOffset;
 
66
    const EnvisatDataType eType;
 
67
    const int nCount;
 
68
} EnvisatFieldDescr;
 
69
 
 
70
typedef struct {
 
71
    const char* szName;
 
72
    const EnvisatFieldDescr *pFields;
 
73
} EnvisatRecordDescr;
 
74
 
 
75
const EnvisatRecordDescr* EnvisatFile_GetRecordDescriptor(const char* pszProduct,
 
76
                                              const char* pszDataset);
 
77
 
 
78
CPLErr EnvisatFile_GetFieldAsString(const void*, int, const EnvisatFieldDescr*, char*);
 
79
 
 
80
 
 
81
#ifdef __cplusplus
 
82
} /* extern "C" */
 
83
#endif
 
84
 
 
85
#endif /* __RECORDS_H__ */