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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? mitab_feature.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
/**********************************************************************
 * $Id: mitab_feature.cpp,v 1.82 2008/02/22 20:20:44 dmorissette Exp $
 *
 * Name:     mitab_feature.cpp
 * Project:  MapInfo TAB Read/Write library
 * Language: C++
 * Purpose:  Implementation of the feature classes specific to MapInfo files.
 * 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_feature.cpp,v $
 * Revision 1.82  2008/02/22 20:20:44  dmorissette
 * Fixed the internal compressed coordinate range detection test to prevent
 * possible overflow of the compressed integer coordinate values leading
 * to some coord. errors in very rare cases while writing to TAB (bug 1854)
 *
 * Revision 1.81  2008/02/20 21:35:30  dmorissette
 * Added support for V800 COLLECTION of large objects (bug 1496)
 *
 * Revision 1.80  2008/02/05 22:22:48  dmorissette
 * Added support for TAB_GEOM_V800_MULTIPOINT (bug 1496)
 *
 * Revision 1.79  2008/02/01 19:36:31  dmorissette
 * Initial support for V800 REGION and MULTIPLINE (bug 1496)
 *
 * Revision 1.78  2008/01/29 20:46:32  dmorissette
 * Added support for v9 Time and DateTime fields (byg 1754)
 *
 * Revision 1.77  2007/12/11 04:21:54  dmorissette
 * Fixed leaks in ITABFeature???::Set???FromStyleString() (GDAL ticket 1696)
 *
 * Revision 1.76  2007/09/18 17:43:56  dmorissette
 * Fixed another index splitting issue: compr coordinates origin was not
 * stored in the TABFeature in ReadGeometry... (bug 1732)
 *
 * Revision 1.75  2007/09/14 19:29:24  dmorissette
 * Completed handling of bCoordBlockDataOnly arg to Read/WriteGeometry()
 * functions to avoid screwing up pen/brush ref counters (bug 1732)
 *
 * Revision 1.74  2007/09/14 18:30:19  dmorissette
 * Fixed the splitting of object blocks with the optimized spatial
 * index mode that was producing files with misaligned bytes that
 * confused MapInfo (bug 1732)
 *
 * Revision 1.73  2007/09/12 20:22:31  dmorissette
 * Added TABFeature::CreateFromMapInfoType()
 *
 * Revision 1.72  2007/06/12 14:17:16  dmorissette
 * Added TABFile::TwoPointLineAsPolyline() to allow writing two point lines
 * as polylines (bug 1735)
 *
 * Revision 1.71  2007/06/11 17:57:06  dmorissette
 * Removed stray calls to poMapFile->GetCurObjBlock()
 *
 * Revision 1.70  2007/06/11 14:52:30  dmorissette
 * Return a valid m_nCoordDatasize value for Collection objects to prevent
 * trashing of collection data during object splitting (bug 1728)
 *
 * Revision 1.69  2007/02/28 20:41:40  dmorissette
 * Added missing NULL pointer checks in SetPenFromStyleString(),
 * SetBrushFromStyleString() and SetSymbolFromStyleString() (bug 1670)
 *
 * Revision 1.68  2007/02/22 18:35:53  dmorissette
 * Fixed problem writing collections where MITAB was sometimes trying to
 * read past EOF in write mode (bug 1657).
 *
 * Revision 1.67  2006/11/28 18:49:07  dmorissette
 * Completed changes to split TABMAPObjectBlocks properly and produce an
 * optimal spatial index (bug 1585)
 *
 * Revision 1.66  2006/10/17 14:34:31  dmorissette
 * Fixed problem with null brush bg color (bug 1603)
 *
 * Revision 1.65  2006/07/25 13:22:58  dmorissette
 * Fixed initialization of MBR of TABCollection members (bug 1520)
 *
 * Revision 1.64  2006/06/29 19:49:35  dmorissette
 * Fixed problem writing PLINE MULTIPLE to TAB format introduced in
 * MITAB 1.5.0 (bug 1466).
 *
 * Revision 1.63  2006/02/08 05:02:57  dmorissette
 * Fixed crash when attempting to write TABPolyline object with an invalid
 * geometry (GDAL bug 1059)
 *
 * ...
 *
 * Revision 1.1  1999/07/12 04:18:24  daniel
 * Initial checkin
 *
 **********************************************************************/

#include "mitab.h"
#include "mitab_utils.h"
#include "mitab_geometry.h"

/*=====================================================================
 *                      class TABFeature
 *====================================================================*/


/**********************************************************************
 *                   TABFeature::TABFeature()
 *
 * Constructor.
 **********************************************************************/
TABFeature::TABFeature(OGRFeatureDefn *poDefnIn):
               OGRFeature(poDefnIn)
{
    m_nMapInfoType = TAB_GEOM_NONE;
    m_bDeletedFlag = FALSE;

    SetMBR(0.0, 0.0, 0.0, 0.0);
}

/**********************************************************************
 *                   TABFeature::~TABFeature()
 *
 * Destructor.
 **********************************************************************/
TABFeature::~TABFeature()
{
}


/**********************************************************************
 *                     TABFeature::CreateFromMapInfoType()
 *
 * Factory that creates a TABFeature of the right class for the specified
 * MapInfo Type
 *
 **********************************************************************/
TABFeature *TABFeature::CreateFromMapInfoType(int nMapInfoType,
                                              OGRFeatureDefn *poDefn)
{
    TABFeature *poFeature = NULL;

    /*-----------------------------------------------------------------
     * Create new feature object of the right type
     *----------------------------------------------------------------*/
    switch(nMapInfoType)
    {
      case TAB_GEOM_NONE:
        poFeature = new TABFeature(poDefn);
        break;
      case TAB_GEOM_SYMBOL_C:
      case TAB_GEOM_SYMBOL:
        poFeature = new TABPoint(poDefn);
        break;
      case TAB_GEOM_FONTSYMBOL_C:
      case TAB_GEOM_FONTSYMBOL:
        poFeature = new TABFontPoint(poDefn);
        break;
      case TAB_GEOM_CUSTOMSYMBOL_C:
      case TAB_GEOM_CUSTOMSYMBOL:
        poFeature = new TABCustomPoint(poDefn);
        break;
      case TAB_GEOM_LINE_C:
      case TAB_GEOM_LINE:
      case TAB_GEOM_PLINE_C:
      case TAB_GEOM_PLINE:
      case TAB_GEOM_MULTIPLINE_C:
      case TAB_GEOM_MULTIPLINE:
      case TAB_GEOM_V450_MULTIPLINE_C:
      case TAB_GEOM_V450_MULTIPLINE:
      case TAB_GEOM_V800_MULTIPLINE_C:
      case TAB_GEOM_V800_MULTIPLINE:
       poFeature = new TABPolyline(poDefn);
        break;
      case TAB_GEOM_ARC_C:
      case TAB_GEOM_ARC:
        poFeature = new TABArc(poDefn);
        break;

      case TAB_GEOM_REGION_C:
      case TAB_GEOM_REGION:
      case TAB_GEOM_V450_REGION_C:
      case TAB_GEOM_V450_REGION:
      case TAB_GEOM_V800_REGION_C:
      case TAB_GEOM_V800_REGION:
        poFeature = new TABRegion(poDefn);
        break;
      case TAB_GEOM_RECT_C:
      case TAB_GEOM_RECT:
      case TAB_GEOM_ROUNDRECT_C:
      case TAB_GEOM_ROUNDRECT:
        poFeature = new TABRectangle(poDefn);
        break;
      case TAB_GEOM_ELLIPSE_C:
      case TAB_GEOM_ELLIPSE:
        poFeature = new TABEllipse(poDefn);
        break;
      case TAB_GEOM_TEXT_C:
      case TAB_GEOM_TEXT:
        poFeature = new TABText(poDefn);
        break;
      case TAB_GEOM_MULTIPOINT_C:
      case TAB_GEOM_MULTIPOINT:
      case TAB_GEOM_V800_MULTIPOINT_C:
      case TAB_GEOM_V800_MULTIPOINT:
        poFeature = new TABMultiPoint(poDefn);
        break;
      case TAB_GEOM_COLLECTION_C:
      case TAB_GEOM_COLLECTION:
      case TAB_GEOM_V800_COLLECTION_C:
      case TAB_GEOM_V800_COLLECTION:
        poFeature = new TABCollection(poDefn);  
        break;
      default:
        /*-------------------------------------------------------------
         * Unsupported feature type... we still return a valid feature
         * with NONE geometry after producing a Warning.
         * Callers can trap that case by checking CPLGetLastErrorNo() 
         * against TAB_WarningFeatureTypeNotSupported
         *------------------------------------------------------------*/
//        poFeature = new TABDebugFeature(poDefn);
        poFeature = new TABFeature(poDefn);

        CPLError(CE_Warning, TAB_WarningFeatureTypeNotSupported,
                 "Unsupported object type %d (0x%2.2x).  Feature will be "
                 "returned with NONE geometry.",
                 nMapInfoType, nMapInfoType);
    }

    return poFeature;
}


