亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
日本福利一区二区| 精品成人a区在线观看| 亚洲国产精品综合小说图片区| 99久久精品免费观看| 亚洲国产另类精品专区| 日韩午夜激情视频| 粉嫩av亚洲一区二区图片| 精品欧美一区二区久久| 日产国产欧美视频一区精品 | 蜜桃久久久久久| 久久久综合激的五月天| 97精品国产97久久久久久久久久久久| 亚洲麻豆国产自偷在线| 精品女同一区二区| 色域天天综合网| 岛国精品在线观看| 美女看a上一区| 亚洲女人****多毛耸耸8| 国产福利91精品一区| 日韩精品一级中文字幕精品视频免费观看| 日本乱人伦aⅴ精品| 国内外成人在线视频| 亚洲国产精品天堂| 亚洲精品国产第一综合99久久| 精品国内二区三区| 久久综合成人精品亚洲另类欧美 | 欧美日韩精品是欧美日韩精品| 国产成人精品影院| 成人免费视频国产在线观看| av电影在线观看完整版一区二区| 精品区一区二区| 日韩欧美成人午夜| 日韩你懂的在线观看| 在线观看日韩一区| 欧美性色综合网| 国产一区福利在线| 国产成人av在线影院| 国产成人午夜高潮毛片| 国产成人av电影在线播放| 国产盗摄女厕一区二区三区| 国产一区二区在线视频| 久草中文综合在线| 成人18精品视频| 处破女av一区二区| 国产一区二区毛片| 岛国一区二区三区| 成人91在线观看| 欧美精品一卡两卡| 日韩三级.com| 亚洲三级免费观看| 国产一区二区在线观看免费| 成人激情免费网站| 911国产精品| 亚洲国产精品av| 日韩欧美国产综合在线一区二区三区| 日本aⅴ亚洲精品中文乱码| 亚洲一区二区偷拍精品| 国产在线视频精品一区| 91蝌蚪porny成人天涯| 欧美大肚乱孕交hd孕妇| 亚洲人妖av一区二区| 国产乱码字幕精品高清av| 在线观看免费亚洲| 国产亚洲精久久久久久| 日本美女视频一区二区| 欧美性一级生活| 亚洲精品在线三区| 不卡一区在线观看| 偷偷要91色婷婷| 国产精品1区2区| 国产精品香蕉一区二区三区| 91精品国产91久久久久久最新毛片 | 狂野欧美性猛交blacked| 综合久久久久久| 欧美成人精品二区三区99精品| 91玉足脚交白嫩脚丫在线播放| 色婷婷久久久综合中文字幕 | 欧美伊人精品成人久久综合97 | 国产乱码一区二区三区| 奇米精品一区二区三区在线观看 | 99久久国产综合色|国产精品| 狠狠色丁香久久婷婷综合_中 | 欧美一区二区久久| 国产乱色国产精品免费视频| 欧美成人video| 欧美性高清videossexo| 成人精品免费看| 成人福利电影精品一区二区在线观看| 国产一区二区三区美女| 精品伊人久久久久7777人| 麻豆精品在线看| 国产乱子伦视频一区二区三区 | 欧美日韩成人一区二区| 91精品久久久久久蜜臀| 99久久久无码国产精品| 亚洲另类在线制服丝袜| 亚洲伊人色欲综合网| 亚洲国产精品欧美一二99| 热久久免费视频| 日韩福利电影在线观看| 国产资源在线一区| 91在线观看美女| 日韩三级.com| 国产精品美女久久久久久久| 久久久www成人免费无遮挡大片| 成人动漫中文字幕| 久久精品国产一区二区三区免费看| 亚洲欧美一区二区三区孕妇| 国产精品视频在线看| 久久精品亚洲麻豆av一区二区 | 最新欧美精品一区二区三区| 自拍视频在线观看一区二区| 国产亚洲精品久| 中文字幕第一页久久| 亚洲自拍偷拍图区| 久久99精品久久久久久| 色综合中文字幕| 欧美精品粉嫩高潮一区二区| 欧美mv和日韩mv的网站| 亚洲一区二区三区小说| 久久精品国产一区二区三区免费看| 精品毛片乱码1区2区3区| 欧美男女性生活在线直播观看| 精品免费日韩av| 日本视频在线一区| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美亚洲丝袜传媒另类| 久久精品一级爱片| 蜜桃久久精品一区二区| 欧美性大战xxxxx久久久| 亚洲视频一区二区在线观看| 福利电影一区二区三区| 久久这里只有精品首页| 五月婷婷另类国产| 欧美伊人久久久久久午夜久久久久| 久久久久久免费网| 99久久er热在这里只有精品15| 51久久夜色精品国产麻豆| 国产69精品久久久久777| 色94色欧美sute亚洲线路一久| 国产精品久久影院| 日本福利一区二区| 亚洲国产一区二区在线播放| 欧美日韩一二三| 一级特黄大欧美久久久| 在线精品视频一区二区三四| 亚洲男人的天堂网| 欧美肥妇bbw| 99精品视频一区二区三区| 亚洲成a人v欧美综合天堂下载 | 韩国av一区二区| 欧美精品一区二区精品网| 日韩高清电影一区| 国产精品乱码人人做人人爱 | 91精品蜜臀在线一区尤物| 日韩国产高清在线| 一区二区三区四区视频精品免费 | 亚洲欧洲综合另类在线| 51精品国自产在线| 在线国产亚洲欧美| 福利一区福利二区| 奇米精品一区二区三区在线观看| 国产亚洲精品资源在线26u| 欧美酷刑日本凌虐凌虐| 丁香婷婷综合网| 三级亚洲高清视频| 久久先锋影音av| 欧美日韩一区不卡| 一本色道a无线码一区v| 亚洲18女电影在线观看| 亚洲人成亚洲人成在线观看图片| 欧美一区二区三区播放老司机| 国产成人av电影| 国产在线播放一区二区三区| 午夜欧美一区二区三区在线播放| 欧美高清在线精品一区| 欧美一级高清片在线观看| 欧美日韩精品二区第二页| av一区二区不卡| 99免费精品视频| 国产乱理伦片在线观看夜一区| 视频一区在线播放| 狠狠狠色丁香婷婷综合久久五月| 一区二区三区精品视频| 国产精品二区一区二区aⅴ污介绍| 日韩亚洲国产中文字幕欧美| 91精品福利在线| 欧美日韩午夜在线视频| 一本大道久久a久久精二百| 成人av午夜影院| 国产乱子轮精品视频| 99精品桃花视频在线观看| 一本久道久久综合中文字幕| 91丝袜国产在线播放| 99久久久免费精品国产一区二区| 欧洲国内综合视频| 精品欧美黑人一区二区三区| 精品国产一二三区| 一区精品在线播放| 麻豆精品在线播放|