⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 avc.h

📁 支持各种栅格图像和矢量图像读取的库
💻 H
📖 第 1 页 / 共 3 页
字号:
/********************************************************************** * $Id: avc.h,v 1.22 2006/06/27 18:38:43 dmorissette Exp $ * * Name:     avc.h * Project:  Arc/Info Vector coverage (AVC) BIN<->E00 conversion library * Language: ANSI C * Purpose:  Header file containing all definitions for the library. * Author:   Daniel Morissette, dmorissette@dmsolutions.ca * ********************************************************************** * Copyright (c) 1999-2001, Daniel Morissette * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: *  * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. *  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER  * DEALINGS IN THE SOFTWARE. ********************************************************************** * * $Log: avc.h,v $ * Revision 1.22  2006/06/27 18:38:43  dmorissette * Cleaned up E00 reading (bug 1497, patch from James F.) * * Revision 1.21  2006/06/16 11:48:11  daniel * New functions to read E00 files directly as opposed to translating to * binary coverage. Used in the implementation of E00 read support in OGR. * Contributed by James E. Flemer. (bug 1497) * * Revision 1.20  2006/06/14 16:31:28  daniel * Added support for AVCCoverPC2 type (bug 1491) * * Revision 1.19  2005/06/03 03:49:58  daniel * Update email address, website url, and copyright dates * * Revision 1.18  2005/06/03 03:29:16  daniel * Ready for 1.3.0 release * * Revision 1.17  2004/02/11 05:49:44  daniel * Added support for deleted flag in arc.dir (bug 2332) * * Revision 1.16  2002/02/14 16:34:15  warmerda * fixed prototype name for AVCBinReadNextPrj * * Revision 1.15  2002/02/13 20:35:24  warmerda * added AVCBinReadObject * * Revision 1.14  2001/11/25 21:15:23  daniel * Added hack (AVC_MAP_TYPE40_TO_DOUBLE) to map type 40 fields bigger than 8 * digits to double precision as we generate E00 output (bug599) * * Revision 1.13  2001/02/20 15:24:11  daniel * Updated AVC_VERSION="1.2.0 (2000-10-17)" * * Revision 1.12  2000/09/26 21:38:44  daniel * Updated AVC_VERSION * * Revision 1.11  2000/09/26 20:21:04  daniel * Added AVCCoverPC write * * Revision 1.10  2000/09/22 19:45:20  daniel * Switch to MIT-style license * * Revision 1.9  2000/05/29 15:31:30  daniel * Added Japanese DBCS support * * Revision 1.8  2000/01/10 02:56:01  daniel * Added read support for "weird" coverages * * Revision 1.7  1999/12/24 07:18:34  daniel * Added PC Arc/Info coverages support * * Revision 1.6  1999/08/23 18:15:56  daniel * Added AVCE00DeleteCoverage() * * Revision 1.5  1999/06/08 22:07:28  daniel * Added AVCReadWrite in AVCAccess type * * Revision 1.4  1999/05/17 16:16:41  daniel * Added RXP + TXT/TX6/TX7 write support * * Revision 1.3  1999/05/11 02:15:04  daniel * Added coverage write support * * Revision 1.2  1999/02/25 03:39:39  daniel * Added TXT, TX6/TX7, RXP and RPL support * * Revision 1.1  1999/01/29 16:29:24  daniel * Initial revision * **********************************************************************/#ifndef _AVC_H_INCLUDED_#define _AVC_H_INCLUDED_#include "cpl_conv.h"#include "cpl_string.h"#include "dbfopen.h"#include "avc_mbyte.h"CPL_C_START/*--------------------------------------------------------------------- * Current version of the AVCE00 library... always useful! *--------------------------------------------------------------------*/#define AVC_VERSION "2.0.0-dev (2006-06-16)"/* Coverage precision */#define AVC_DEFAULT_PREC   0#define AVC_SINGLE_PREC    1#define AVC_DOUBLE_PREC    2/* AVC_FORMAT_DBF_FLOAT used as nPrecision value only for AVCPrintRealValue() */#define AVC_FORMAT_DBF_FLOAT  42/* Coverage file types */typedef enum{    AVCFileUnknown = 0,    AVCFileARC,    AVCFilePAL,    AVCFileCNT,    AVCFileLAB,    AVCFilePRJ,    AVCFileTOL,    AVCFileLOG,    AVCFileTXT,  /* TXT and TX6 share the same binary format */    AVCFileTX6,    AVCFileRXP,    AVCFileRPL,  /* RPL is a PAL for a region */    AVCFileTABLE}AVCFileType;/* Read or Write access flag */typedef enum{    AVCRead,    AVCWrite,    AVCReadWrite} AVCAccess;/* Coverage type: PC Arc/Info or Unix Arc/Info v7 */typedef enum{    AVCCoverTypeUnknown = 0,    AVCCoverV7,    AVCCoverPC,    AVCCoverPC2,   /* Unknown version... hybrid between V7 and PC !!! */    AVCCoverWeird  /* Unknown version... hybrid between V7 and PC !!! */} AVCCoverType;/* Enum for byte ordering */typedef enum{    AVCBigEndian,    /* CPL_MSB, Motorola ordering */    AVCLittleEndian  /* CPL_LSB, Intel ordering */} AVCByteOrder;/* Macros to establish byte ordering for each coverage type * The rule until now: all coverage types use big endian (Motorola ordering) * except PC Arc/Info coverages variant 1 (AVCCoverPC). */#define AVC_COVER_BYTE_ORDER(cover_type)  \   (((cover_type) == AVCCoverPC ) ? AVCLittleEndian : AVCBigEndian )/*=====================================================================                        Structures =====================================================================*//*--------------------------------------------------------------------- * Structures defining various Arc/Info objects types. * These are shared by the Binary and the E00 functions. *--------------------------------------------------------------------*/typedef struct AVCVertex_t{    double      x;      /* Even for single precision, we always         */    double      y;      /* use doubles for the vertices in memory.      */}AVCVertex;/*--------------------------------------------------------------------- * AVCArc: Information about an ARC *--------------------------------------------------------------------*/typedef struct AVCArc_t{    GInt32      nArcId;    GInt32      nUserId;    GInt32      nFNode;    GInt32      nTNode;    GInt32      nLPoly;    GInt32      nRPoly;    GInt32      numVertices;    AVCVertex   *pasVertices;   }AVCArc;/*--------------------------------------------------------------------- * AVCPal: A PAL (Polygon Arc List) references all the arcs that  *         constitute a polygon. *--------------------------------------------------------------------*/typedef struct AVCPalArc_t{    GInt32      nArcId;    GInt32      nFNode;    GInt32      nAdjPoly;}AVCPalArc;typedef struct AVCPal_t{    GInt32      nPolyId;    AVCVertex   sMin;    AVCVertex   sMax;    GInt32      numArcs;    AVCPalArc   *pasArcs;}AVCPal;/*--------------------------------------------------------------------- * AVCCnt: Information about a CNT (polygon centroid) *--------------------------------------------------------------------*/typedef struct AVCCnt_t{    GInt32      nPolyId;    AVCVertex   sCoord;    GInt32      numLabels;      /* 0 or 1 */    GInt32      *panLabelIds;}AVCCnt;/*--------------------------------------------------------------------- * AVCLab: Information about a LAB (polygon Label) *--------------------------------------------------------------------*/typedef struct AVCLab_t{    GInt32      nValue;    GInt32      nPolyId;    AVCVertex   sCoord1;    AVCVertex   sCoord2;    AVCVertex   sCoord3;}AVCLab;/*--------------------------------------------------------------------- * AVCTol: Information about a TOL record (coverage tolerances) *--------------------------------------------------------------------*/typedef struct AVCTol_t{    GInt32      nIndex;    GInt32      nFlag;    double      dValue;}AVCTol;/*--------------------------------------------------------------------- * AVCTxt: Information about a TXT/TX6/TX7 record (annotations) *--------------------------------------------------------------------*/typedef struct AVCTxt_t{    GInt32      nTxtId;    GInt32      nUserId;    GInt32      nLevel;    float       f_1e2;	/* Always (float)-1e+20, even for double precision! */    GInt32      nSymbol;    GInt32      numVerticesLine;    GInt32      n28;    /* Unknown value at byte 28 */    GInt32      numChars;    GInt32      numVerticesArrow;    GInt16      anJust1[20];    GInt16      anJust2[20];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -