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

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

?? ogrpolygon.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************
 * $Id: ogrpolygon.cpp 11427 2007-05-07 19:16:26Z warmerdam $
 *
 * Project:  OpenGIS Simple Features Reference Implementation
 * Purpose:  The OGRPolygon geometry class.
 * Author:   Frank Warmerdam, warmerdam@pobox.com
 *
 ******************************************************************************
 * Copyright (c) 1999, Frank Warmerdam
 *
 * 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.
 ****************************************************************************/

#include "ogr_geometry.h"
#include "ogr_p.h"
#include "ogr_geos.h"
#include "ogr_api.h"

CPL_CVSID("$Id: ogrpolygon.cpp 11427 2007-05-07 19:16:26Z warmerdam $");

/************************************************************************/
/*                             OGRPolygon()                             */
/************************************************************************/

/**
 * Create an empty polygon.
 */

OGRPolygon::OGRPolygon()

{
    nRingCount = 0;
    papoRings = NULL;
}

/************************************************************************/
/*                            ~OGRPolygon()                             */
/************************************************************************/

OGRPolygon::~OGRPolygon()

{
    empty();
}

/************************************************************************/
/*                               clone()                                */
/************************************************************************/

OGRGeometry *OGRPolygon::clone() const

{
    OGRPolygon  *poNewPolygon;

    poNewPolygon = new OGRPolygon;
    poNewPolygon->assignSpatialReference( getSpatialReference() );

    for( int i = 0; i < nRingCount; i++ )
    {
        poNewPolygon->addRing( papoRings[i] );
    }

    return poNewPolygon;
}

/************************************************************************/
/*                               empty()                                */
/************************************************************************/

void OGRPolygon::empty()

{
    if( papoRings != NULL )
    {
        for( int i = 0; i < nRingCount; i++ )
        {
            delete papoRings[i];
        }
        OGRFree( papoRings );
    }

    papoRings = NULL;
    nRingCount = 0;
}

/************************************************************************/
/*                          getGeometryType()                           */
/************************************************************************/

OGRwkbGeometryType OGRPolygon::getGeometryType() const

{
    if( getCoordinateDimension() == 3 )
        return wkbPolygon25D;
    else
        return wkbPolygon;
}

/************************************************************************/
/*                            getDimension()                            */
/************************************************************************/

int OGRPolygon::getDimension() const

{
    return 2;
}

/************************************************************************/
/*                            flattenTo2D()                             */
/************************************************************************/

void OGRPolygon::flattenTo2D()

{
    for( int iRing = 0; iRing < nRingCount; iRing++ )
        papoRings[iRing]->flattenTo2D();

    nCoordDimension = 2;
}

/************************************************************************/
/*                          getGeometryName()                           */
/************************************************************************/

const char * OGRPolygon::getGeometryName() const

{
    return "POLYGON";
}

/************************************************************************/
/*                          getExteriorRing()                           */
/************************************************************************/

/**
 * Fetch reference to external polygon ring.
 *
 * Note that the returned ring pointer is to an internal data object of
 * the OGRPolygon.  It should not be modified or deleted by the application,
 * and the pointer is only valid till the polygon is next modified.  Use
 * the OGRGeometry::clone() method to make a separate copy within the
 * application.
 *
 * Relates to the SFCOM IPolygon::get_ExteriorRing() method.
 *
 * @return pointer to external ring.  May be NULL if the OGRPolygon is empty.
 */

OGRLinearRing *OGRPolygon::getExteriorRing()

{
    if( nRingCount > 0 )
        return papoRings[0];
    else
        return NULL;
}

const OGRLinearRing *OGRPolygon::getExteriorRing() const

{
    if( nRingCount > 0 )
        return papoRings[0];
    else
        return NULL;
}

/************************************************************************/
/*                        getNumInteriorRings()                         */
/************************************************************************/

/**
 * Fetch the number of internal rings.
 *
 * Relates to the SFCOM IPolygon::get_NumInteriorRings() method.
 *
 * @return count of internal rings, zero or more.
 */


int OGRPolygon::getNumInteriorRings() const

{
    if( nRingCount > 0 )
        return nRingCount-1;
    else
        return 0;
}

/************************************************************************/
/*                          getInteriorRing()                           */
/************************************************************************/

/**
 * Fetch reference to indicated internal ring.
 *
 * Note that the returned ring pointer is to an internal data object of
 * the OGRPolygon.  It should not be modified or deleted by the application,
 * and the pointer is only valid till the polygon is next modified.  Use
 * the OGRGeometry::clone() method to make a separate copy within the
 * application.
 *
 * Relates to the SFCOM IPolygon::get_InternalRing() method.
 *
 * @param iRing internal ring index from 0 to getNumInternalRings() - 1.
 *
 * @return pointer to external ring.  May be NULL if the OGRPolygon is empty.
 */

OGRLinearRing *OGRPolygon::getInteriorRing( int iRing )

{
    if( iRing < 0 || iRing >= nRingCount-1 )
        return NULL;
    else
        return papoRings[iRing+1];
}

const OGRLinearRing *OGRPolygon::getInteriorRing( int iRing ) const

{
    if( iRing < 0 || iRing >= nRingCount-1 )
        return NULL;
    else
        return papoRings[iRing+1];
}

/************************************************************************/
/*                              addRing()                               */
/************************************************************************/

/**
 * Add a ring to a polygon.
 *
 * If the polygon has no external ring (it is empty) this will be used as
 * the external ring, otherwise it is used as an internal ring.  The passed
 * OGRLinearRing remains the responsibility of the caller (an internal copy
 * is made).
 *
 * This method has no SFCOM analog.
 *
 * @param poNewRing ring to be added to the polygon.
 */

void OGRPolygon::addRing( OGRLinearRing * poNewRing )

{
    papoRings = (OGRLinearRing **) OGRRealloc( papoRings,
                                               sizeof(void*) * (nRingCount+1));

    papoRings[nRingCount] = new OGRLinearRing( poNewRing );

    nRingCount++;

    if( poNewRing->getCoordinateDimension() == 3 )
        nCoordDimension = 3;
}

/************************************************************************/
/*                          addRingDirectly()                           */
/************************************************************************/

/**
 * Add a ring to a polygon.
 *
 * If the polygon has no external ring (it is empty) this will be used as
 * the external ring, otherwise it is used as an internal ring.  Ownership
 * of the passed ring is assumed by the OGRPolygon, but otherwise this
 * method operates the same as OGRPolygon::AddRing().
 *
 * This method has no SFCOM analog.
 *
 * @param poNewRing ring to be added to the polygon.
 */

void OGRPolygon::addRingDirectly( OGRLinearRing * poNewRing )

{
    papoRings = (OGRLinearRing **) OGRRealloc( papoRings,
                                               sizeof(void*) * (nRingCount+1));

    papoRings[nRingCount] = poNewRing;

    nRingCount++;


    if( poNewRing->getCoordinateDimension() == 3 )
        nCoordDimension = 3;
}

/************************************************************************/
/*                              WkbSize()                               */
/*                                                                      */
/*      Return the size of this object in well known binary             */
/*      representation including the byte order, and type information.  */
/************************************************************************/

int OGRPolygon::WkbSize() const

