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

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

?? mitab_mapfile.cpp

?? 支持各種柵格圖像和矢量圖像讀取的庫
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/********************************************************************** * $Id: mitab_mapfile.cpp,v 1.32 2005/10/06 19:15:31 dmorissette Exp $ * * Name:     mitab_mapfile.cpp * Project:  MapInfo TAB Read/Write library * Language: C++ * Purpose:  Implementation of the TABMAPFile class used to handle *           reading/writing of the .MAP files at the MapInfo object level * Author:   Daniel Morissette, dmorissette@dmsolutions.ca * ********************************************************************** * Copyright (c) 1999-2002, 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: mitab_mapfile.cpp,v $ * Revision 1.32  2005/10/06 19:15:31  dmorissette * Collections: added support for reading/writing pen/brush/symbol ids and * for writing collection objects to .TAB/.MAP (bug 1126) * * Revision 1.31  2004/09/22 13:07:58  fwarmerdam * fixed return value in LoadNextMatchingObjectBlock() per rso bug 615 * * Revision 1.30  2004/06/30 20:29:04  dmorissette * Fixed refs to old address danmo@videotron.ca * * Revision 1.29  2003/08/12 23:17:21  dmorissette * Added reading of v500+ coordsys affine params (Anthony D. - Encom) * * Revision 1.28  2002/08/27 17:18:43  warmerda * improved CPL error testing * * Revision 1.27  2002/07/30 13:54:12  julien * TABMAPFile::GetFeatureId() now return -1 when there's no geometry. (bug 169) * * Revision 1.26  2002/04/25 16:05:24  julien * Disabled the overflow warning in SetCoordFilter() by adding bIgnoreOverflow * variable in Coordsys2Int of the TABMAPFile class and TABMAPHeaderBlock class * * Revision 1.25  2002/03/26 19:27:43  daniel * Got rid of tabs in source * * Revision 1.24  2002/03/26 01:48:40  daniel * Added Multipoint object type (V650) * * Revision 1.23  2002/02/20 13:53:40  daniel * Prevent an infinite loop of calls to LoadNextMatchingObjectBlock() in * GetNextFeatureId() if no objects found in spatial index. * * Revision 1.22  2001/11/19 15:04:41  daniel * Prevent writing of coordinates outside of the +/-1e9 integer bounds. * * Revision 1.21  2001/11/17 21:54:06  daniel * Made several changes in order to support writing objects in 16 bits  * coordinate format. New TABMAPObjHdr-derived classes are used to hold  * object info in mem until block is full. * * Revision 1.20  2001/09/18 20:33:52  warmerda * fixed case of spatial search on file with just one object block * * Revision 1.19  2001/09/14 03:23:55  warmerda * Substantial upgrade to support spatial queries using spatial indexes * * Revision 1.18  2001/03/15 03:57:51  daniel * Added implementation for new OGRLayer::GetExtent(), returning data MBR. * * Revision 1.17  2000/11/23 21:11:07  daniel * OOpps... VC++ didn't like the way TABPenDef, etc. were initialized * * Revision 1.16  2000/11/23 20:47:46  daniel * Use MI defaults for Pen, Brush, Font, Symbol instead of all zeros * * Revision 1.15  2000/11/22 04:03:10  daniel * Added warning when objects written outside of the +/-1e9 int. coord. range * * Revision 1.14  2000/11/15 04:13:49  daniel * Fixed writing of TABMAPToolBlock to allocate a new block when full * * Revision 1.13  2000/05/19 06:44:55  daniel * Modified generation of spatial index to split index nodes and produce a * more balanced tree. * * Revision 1.12  2000/03/13 05:58:01  daniel * Create 1024 bytes V500 .MAP header + limit m_nMaxCoordBufSize for V450 obj. * * Revision 1.11  2000/02/28 17:00:00  daniel * Added V450 object types * * Revision 1.10  2000/01/15 22:30:44  daniel * Switch to MIT/X-Consortium OpenSource license * * Revision 1.9  1999/12/19 17:37:52  daniel * Fixed memory leaks * * Revision 1.8  1999/11/14 04:43:31  daniel * Support dataset with no .MAP/.ID files * * Revision 1.7  1999/10/19 22:57:17  daniel * Create m_poCurObjBlock only when needed to avoid empty blocks in files * and problems with MBR in header block of files with only "NONE" geometries * * Revision 1.6  1999/10/06 13:17:46  daniel * Update m_nMaxCoordBufSize in header block * * Revision 1.5  1999/10/01 03:52:22  daniel * Avoid producing an unused block in the file when closing it. * * Revision 1.4  1999/09/26 14:59:36  daniel * Implemented write support * * Revision 1.3  1999/09/20 18:42:42  daniel * Use binary access to open file. * * Revision 1.2  1999/09/16 02:39:16  daniel * Completed read support for most feature types * * Revision 1.1  1999/07/12 04:18:24  daniel * Initial checkin * **********************************************************************/#include "mitab.h"/*===================================================================== *                      class TABMAPFile *====================================================================*//********************************************************************** *                   TABMAPFile::TABMAPFile() * * Constructor. **********************************************************************/TABMAPFile::TABMAPFile(){    m_nMinTABVersion = 300;    m_fp = NULL;    m_pszFname = NULL;    m_poHeader = NULL;    m_poSpIndex = NULL;    m_poSpIndexLeaf = NULL;    m_poCurObjBlock = NULL;    m_nCurObjPtr = -1;    m_nCurObjType = -1;    m_nCurObjId = -1;    m_poCurCoordBlock = NULL;    m_poToolDefTable = NULL;}/********************************************************************** *                   TABMAPFile::~TABMAPFile() * * Destructor. **********************************************************************/TABMAPFile::~TABMAPFile(){    Close();}/********************************************************************** *                   TABMAPFile::Open() * * Open a .MAP file, and initialize the structures to be ready to read * objects from it. * * Since .MAP and .ID files are optional, you can set bNoErrorMsg=TRUE to * disable the error message and receive an return value of 1 if file  * cannot be opened.   * In this case, only the methods MoveToObjId() and GetCurObjType() can  * be used.  They will behave as if the .ID file contained only null * references, so all object will look like they have NONE geometries. * * Returns 0 on success, -1 on error. **********************************************************************/int TABMAPFile::Open(const char *pszFname, const char *pszAccess,                     GBool bNoErrorMsg /* = FALSE */){    FILE        *fp=NULL;    TABRawBinBlock *poBlock=NULL;    if (m_fp)    {        CPLError(CE_Failure, CPLE_FileIO,                 "Open() failed: object already contains an open file");        return -1;    }    m_nMinTABVersion = 300;    m_fp = NULL;    m_poHeader = NULL;    m_poIdIndex = NULL;    m_poSpIndex = NULL;    m_poToolDefTable = NULL;    /*-----------------------------------------------------------------     * Validate access mode and make sure we use binary access.     *----------------------------------------------------------------*/    if (EQUALN(pszAccess, "r", 1))    {        m_eAccessMode = TABRead;        pszAccess = "rb";    }    else if (EQUALN(pszAccess, "w", 1))    {        m_eAccessMode = TABWrite;        pszAccess = "wb+";    }    else    {        CPLError(CE_Failure, CPLE_FileIO,                 "Open() failed: access mode \"%s\" not supported", pszAccess);        return -1;    }    /*-----------------------------------------------------------------     * Open file     *----------------------------------------------------------------*/    fp = VSIFOpen(pszFname, pszAccess);    m_oBlockManager.Reset();    if (fp != NULL && m_eAccessMode == TABRead)    {        /*-----------------------------------------------------------------         * Read access: try to read header block         * First try with a 512 bytes block to check the .map version.         * If it's version 500 or more then read again a 1024 bytes block         *----------------------------------------------------------------*/        poBlock = TABCreateMAPBlockFromFile(fp, 0, 512);        if (poBlock && poBlock->GetBlockClass() == TABMAP_HEADER_BLOCK &&            ((TABMAPHeaderBlock*)poBlock)->m_nMAPVersionNumber >= 500)        {            // Version 500 or higher.  Read 1024 bytes block instead of 512            delete poBlock;            poBlock = TABCreateMAPBlockFromFile(fp, 0, 1024);        }        if (poBlock==NULL || poBlock->GetBlockClass() != TABMAP_HEADER_BLOCK)        {            if (poBlock)                delete poBlock;            poBlock = NULL;            VSIFClose(fp);            CPLError(CE_Failure, CPLE_FileIO,                "Open() failed: %s does not appear to be a valid .MAP file",                     pszFname);            return -1;        }    }    else if (fp != NULL && m_eAccessMode == TABWrite)    {        /*-----------------------------------------------------------------         * Write access: create a new header block         * .MAP files of Version 500 and up appear to have a 1024 bytes         * header.  The last 512 bytes are usually all zeros.         *----------------------------------------------------------------*/        poBlock = new TABMAPHeaderBlock(m_eAccessMode);        poBlock->InitNewBlock(fp, 1024, m_oBlockManager.AllocNewBlock() );        // Alloc a second 512 bytes of space since oBlockManager deals         // with 512 bytes blocks.        m_oBlockManager.AllocNewBlock();     }    else if (bNoErrorMsg)    {        /*-----------------------------------------------------------------         * .MAP does not exist... produce no error message, but set         * the class members so that MoveToObjId() and GetCurObjType()         * can be used to return only NONE geometries.         *----------------------------------------------------------------*/        m_fp = NULL;        m_nCurObjType = TAB_GEOM_NONE;        /* Create a false header block that will return default         * values for projection and coordsys conversion stuff...         */        m_poHeader = new TABMAPHeaderBlock(m_eAccessMode);        m_poHeader->InitNewBlock(NULL, 512, 0 );        return 1;    }    else    {        CPLError(CE_Failure, CPLE_FileIO,                 "Open() failed for %s", pszFname);        return -1;    }    /*-----------------------------------------------------------------     * File appears to be valid... set the various class members     *----------------------------------------------------------------*/    m_fp = fp;    m_poHeader = (TABMAPHeaderBlock*)poBlock;    m_pszFname = CPLStrdup(pszFname);    /*-----------------------------------------------------------------     * Create a TABMAPObjectBlock, in READ mode only.     *     * In WRITE mode, the object block will be created only when needed.     * We do not create the object block in the open() call because     * files that contained only "NONE" geometries ended up with empty     * object and spatial index blocks.     *----------------------------------------------------------------*/    if (m_eAccessMode == TABRead)    {        m_poCurObjBlock = new TABMAPObjectBlock(m_eAccessMode);        m_poCurObjBlock->InitNewBlock(m_fp, 512);    }    else    {        m_poCurObjBlock = NULL;    }    /*-----------------------------------------------------------------     * Open associated .ID (object id index) file     *----------------------------------------------------------------*/    m_poIdIndex = new TABIDFile;    if (m_poIdIndex->Open(pszFname, pszAccess) != 0)    {        // Failed... an error has already been reported        Close();        return -1;    }    /*-----------------------------------------------------------------     * Default Coord filter is the MBR of the whole file     * This is currently unused but could eventually be used to handle     * spatial filters more efficiently.     *----------------------------------------------------------------*/    if (m_eAccessMode == TABRead)    {        ResetCoordFilter();    }    /*-----------------------------------------------------------------     * We could scan a file through its quad tree index... but we don't!     *     * In read mode, we just ignore the spatial index.     *     * In write mode the index is created and maintained as new object     * blocks are added inside CommitObjBlock().     *----------------------------------------------------------------*/    m_poSpIndex = NULL;    /*-----------------------------------------------------------------

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人性生交大片免费看中文网站| 亚洲综合成人在线| 国产精品99久久久| 久久久国产精品麻豆| 国产在线播放一区二区三区| 精品国产污网站| 国产精品69毛片高清亚洲| 久久久久国产精品免费免费搜索| 豆国产96在线|亚洲| 中文字幕av一区二区三区高| 91视频观看视频| 香蕉久久夜色精品国产使用方法| 日韩丝袜情趣美女图片| 精品一区二区三区视频| 国产精品欧美极品| 91传媒视频在线播放| 男男视频亚洲欧美| 精品国产乱码久久| 91丨九色丨蝌蚪富婆spa| 亚洲国产成人av网| 综合久久一区二区三区| 91丨九色丨黑人外教| 亚洲狠狠爱一区二区三区| 日韩精品在线一区二区| caoporen国产精品视频| 国产成人欧美日韩在线电影| 最新国产の精品合集bt伙计| 欧美一区二区精美| 成人综合婷婷国产精品久久蜜臀| 亚洲午夜国产一区99re久久| 久久久久久毛片| 在线观看免费亚洲| 国产一区二区三区电影在线观看| 亚洲欧美日韩久久| 日韩精品在线网站| 欧美在线视频不卡| 国产精品亚洲午夜一区二区三区 | zzijzzij亚洲日本少妇熟睡| 夜夜爽夜夜爽精品视频| 久久久久综合网| 欧美体内she精视频| 国产麻豆日韩欧美久久| 亚洲国产精品一区二区www| 久久一留热品黄| 欧美日韩精品一区二区三区蜜桃| 国产成a人亚洲精品| 美女视频免费一区| 亚洲一区在线观看免费| 亚洲国产高清在线| 日韩一区二区三区av| 欧美少妇bbb| www.视频一区| 国产精品中文欧美| 水野朝阳av一区二区三区| 18成人在线视频| 欧美极品少妇xxxxⅹ高跟鞋| 欧美精品丝袜中出| 欧美性猛交xxxxxx富婆| 国产成人一区在线| 激情综合色综合久久| 午夜国产精品影院在线观看| 日韩理论片网站| 中文字幕第一区二区| 国产日韩欧美激情| 精品剧情在线观看| 日韩欧美激情一区| 5566中文字幕一区二区电影| 色综合色狠狠综合色| 777亚洲妇女| 99久久99久久久精品齐齐| 成人久久视频在线观看| 国产成人日日夜夜| 国产成人高清视频| 国产成人精品亚洲777人妖| 激情欧美日韩一区二区| 麻豆传媒一区二区三区| 日本不卡一区二区| 日本不卡免费在线视频| 青青草一区二区三区| 日本一不卡视频| 久久精品国产秦先生| 九九**精品视频免费播放| 韩国欧美国产1区| 国内一区二区视频| 国产一区二区在线看| 国产剧情一区在线| 成人综合在线网站| 成人aa视频在线观看| av在线不卡免费看| 99re66热这里只有精品3直播| 91视频在线观看免费| 91福利在线看| 欧美日韩国产一级二级| 日韩欧美一区在线观看| 久久在线免费观看| 中文久久乱码一区二区| 亚洲欧洲精品天堂一级| 亚洲一区二区av在线| 日本一不卡视频| 国产黄色91视频| 丁香婷婷综合色啪| 91久久精品午夜一区二区| 777欧美精品| 精品国产伦一区二区三区观看方式 | 久久久亚洲综合| 亚洲国产高清aⅴ视频| 一级中文字幕一区二区| 久久精品久久99精品久久| 粉嫩aⅴ一区二区三区四区五区| 色婷婷久久久综合中文字幕| 欧美综合久久久| 日韩午夜电影在线观看| 国产视频亚洲色图| 一区二区三区四区在线播放| 视频一区二区三区在线| 国产黄色精品视频| 欧美日韩国产乱码电影| 久久久久久久国产精品影院| 夜夜夜精品看看| 国产精品中文字幕欧美| 欧美日韩高清不卡| 国产无一区二区| 亚洲123区在线观看| 国产精品一区在线观看乱码| 欧美中文字幕一区二区三区| 久久久精品欧美丰满| 一区二区成人在线视频| 国内精品伊人久久久久影院对白| 日本久久精品电影| 国产亚洲1区2区3区| 亚洲大片免费看| 99久久久精品免费观看国产蜜| 日韩一区二区麻豆国产| 亚洲色图制服丝袜| 国产精品一二二区| 91精品欧美福利在线观看| 最近中文字幕一区二区三区| 国产精品中文字幕日韩精品| 5月丁香婷婷综合| 亚洲激情自拍视频| 国产91在线|亚洲| 日韩欧美一二区| 五月综合激情网| 在线免费观看视频一区| 久久精品一区二区三区不卡| 日本一区中文字幕| 欧美日韩www| 亚洲一区二区中文在线| 91视频免费看| 亚洲欧美激情视频在线观看一区二区三区| 国产毛片精品国产一区二区三区| 91精品国产综合久久婷婷香蕉 | 综合婷婷亚洲小说| 国产激情视频一区二区三区欧美| 欧美一级日韩不卡播放免费| 亚洲一区二区三区四区中文字幕| 99re热这里只有精品视频| 国产视频在线观看一区二区三区| 美国十次了思思久久精品导航| 欧美视频一区二区三区四区| 一区二区高清视频在线观看| 色综合中文综合网| 亚洲高清视频中文字幕| 高清在线成人网| 久久综合给合久久狠狠狠97色69| 日日骚欧美日韩| 欧美日韩aaaaaa| 视频一区欧美日韩| 69堂精品视频| 日本美女一区二区三区视频| 欧美一区二区三区四区五区 | 91久久精品一区二区三| 一区二区在线观看免费视频播放| 99re免费视频精品全部| 亚洲乱码日产精品bd| 色噜噜狠狠成人网p站| 亚洲影视资源网| 欧美日韩另类一区| 日韩国产在线一| 精品国产3级a| 国产成人在线影院| 1区2区3区国产精品| 在线亚洲一区观看| 欧美国产日本韩| 99免费精品在线| 亚洲精品第1页| 欧美手机在线视频| 免费不卡在线视频| 久久久av毛片精品| 成人精品在线视频观看| 亚洲手机成人高清视频| 欧亚洲嫩模精品一区三区| 午夜精品视频在线观看| 日韩一级完整毛片| 国产精品影视网| 亚洲美女淫视频| 欧美一区二区三区啪啪| 国产精品一区二区三区99| 18成人在线观看| 欧美一级夜夜爽|