亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? avc_e00write.c

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? C
?? 第 1 頁 / 共 3 頁
字號:
/********************************************************************** * $Id: avc_e00write.c,v 1.20 2006/06/27 18:38:43 dmorissette Exp $ * * Name:     avc_e00write.c * Project:  Arc/Info vector coverage (AVC)  E00->BIN conversion library * Language: ANSI C * Purpose:  Functions to create a binary coverage from a stream of *           ASCII E00 lines. * 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_e00write.c,v $ * Revision 1.20  2006/06/27 18:38:43  dmorissette * Cleaned up E00 reading (bug 1497, patch from James F.) * * Revision 1.19  2006/06/14 16:31:28  daniel * Added support for AVCCoverPC2 type (bug 1491) * * Revision 1.18  2006/03/02 22:46:26  daniel * Accept empty subclass names for TX6/TX7 sections (bug 1261) * * Revision 1.17  2005/06/03 03:49:59  daniel * Update email address, website url, and copyright dates * * Revision 1.16  2002/08/27 15:46:15  daniel * Applied fix made in GDAL/OGR by 'aubin' (moved include ctype.h after avc.h) * * Revision 1.15  2002/04/16 21:19:10  daniel * Use VSIRmdir() * * Revision 1.14  2002/03/18 19:00:44  daniel * Use VSIMkdir() and not VSIMkDir() * * Revision 1.13  2002/02/18 21:16:33  warmerda * modified to use VSIMkDir * * Revision 1.12  2001/05/23 15:23:17  daniel * Remove trailing '/' in info directory path when creating the info dir. * * Revision 1.11  2000/09/26 20:21:04  daniel * Added AVCCoverPC write * * Revision 1.10  2000/09/22 19:45:21  daniel * Switch to MIT-style license * * Revision 1.9  2000/05/29 22:47:39  daniel * Made validation on new coverage name more flexible. * * Revision 1.8  2000/05/29 15:31:31  daniel * Added Japanese DBCS support * * Revision 1.7  2000/02/14 17:19:53  daniel * Accept '-' cahracter in new coverage name * * Revision 1.6  2000/01/10 02:57:44  daniel * Little changes to accomodate read support for "weird" coverages * * Revision 1.5  1999/12/24 07:18:34  daniel * Added PC Arc/Info coverages support * * Revision 1.4  1999/08/26 17:36:36  daniel * Avoid overwriting arc.dir on Windows... happened only when several * coverages are created by the same process on Windows. * * Revision 1.3  1999/08/23 18:23:35  daniel * Added AVCE00DeleteCoverage() * * Revision 1.2  1999/05/17 16:23:36  daniel * Added AVC_DEFAULT_PREC + more cover name validation in AVCE00WriteOpen(). * * Revision 1.1  1999/05/11 02:34:46  daniel * Initial revision * **********************************************************************/#include "cpl_vsi.h"#include "avc.h"#include <ctype.h>      /* tolower() */static GBool _IsStringAlnum(const char *pszFname);/********************************************************************** *                          AVCE00WriteOpen() * * Open (create) an Arc/Info coverage, ready to be receive a stream * of ASCII E00 lines and convert that to the binary coverage format. * * For now, writing to or overwriting existing coverages is not supported * (and may quite well never be!)... you can only create new coverages. * * Important Note: The E00 source lines are assumed to be valid... the * library performs no validation on the consistency of what it is  * given as input (i.e. topology, polygons consistency, etc.). * So the coverage that will be created will be only as good as the  * E00 input that is used to generate it. * * pszCoverPath MUST be the name of the coverage directory, including  * the path to it. * (contrary to AVCE00ReadOpen(), you cannot pass the name of one of *  the files in the coverage directory). * The name of the coverage MUST be included in pszCoverPath... this  * means that passing "." is invalid. * * eNewCoverType is the type of coverage to create.   *               Either AVCCoverV7 (Arc/Info V7 (Unix) coverage) *               or     AVCCoverPC (PC Arc/Info coverage) * * nPrecision should always be AVC_DEFAULT_PREC to automagically detect the *            source coverage's precision and use that same precision *            for the new coverage.   * *            This parameter has been included to allow adding the  *            possibility to eventually create coverages with a precision  *            different from the source E00. *            Given the way the lib is built, it could be possible to *            also pass  AVC_SINGLE_PREC or AVC_DOUBLE_PREC to explicitly *            request the creation of a coverage with that precision,  *            but the library does not (not yet!) properly convert the  *            TABLE attributes' precision, and the resulting coverage may *            be invalid in some cases.   *            This improvement is on the ToDo list! * * Returns a new AVCE00WritePtr handle or NULL if the coverage could  * not be created or if a coverage with that name already exists. * * The handle will eventually have to be released with AVCE00ReadClose(). **********************************************************************/AVCE00WritePtr  AVCE00WriteOpen(const char *pszCoverPath,                                 AVCCoverType eNewCoverType, int nPrecision ){    AVCE00WritePtr  psInfo;    int             i, nLen;    VSIStatBuf      sStatBuf;    CPLErrorReset();    /*-----------------------------------------------------------------     * Create pszCoverPath directory.       *----------------------------------------------------------------*/    if (pszCoverPath == NULL || strlen(pszCoverPath) == 0)    {        CPLError(CE_Failure, CPLE_AssertionFailed,                  "Invalid (empty) coverage directory name.");        return NULL;    }    else if ( VSIStat(pszCoverPath, &sStatBuf) == 0 &&              VSI_ISDIR(sStatBuf.st_mode) )    {        /*-------------------------------------------------------------         * Directory already exists... make sure it is empty         * otherwise we can't use it as a coverage directory.         *------------------------------------------------------------*/        char **papszFiles;        papszFiles = CPLReadDir(pszCoverPath);        for(i=0; papszFiles && papszFiles[i]; i++)        {            if (!EQUAL(".", papszFiles[i]) &&                !EQUAL("..", papszFiles[i]))            {                CPLError(CE_Failure, CPLE_OpenFailed,                          "Cannot create coverage %s: directory already exists "                         "and is not empty.", pszCoverPath);                CSLDestroy(papszFiles);                papszFiles = NULL;                return NULL;            }        }        CSLDestroy(papszFiles);        papszFiles = NULL;    }    else    {        /*-------------------------------------------------------------         * Create new pszCoverPath directory.           * This will fail if a file with the same name already exists.         *------------------------------------------------------------*/        if( VSIMkdir(pszCoverPath, 0777) != 0 )        {            CPLError(CE_Failure, CPLE_OpenFailed,                      "Unable to create coverage directory: %s.", pszCoverPath);            return NULL;        }    }    /*-----------------------------------------------------------------     * Alloc the AVCE00WritePtr handle     *----------------------------------------------------------------*/    psInfo = (AVCE00WritePtr)CPLCalloc(1, sizeof(struct AVCE00WriteInfo_t));    /*-----------------------------------------------------------------     * Validate and store coverage type     *----------------------------------------------------------------*/    if (eNewCoverType == AVCCoverV7 || eNewCoverType == AVCCoverPC)        psInfo->eCoverType = eNewCoverType;    else    {        CPLError(CE_Failure, CPLE_NotSupported,                  "Requested coverage type cannot be created.  Please use "                 "the AVCCoverV7 or AVCCoverPC coverage type.");        CPLFree(psInfo);        return NULL;    }    /*-----------------------------------------------------------------     * Requested precision for the new coverage... for now only     * AVC_DEFAULT_PREC is supported.  When the first section is     * read, then this section's precision will be used for the whole     * coverage.  (This is done inside AVCE00WriteNextLine())     *----------------------------------------------------------------*/    if (psInfo->eCoverType == AVCCoverPC)        psInfo->nPrecision = AVC_SINGLE_PREC; /* PC Cover always single prec.*/    else if (nPrecision == AVC_DEFAULT_PREC)        psInfo->nPrecision = nPrecision;    else    {        CPLError(CE_Failure, CPLE_IllegalArg,                  "Coverages can only be created using AVC_DEFAULT_PREC. "                 "Please see the documentation for AVCE00WriteOpen().");        CPLFree(psInfo);        return NULL;    }    /*-----------------------------------------------------------------     * Make sure coverage directory name is terminated with a '/' (or '\\')     *----------------------------------------------------------------*/    nLen = strlen(pszCoverPath);    if (pszCoverPath[nLen-1] == '/' || pszCoverPath[nLen-1] == '\\')        psInfo->pszCoverPath = CPLStrdup(pszCoverPath);    else    {#ifdef WIN32        psInfo->pszCoverPath = CPLStrdup(CPLSPrintf("%s\\",pszCoverPath));#else        psInfo->pszCoverPath = CPLStrdup(CPLSPrintf("%s/",pszCoverPath));#endif    }    /*-----------------------------------------------------------------     * Extract the coverage name from the coverage path.  Note that     * for this the coverage path must be in the form:     * "dir1/dir2/dir3/covername/" ... if it is not the case, then     * we would have to use getcwd() to find the current directory name...     * but for now we'll just produce an error if this happens.     *----------------------------------------------------------------*/    nLen = 0;    for( i = strlen(psInfo->pszCoverPath)-1; 	 i > 0 && psInfo->pszCoverPath[i-1] != '/' &&	          psInfo->pszCoverPath[i-1] != '\\'&&	          psInfo->pszCoverPath[i-1] != ':';	 i-- )     {        nLen++;    }    if (nLen > 0)    {        psInfo->pszCoverName = CPLStrdup(psInfo->pszCoverPath+i);        psInfo->pszCoverName[nLen] = '\0';    }    else    {        CPLError(CE_Failure, CPLE_OpenFailed,                  "Invalid coverage path (%s): "                 "coverage name must be included in path.", pszCoverPath);        CPLFree(psInfo->pszCoverPath);        CPLFree(psInfo);        return NULL;    }    if (strlen(psInfo->pszCoverName) > 13 ||        !_IsStringAlnum(psInfo->pszCoverName) )    {        CPLError(CE_Failure, CPLE_OpenFailed,                  "Invalid coverage name (%s): "                 "coverage name must be 13 chars or less and contain only "                 "alphanumerical characters, '-' or '_'.",                  psInfo->pszCoverName);        CPLFree(psInfo->pszCoverPath);        CPLFree(psInfo->pszCoverName);        CPLFree(psInfo);        return NULL;    }    if (psInfo->eCoverType == AVCCoverPC || psInfo->eCoverType == AVCCoverPC2)    {        /*-------------------------------------------------------------         * No 'info' directory is required for PC coverages         *------------------------------------------------------------*/        psInfo->pszInfoPath = NULL;    }    else    {        /*-------------------------------------------------------------         * Lazy way to build the INFO path: simply add "../info/"...         * this could probably be improved!         *------------------------------------------------------------*/        psInfo->pszInfoPath = (char*)CPLMalloc((strlen(psInfo->pszCoverPath)+9)                                               *sizeof(char));#ifdef WIN32#  define AVC_INFOPATH "..\\info\\"#else#  define AVC_INFOPATH "../info/"#endif        sprintf(psInfo->pszInfoPath, "%s%s", psInfo->pszCoverPath,                                              AVC_INFOPATH);        /*-------------------------------------------------------------         * Check if the info directory exists and contains the "arc.dir"         * if the info dir does not exist, then make sure we can create         * the arc.dir file (i.e. try to create an empty one)         *         * Note: On Windows, this VSIStat() call seems to sometimes fail even 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久免费美女视频| 1区2区3区欧美| 五月激情丁香一区二区三区| 91黄色小视频| 中文字幕一区三区| 一本大道av一区二区在线播放| 亚洲日本韩国一区| 99久久精品国产一区| 亚洲天堂成人网| 欧美影院精品一区| 日日噜噜夜夜狠狠视频欧美人| 7799精品视频| 热久久免费视频| 久久影院视频免费| 成人性视频免费网站| 国产精品看片你懂得| 91福利在线导航| 日本一区中文字幕| 久久综合久久综合久久| 国产精品主播直播| 日韩毛片在线免费观看| 欧美色爱综合网| 免费观看成人av| 久久精品免费在线观看| 99re66热这里只有精品3直播| 亚洲久草在线视频| 日本高清不卡视频| 天堂午夜影视日韩欧美一区二区| 日韩你懂的电影在线观看| 国产麻豆9l精品三级站| 亚洲人成影院在线观看| 日韩美女主播在线视频一区二区三区 | 日韩美女视频一区| 91精品国产综合久久蜜臀| 成人免费视频免费观看| 日韩在线卡一卡二| 国产精品天天摸av网| 欧美日本高清视频在线观看| 国产福利91精品一区| 午夜久久电影网| 国产精品超碰97尤物18| 日韩一卡二卡三卡国产欧美| 91原创在线视频| 激情深爱一区二区| 亚洲国产精品一区二区久久| 欧美激情一区二区三区| 91精品国产麻豆| 91网站在线观看视频| 国产综合久久久久久鬼色| 亚洲一区二区欧美| 亚洲国产电影在线观看| 欧美一二三四在线| 欧美在线观看你懂的| 国产不卡在线视频| 日本aⅴ免费视频一区二区三区 | 国产精品美女久久久久久2018 | 日本一区二区三区久久久久久久久不 | 欧美天堂一区二区三区| 国产91高潮流白浆在线麻豆 | 国产精品色呦呦| 日韩午夜中文字幕| 欧美视频中文一区二区三区在线观看| 国产盗摄一区二区| 久久精品国产999大香线蕉| 一区二区三区四区视频精品免费 | 99视频在线观看一区三区| 精品一区二区三区久久| 天天影视网天天综合色在线播放| 国产精品久久久久久久久果冻传媒| 精品欧美乱码久久久久久| 欧美日韩国产高清一区| 91女厕偷拍女厕偷拍高清| 国产精品亚洲视频| 久久国产麻豆精品| 日韩成人免费看| 亚洲宅男天堂在线观看无病毒| 国产精品国产三级国产有无不卡 | 国产精品久久久久aaaa樱花| 久久久久久电影| 精品噜噜噜噜久久久久久久久试看 | 椎名由奈av一区二区三区| 国产三级精品三级在线专区| 欧美一区二区不卡视频| 欧美日韩国产影片| 欧洲亚洲国产日韩| 在线亚洲免费视频| 91在线视频观看| 99精品欧美一区二区三区小说| 国产精品亚洲成人| 韩国精品主播一区二区在线观看| 免费成人av在线播放| 日本美女视频一区二区| 舔着乳尖日韩一区| 亚洲第一福利视频在线| 亚洲成人免费在线观看| 亚洲成精国产精品女| 亚洲第一电影网| 午夜av一区二区三区| 亚洲444eee在线观看| 亚洲成人一区在线| 丝袜脚交一区二区| 丝袜亚洲另类欧美综合| 天天色天天操综合| 奇米亚洲午夜久久精品| 蜜臀av性久久久久蜜臀aⅴ流畅| 日本sm残虐另类| 久久99九九99精品| 国产精品白丝av| 国产jizzjizz一区二区| 成人av高清在线| 91啪九色porn原创视频在线观看| 99久久99久久免费精品蜜臀| 色综合亚洲欧洲| 在线观看视频一区二区欧美日韩| 欧美在线不卡视频| 欧美精品三级日韩久久| 欧美一区二区福利在线| 欧美精品一区二区三区蜜臀| 国产午夜亚洲精品羞羞网站| 国产精品色噜噜| 亚洲免费在线电影| 亚洲电影视频在线| 日本午夜精品视频在线观看 | 日韩欧美国产高清| 奇米777欧美一区二区| 精品一区二区三区av| 国产成人亚洲精品狼色在线| 99久久综合国产精品| 欧美亚洲一区二区在线观看| 欧美一区二区三区免费| 精品国产区一区| 国产精品美女久久福利网站| 一区二区高清在线| 午夜a成v人精品| 国产美女一区二区| 97精品视频在线观看自产线路二| 在线观看亚洲专区| 日韩欧美一区二区三区在线| 久久久91精品国产一区二区精品| 亚洲三级久久久| 婷婷综合五月天| 国产一区二区在线影院| 99久久精品费精品国产一区二区| 欧美日韩一区在线| 久久一留热品黄| 亚洲精品国产一区二区三区四区在线| 天堂在线一区二区| 高清久久久久久| 欧美中文一区二区三区| 日韩三级免费观看| 国产精品色哟哟| 天堂影院一区二区| 高清视频一区二区| 欧美日韩夫妻久久| 日本一区二区视频在线观看| 亚洲综合色自拍一区| 韩国三级在线一区| 色欧美日韩亚洲| 欧美不卡一二三| 亚洲精品国产成人久久av盗摄| 麻豆精品久久久| 色狠狠一区二区| 久久亚洲精精品中文字幕早川悠里| 亚洲色图在线看| 麻豆精品视频在线| 91亚洲永久精品| 欧美精品一区二区三区高清aⅴ| 亚洲靠逼com| 国产毛片精品国产一区二区三区| 日本高清无吗v一区| 久久久亚洲精品石原莉奈| 亚洲国产va精品久久久不卡综合| 国产sm精品调教视频网站| 欧美日本在线一区| 国产精品色婷婷| 久久国产视频网| 欧美亚洲一区二区三区四区| 国产日韩欧美综合在线| 久久女同性恋中文字幕| 久久久精品国产99久久精品芒果 | 91在线视频18| 3atv一区二区三区| 国产精品欧美极品| 日韩av中文在线观看| 一本一道波多野结衣一区二区 | 日韩三级在线免费观看| 亚洲欧美另类在线| 国产成人av一区二区| 91精品福利在线一区二区三区| 最新日韩av在线| 国产一区二区三区免费在线观看| 欧美日韩久久久一区| 一区在线观看免费| 国产精品一区免费在线观看| 91.麻豆视频| 亚洲一区二区三区四区在线观看| 成人性视频免费网站| 日韩精品综合一本久道在线视频| 亚洲一级二级三级在线免费观看| 本田岬高潮一区二区三区|