/**********************************************************************
 *                     TABFeature::CopyTABFeatureBase()
 *
 * Used by CloneTABFeature() to copy the basic (fields, geometry, etc.)
 * TABFeature members.
 *
 * The newly created feature is owned by the caller, and will have it's own
 * reference to the OGRFeatureDefn.
 *
 * It is possible to create the clone with a different OGRFeatureDefn,
 * in this case, the fields won't be copied of course.
 *
 **********************************************************************/
void TABFeature::CopyTABFeatureBase(TABFeature *poDestFeature)
{
    /*-----------------------------------------------------------------
     * Copy fields only if OGRFeatureDefn is the same
     *----------------------------------------------------------------*/
    OGRFeatureDefn *poThisDefnRef = GetDefnRef();

    if (poThisDefnRef == poDestFeature->GetDefnRef())
    {
        for( int i = 0; i < poThisDefnRef->GetFieldCount(); i++ )
        {
            poDestFeature->SetField( i, GetRawFieldRef( i ) );
        }
    }

    /*-----------------------------------------------------------------
     * Copy the geometry
     *----------------------------------------------------------------*/
    poDestFeature->SetGeometry( GetGeometryRef() );

    double dXMin, dYMin, dXMax, dYMax;
    GetMBR(dXMin, dYMin, dXMax, dYMax);
    poDestFeature->SetMBR(dXMin, dYMin, dXMax, dYMax);

    GInt32 nXMin, nYMin, nXMax, nYMax;
    GetIntMBR(nXMin, nYMin, nXMax, nYMax);
    poDestFeature->SetIntMBR(nXMin, nYMin, nXMax, nYMax);

    // m_nMapInfoType is not carried but it is not required anyways.
    // it will default to TAB_GEOM_NONE
}


/**********************************************************************
 *                     TABFeature::CloneTABFeature()
 *
 * Duplicate feature, including stuff specific to each TABFeature type.
 *
 * The newly created feature is owned by the caller, and will have it's own
 * reference to the OGRFeatureDefn.
 *
 * It is possible to create the clone with a different OGRFeatureDefn,
 * in this case, the fields won't be copied of course.
 *
 * This method calls the generic TABFeature::CopyTABFeatureBase() and 
 * then copies any members specific to its own type.
 **********************************************************************/
