亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
青青草伊人久久| 日韩avvvv在线播放| 美女精品一区二区| 91免费小视频| 国产视频一区在线观看| 亚洲成人tv网| www.亚洲色图.com| 久久影院电视剧免费观看| 亚洲国产精品久久一线不卡| 丰满放荡岳乱妇91ww| 欧美电视剧在线看免费| 亚洲国产sm捆绑调教视频| 国产成人99久久亚洲综合精品| 91精品国产综合久久蜜臀| 一区二区不卡在线播放 | 国产精品久久久久久久久搜平片| 视频一区国产视频| 91成人国产精品| 亚洲人吸女人奶水| 波多野洁衣一区| 国产日韩欧美高清在线| 精品无人区卡一卡二卡三乱码免费卡| 欧美精品一级二级三级| 一级日本不卡的影视| 91天堂素人约啪| 国产一区二区在线观看免费| 欧美日韩一区二区三区在线看| 亚洲欧美日韩国产综合在线| 不卡区在线中文字幕| 久久美女高清视频| 韩国三级中文字幕hd久久精品| 日韩一区二区免费在线观看| 日日骚欧美日韩| 这里只有精品免费| 视频一区二区三区中文字幕| 欧美日韩国产高清一区二区三区| 亚洲一区欧美一区| 欧美性生活一区| 性做久久久久久免费观看 | 国产最新精品免费| 日韩欧美中文一区二区| 美国av一区二区| 欧美电影免费观看高清完整版| 免费观看在线色综合| 日韩欧美国产三级电影视频| 免费人成黄页网站在线一区二区| 日韩色在线观看| 麻豆精品视频在线观看免费| 日韩三级免费观看| 久久99精品视频| 精品国产不卡一区二区三区| 国产一区久久久| 中文子幕无线码一区tr| 成人看片黄a免费看在线| 中文字幕一区av| 一本色道久久综合亚洲91| 亚洲综合色在线| 欧美日韩久久一区二区| 日韩av中文字幕一区二区三区| 欧美一二三四区在线| 久久精品国产999大香线蕉| 久久中文娱乐网| 国产成a人亚洲精品| 中文字幕中文在线不卡住| 色94色欧美sute亚洲13| 丝袜美腿亚洲一区二区图片| 日韩精品中午字幕| 国产成人啪免费观看软件| 国产精品伦理在线| 欧美色偷偷大香| 精品一区二区影视| 国产精品久久久久久久久免费樱桃| 色吊一区二区三区| 青青草国产精品97视觉盛宴| 337p日本欧洲亚洲大胆精品| 成人激情免费网站| 亚洲一区在线电影| 精品国产1区二区| 91丨九色丨蝌蚪丨老版| 亚洲国产日韩在线一区模特| 日韩欧美美女一区二区三区| 国产91精品久久久久久久网曝门| 樱花影视一区二区| 日韩视频一区二区三区在线播放| 高清av一区二区| 亚洲电影视频在线| 亚洲精品一区二区三区精华液| 久久久久久麻豆| 色丁香久综合在线久综合在线观看| 日韩激情一二三区| 国产精品美女久久久久av爽李琼| 在线看日本不卡| 国产在线精品一区二区| 中文字幕一区二区三中文字幕| 欧美巨大另类极品videosbest| 国产成人午夜精品5599| 亚洲一区国产视频| 国产亚洲一二三区| 欧美人体做爰大胆视频| 国产精品亚洲第一区在线暖暖韩国| 一个色综合网站| 国产视频一区在线观看| 欧美精品第1页| 99久久婷婷国产综合精品电影 | 亚洲三级电影网站| 欧美成人一区二区三区片免费| 97久久超碰精品国产| 久久不见久久见中文字幕免费| 自拍偷拍欧美精品| 久久美女艺术照精彩视频福利播放| 欧洲视频一区二区| 成人免费毛片aaaaa**| 日韩高清不卡在线| 亚洲精品日韩一| 日本一区二区高清| 欧美一级理论片| 91国产福利在线| 国产99久久久国产精品潘金| 日韩av网站在线观看| 国产精品不卡一区二区三区| 欧美电影精品一区二区| 欧美午夜精品久久久久久超碰| 成人18视频在线播放| 精品一区二区三区免费观看| 亚洲一线二线三线视频| 国产精品国产三级国产普通话蜜臀| 欧美大尺度电影在线| 欧美日韩国产高清一区二区| 91亚洲精品一区二区乱码| 国产精品亚洲成人| 久久丁香综合五月国产三级网站| 亚洲影院免费观看| 亚洲欧美日韩中文字幕一区二区三区 | 成人黄色777网| 国产米奇在线777精品观看| 蜜臀久久99精品久久久久久9 | 久久精品亚洲精品国产欧美kt∨| 7777精品伊人久久久大香线蕉完整版| 972aa.com艺术欧美| 国产成人一区在线| 国产一区在线观看麻豆| 美洲天堂一区二卡三卡四卡视频| 亚洲6080在线| 亚洲一区视频在线| 一区二区理论电影在线观看| 国产精品乱码人人做人人爱| 国产欧美日韩精品在线| 久久综合精品国产一区二区三区| 欧美一级黄色大片| 欧美一区二区播放| 91精品国产色综合久久不卡电影| 欧美日韩一区三区| 欧美日韩一卡二卡三卡| 欧美私人免费视频| 精品视频1区2区| 884aa四虎影成人精品一区| 欧美美女黄视频| 欧美一区二区三区四区久久| 欧美一区二区三区不卡| 日韩片之四级片| 日韩精品一区二区三区中文精品| 日韩免费成人网| 精品国产凹凸成av人网站| 精品理论电影在线观看 | 欧美高清激情brazzers| 欧美日高清视频| 亚洲一区二区三区激情| 亚洲自拍偷拍九九九| 亚洲精品成人悠悠色影视| 一区二区欧美在线观看| 亚洲成人av一区二区三区| 亚洲成人精品一区二区| 青娱乐精品视频| 久久er99精品| 国产999精品久久久久久 | 日韩成人免费电影| 日韩av电影免费观看高清完整版在线观看 | 久久久久久久网| 欧美激情一区二区三区全黄| 国产精品国产三级国产aⅴ入口 | 日本视频一区二区| 久草精品在线观看| 粉嫩一区二区三区在线看| 99久久er热在这里只有精品66| 在线欧美日韩国产| 91精品欧美综合在线观看最新| 精品久久久影院| 国产精品久久久久9999吃药| 亚洲午夜免费福利视频| 免费欧美日韩国产三级电影| 国产精品一二三在| 色婷婷久久综合| 91精品国产一区二区三区蜜臀| 久久久久久99久久久精品网站| 国产精品成人免费精品自在线观看| 亚洲高清不卡在线观看| 国产一区二区三区久久久| 不卡的看片网站| 欧美人伦禁忌dvd放荡欲情| 久久婷婷成人综合色|