{
    int         nSize = 9;
    int         b3D = getCoordinateDimension() == 3;

    for( int i = 0; i < nRingCount; i++ )
    {
        nSize += papoRings[i]->_WkbSize( b3D );
    }

    return nSize;
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区高清播放| 欧美一区二区视频在线观看2022| 国产一区二区免费看| 青青草97国产精品免费观看| 婷婷开心激情综合| 午夜影院在线观看欧美| 亚洲一区欧美一区| 亚洲一区在线观看视频| 亚洲一级电影视频| 图片区小说区区亚洲影院| 视频一区二区三区中文字幕| 日本强好片久久久久久aaa| 日韩电影在线免费| 精品一区二区综合| 国产精品一区专区| 国产成人福利片| 91丝袜美腿高跟国产极品老师| 成人国产精品视频| 色婷婷精品久久二区二区蜜臀av| 日本韩国欧美三级| 欧美高清视频一二三区| 日韩欧美另类在线| 中日韩av电影| 一区二区免费在线| 日韩vs国产vs欧美| 国产美女娇喘av呻吟久久| 成人黄色小视频在线观看| av激情成人网| 欧美老年两性高潮| 国产午夜亚洲精品理论片色戒| 国产精品不卡一区| 亚洲成人综合在线| 国内精品写真在线观看| www.成人网.com| 在线播放亚洲一区| 国产拍欧美日韩视频二区| 一区二区激情视频| 六月丁香婷婷久久| 国产女人18毛片水真多成人如厕| 亚洲欧美怡红院| 日本午夜一区二区| 成人午夜av在线| 欧美巨大另类极品videosbest| 欧美sm极限捆绑bd| 亚洲精品国久久99热| 日本人妖一区二区| 91在线小视频| 日韩久久久精品| 亚洲色图视频免费播放| 久久se这里有精品| 91啪在线观看| 久久综合给合久久狠狠狠97色69| 亚洲伦理在线精品| 国内精品在线播放| 欧美片网站yy| 综合久久给合久久狠狠狠97色| 丝瓜av网站精品一区二区| 粉嫩av一区二区三区粉嫩| 欧美精品乱码久久久久久按摩 | 国产精品久久久久久久久图文区 | 精品国产麻豆免费人成网站| 国产精品久久福利| 丝袜美腿亚洲一区二区图片| 成人app网站| 日韩欧美视频一区| 亚洲午夜精品17c| 高清在线观看日韩| 精品欧美一区二区久久| 亚洲一区中文在线| 波多野洁衣一区| 久久精品视频在线看| 日韩av不卡在线观看| 色哟哟日韩精品| 国产精品视频观看| 国产综合色视频| 91精品在线观看入口| 99久久精品久久久久久清纯| 欧美日本一区二区| 亚洲色图欧美在线| 国产成人av网站| 欧美videossexotv100| 五月婷婷激情综合| 欧美优质美女网站| 国产精品萝li| 成人动漫在线一区| 国产日韩欧美精品电影三级在线 | 日韩欧美在线综合网| 亚洲第一激情av| 色综合久久综合网欧美综合网| 中文字幕欧美区| 国产精品亚洲午夜一区二区三区 | 天堂蜜桃一区二区三区| 色天使色偷偷av一区二区| 中文字幕五月欧美| 成人国产免费视频| 中文字幕日韩av资源站| 懂色av一区二区三区免费观看| 国产偷国产偷亚洲高清人白洁| 韩国理伦片一区二区三区在线播放 | 国产经典欧美精品| 精品久久久久久无| 韩国欧美国产一区| 久久女同精品一区二区| 精品系列免费在线观看| 精品捆绑美女sm三区| 精品在线观看免费| 欧美精品一区二区三区很污很色的 | 久久精品国产亚洲5555| 91精品国产一区二区三区| 日韩精品久久理论片| 在线播放中文一区| 美女视频黄 久久| 日韩欧美一区中文| 久久99精品久久久| 国产日韩欧美精品在线| 99热99精品| 亚洲综合丝袜美腿| 欧美欧美欧美欧美| 九九精品一区二区| 精品午夜一区二区三区在线观看| 久久综合久久久久88| 国产91色综合久久免费分享| 国产精品视频一二| 欧美视频精品在线观看| 日韩电影在线观看网站| 久久久亚洲精品石原莉奈 | 宅男噜噜噜66一区二区66| 日产精品久久久久久久性色| 337p粉嫩大胆色噜噜噜噜亚洲| 国产精品一级二级三级| 亚洲视频在线一区二区| 欧美色视频一区| 国产一区二区三区在线观看免费| 国产人伦精品一区二区| 色综合久久久久久久久久久| 性做久久久久久免费观看欧美| 欧美成人精品3d动漫h| 粉嫩av一区二区三区粉嫩| 亚洲乱码中文字幕| 日韩欧美国产精品| 成人h精品动漫一区二区三区| 一区二区三区日韩| 日韩一区二区不卡| 97久久超碰国产精品电影| 午夜在线电影亚洲一区| 国产区在线观看成人精品| 91久久奴性调教| 韩国v欧美v日本v亚洲v| 亚洲欧美偷拍三级| 日韩久久精品一区| 色婷婷久久99综合精品jk白丝| 捆绑调教一区二区三区| 国产婷婷色一区二区三区在线| 欧美色偷偷大香| 国产成人免费高清| 性欧美疯狂xxxxbbbb| 国产精品美女久久久久久2018 | 欧美激情一区二区三区不卡| 91搞黄在线观看| 国产精品18久久久久久久久久久久| 亚洲精选视频在线| 337p日本欧洲亚洲大胆精品| 在线观看日韩高清av| 国产高清精品在线| 奇米影视7777精品一区二区| 国产精品色眯眯| 欧美一二三四区在线| 91视视频在线观看入口直接观看www | 中文字幕一区二区三区色视频| 欧美一区二区三区四区五区| a4yy欧美一区二区三区| 韩国中文字幕2020精品| 午夜精品福利一区二区三区av| 国产精品美女久久久久aⅴ| 欧美成人精品福利| 欧美年轻男男videosbes| av一区二区不卡| 国产精品自拍三区| 美女视频黄频大全不卡视频在线播放| 一个色在线综合| 国产精品美女久久久久aⅴ国产馆| 日韩免费高清视频| 欧美精品色一区二区三区| 99re8在线精品视频免费播放| 国产一区视频导航| 蜜桃视频一区二区| 日本大胆欧美人术艺术动态| 亚洲精品久久嫩草网站秘色| 国产精品久99| 日本一区二区三区视频视频| 亚洲精品一线二线三线无人区| 91麻豆精品国产自产在线观看一区| 色婷婷久久久久swag精品| 不卡电影免费在线播放一区| 国产精品911| 国产一区二区成人久久免费影院| 美腿丝袜一区二区三区| 欧美96一区二区免费视频| 日韩精品欧美精品| 日本欧美在线观看|