TABFeature *TABFeature::CloneTABFeature(OGRFeatureDefn *poNewDefn/*=NULL*/)
{
    /*-----------------------------------------------------------------
     * Alloc new feature and copy the base stuff
     *----------------------------------------------------------------*/
    TABFeature *poNew = new TABFeature(poNewDefn ? poNewDefn : GetDefnRef());

    CopyTABFeatureBase(poNew);

    /*-----------------------------------------------------------------
     * And members specific to this class
     *----------------------------------------------------------------*/
    // Nothing to do for this class

    return poNew;
}

/**********************************************************************
 *                   TABFeature::SetMBR()
 *
 * Set the values for the MBR corners for this feature.
 **********************************************************************/
void TABFeature::SetMBR(double dXMin, double dYMin, 
                        double dXMax, double dYMax)
{
    m_dXMin = MIN(dXMin, dXMax);
    m_dYMin = MIN(dYMin, dYMax);
    m_dXMax = MAX(dXMin, dXMax);
    m_dYMax = MAX(dYMin, dYMax);
}

/**********************************************************************
 *                   TABFeature::GetMBR()

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
青青草成人在线观看| 欧美三级一区二区| 国产精品影视在线| 毛片av一区二区三区| 日韩成人一区二区| 青青草一区二区三区| 丝袜美腿高跟呻吟高潮一区| 一区二区欧美国产| 天天综合网天天综合色| 国产一区二区三区电影在线观看 | 欧美韩国一区二区| 亚洲欧美一区二区三区极速播放 | 国产成人a级片| 色婷婷激情久久| 91精品久久久久久久久99蜜臂 | 一区二区三国产精华液| 日韩不卡免费视频| 成人午夜av电影| 欧美日韩和欧美的一区二区| 日韩一级成人av| 国产精品成人一区二区艾草| 亚洲午夜精品在线| 国产精一区二区三区| 色婷婷久久久综合中文字幕| 日韩视频一区二区三区在线播放 | 麻豆国产精品官网| 91麻豆精东视频| 国产三级久久久| 亚洲最新视频在线观看| 亚洲美腿欧美偷拍| 国产精品18久久久久久久久久久久| 欧美亚洲一区三区| 中文字幕免费在线观看视频一区| 亚洲一区影音先锋| 91福利在线免费观看| 国产精品全国免费观看高清| 久久精品噜噜噜成人av农村| 色婷婷综合久久久| 一区二区三区在线不卡| av在线这里只有精品| 欧美国产亚洲另类动漫| 精品一区二区日韩| 精品区一区二区| 国产91在线观看| 国产精品你懂的在线欣赏| 国产一区不卡在线| 国产精品久久久久久户外露出 | 久久美女高清视频| 国产综合成人久久大片91| www国产精品av| 国产成人综合在线播放| 久久精品亚洲精品国产欧美kt∨| 日本中文字幕一区| 日韩精品一区二区三区在线 | 精品视频免费看| 亚洲mv在线观看| 久久女同性恋中文字幕| 国产酒店精品激情| www久久久久| 色综合 综合色| 久久精品72免费观看| 国产精品国产三级国产aⅴ无密码| 成人网男人的天堂| 五月婷婷综合网| 国产欧美日韩一区二区三区在线观看| 懂色av一区二区在线播放| 午夜亚洲国产au精品一区二区| 在线不卡欧美精品一区二区三区| 国产精品一区二区在线播放| av亚洲精华国产精华| 亚洲乱码国产乱码精品精可以看| 欧美视频一二三区| 不卡视频一二三四| 麻豆免费精品视频| 一区二区三区不卡在线观看| 欧美激情一区不卡| 国产日产亚洲精品系列| 欧美亚洲国产一区在线观看网站| 久久国产欧美日韩精品| 一区二区三区免费看视频| 亚洲国产激情av| 精品国产亚洲一区二区三区在线观看| gogo大胆日本视频一区| 国产成人鲁色资源国产91色综| 亚洲国产日韩一级| 性做久久久久久久久| 一片黄亚洲嫩模| 亚洲综合自拍偷拍| **网站欧美大片在线观看| 国产亚洲综合色| 国产欧美一区二区精品久导航| 91精品国产色综合久久不卡电影 | 国产午夜精品一区二区三区四区| 日韩一区二区高清| 欧美成人精品3d动漫h| 国产成人免费视频网站| 激情综合色综合久久| 国产传媒一区在线| 91女厕偷拍女厕偷拍高清| 欧美三级资源在线| 欧美不卡激情三级在线观看| 亚洲欧洲成人精品av97| 日本一区二区免费在线| 国产精品电影院| 亚洲大型综合色站| 91麻豆精东视频| 在线播放91灌醉迷j高跟美女 | 午夜精品久久久久久久蜜桃app| 亚洲综合色婷婷| 麻豆成人91精品二区三区| 9久草视频在线视频精品| 欧美日韩国产影片| 国产精品―色哟哟| 蜜乳av一区二区| 色噜噜久久综合| 久久久不卡网国产精品二区| 三级在线观看一区二区| 日韩高清国产一区在线| 国产美女久久久久| 制服.丝袜.亚洲.另类.中文| 国产亚洲精品bt天堂精选| 久草在线在线精品观看| 久久久久88色偷偷免费| 一本大道久久a久久精品综合| 亚洲一区二区综合| 中文字幕欧美国产| 精品第一国产综合精品aⅴ| 国产成人久久精品77777最新版本| 中文字幕欧美一| 日韩精品专区在线影院观看| 成人免费观看视频| 精品一区二区久久久| 精品精品欲导航| 国产高清久久久久| 亚洲成人激情av| 国产欧美视频在线观看| 国产精品一区二区黑丝| 一片黄亚洲嫩模| 中文字幕一区二区三中文字幕| 日韩午夜在线影院| 欧美伊人久久久久久久久影院| 久久99在线观看| 天天色图综合网| 亚洲成人精品一区二区| 亚洲欧美一区二区三区国产精品| xnxx国产精品| 精品久久人人做人人爱| 日韩一区二区三区精品视频| 2022国产精品视频| 欧美日韩国产精品成人| 欧美午夜一区二区三区| 国产激情视频一区二区在线观看 | 91在线丨porny丨国产| 国产一区在线看| 国产伦精品一区二区三区免费| 美洲天堂一区二卡三卡四卡视频| 亚洲va欧美va国产va天堂影院| 亚洲与欧洲av电影| 日韩av在线发布| 精品一区二区三区蜜桃| 国产精品99久久久久久宅男| 激情综合色综合久久| 成人午夜伦理影院| 色婷婷久久99综合精品jk白丝| 日本道色综合久久| 911精品产国品一二三产区| 精品日韩在线一区| 国产精品国产三级国产aⅴ中文| 中文字幕一区二区三| 亚洲高清三级视频| 国产精品中文字幕欧美| 色香蕉久久蜜桃| 欧美一卡二卡在线观看| 成人黄色综合网站| 99精品视频中文字幕| 欧美乱妇23p| 国产日韩精品一区| 亚洲国产精品影院| 懂色av一区二区三区免费看| 色婷婷久久久综合中文字幕 | 亚洲一区二区三区视频在线播放| 国产精品午夜免费| 美女视频黄 久久| 日韩欧美一级特黄在线播放| 国产亚洲精品aa| 麻豆精品国产传媒mv男同| 91麻豆精东视频| 国产精品电影院| 国产乱码精品一区二区三区av | hitomi一区二区三区精品| 日韩欧美成人午夜| 亚洲高清三级视频| 91在线高清观看| 亚洲欧洲成人精品av97| 国产剧情在线观看一区二区| 欧美一区二区三区小说| 亚洲最新视频在线观看| 欧美在线小视频| 伊人色综合久久天天人手人婷| 成人av在线资源网站|