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

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

?? ogrlinestring.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
 *
 * The vertex count of the line string is increased by one, and assigned from
 * the passed location value.
 *
 * There is no SFCOM analog to this method.
 *
 * @param poPoint the point to assign to the new vertex.
 */

void OGRLineString::addPoint( OGRPoint * poPoint )

{
    setPoint( nPointCount, poPoint->getX(), poPoint->getY(), poPoint->getZ() );
}

/************************************************************************/
/*                              addPoint()                              */
/************************************************************************/

/**
 * Add a point to a line string.
 *
 * The vertex count of the line string is increased by one, and assigned from
 * the passed location value.
 *
 * There is no SFCOM analog to this method.
 *
 * @param x the X coordinate to assign to the new point.
 * @param y the Y coordinate to assign to the new point.
 * @param z the Z coordinate to assign to the new point (defaults to zero).
 */

void OGRLineString::addPoint( double x, double y, double z )

{
    setPoint( nPointCount, x, y, z );
}

void OGRLineString::addPoint( double x, double y )

{
    setPoint( nPointCount, x, y );
}

/************************************************************************/
/*                             setPoints()                              */
/************************************************************************/

/**
 * Assign all points in a line string.
 *
 * This method clears any existing points assigned to this line string,
 * and assigns a whole new set.  It is the most efficient way of assigning
 * the value of a line string.
 *
 * There is no SFCOM analog to this method.
 *
 * @param nPointsIn number of points being passed in paoPointsIn
 * @param paoPointsIn list of points being assigned.
 * @param padfZ the Z values that go with the points (optional, may be NULL).
 */

void OGRLineString::setPoints( int nPointsIn, OGRRawPoint * paoPointsIn,
                               double * padfZ )

{
    setNumPoints( nPointsIn );
    memcpy( paoPoints, paoPointsIn, sizeof(OGRRawPoint) * nPointsIn);

/* -------------------------------------------------------------------- */
/*      Check 2D/3D.                                                    */
/* -------------------------------------------------------------------- */
    if( padfZ == NULL && getCoordinateDimension() > 2 )
    {
        Make2D();
    }
    else if( padfZ )
    {
        Make3D();
        memcpy( this->padfZ, padfZ, sizeof(double) * nPointsIn );
    }
}

/************************************************************************/
/*                             setPoints()                              */
/************************************************************************/

/**
 * Assign all points in a line string.
 *
 * This method clear any existing points assigned to this line string,
 * and assigns a whole new set.
 *
 * There is no SFCOM analog to this method.
 *
 * @param nPointsIn number of points being passed in padfX and padfY.
 * @param padfX list of X coordinates of points being assigned.
 * @param padfY list of Y coordinates of points being assigned.
 * @param padfZ list of Z coordinates of points being assigned (defaults to
 * NULL for 2D objects).
 */

void OGRLineString::setPoints( int nPointsIn, double * padfX, double * padfY,
                               double * padfZ )

{
    int         i;

/* -------------------------------------------------------------------- */
/*      Check 2D/3D.                                                    */
/* -------------------------------------------------------------------- */
    if( padfZ == NULL )
        Make2D();
    else
        Make3D();
    
/* -------------------------------------------------------------------- */
/*      Assign values.                                                  */
/* -------------------------------------------------------------------- */
    setNumPoints( nPointsIn );

    for( i = 0; i < nPointsIn; i++ )
    {
        paoPoints[i].x = padfX[i];
        paoPoints[i].y = padfY[i];
    }

    if( this->padfZ != NULL )
        memcpy( this->padfZ, padfZ, sizeof(double) * nPointsIn );
}

/************************************************************************/
/*                          getPoints()                                 */
/************************************************************************/

/**
 * Returns all points of line string.
 *
 * This method copies all points into user list. This list must be at
 * least sizeof(OGRRawPoint) * OGRGeometry::getNumPoints() byte in size.
 * It also copies all Z coordinates.
 *
 * There is no SFCOM analog to this method.
 *
 * @param paoPointsOut a buffer into which the points is written.
 * @param padfZ the Z values that go with the points (optional, may be NULL).
 */

void OGRLineString::getPoints( OGRRawPoint * paoPointsOut, double * padfZ ) const
{
    if ( ! paoPointsOut )
        return;
        
    memcpy( paoPointsOut, paoPoints, sizeof(OGRRawPoint) * nPointCount );

/* -------------------------------------------------------------------- */
/*      Check 2D/3D.                                                    */
/* -------------------------------------------------------------------- */
    if( padfZ )
    {
        if ( this->padfZ )
            memcpy( padfZ, this->padfZ, sizeof(double) * nPointCount );
        else
            memset( padfZ, 0, sizeof(double) * nPointCount );
    }
}


/************************************************************************/
/*                          addSubLineString()                          */
/************************************************************************/

/**
 * Add a segment of another linestring to this one.
 *
 * Adds the request range of vertices to the end of this line string
 * in an efficient manner.  If the nStartVertex is larger than the
 * nEndVertex then the vertices will be reversed as they are copied. 
 *
 * @param poOtherLine the other OGRLineString. 
 * @param nStartVertex the first vertex to copy, defaults to 0 to start
 * with the first vertex in the other linestring. 
 * @param nEndVertex the last vertex to copy, defaults to -1 indicating 
 * the last vertex of the other line string. 
 */

void OGRLineString::addSubLineString( const OGRLineString *poOtherLine, 
                                      int nStartVertex, int nEndVertex )

{
/* -------------------------------------------------------------------- */
/*      Do a bit of argument defaulting and validation.                 */
/* -------------------------------------------------------------------- */
    if( nEndVertex == -1 )
        nEndVertex = poOtherLine->getNumPoints() - 1;

    if( nStartVertex < 0 || nEndVertex < 0 
        || nStartVertex >= poOtherLine->getNumPoints() 
        || nEndVertex >= poOtherLine->getNumPoints() )
    {
        CPLAssert( FALSE );
        return;
    }

/* -------------------------------------------------------------------- */
/*      Grow this linestring to hold the additional points.             */
/* -------------------------------------------------------------------- */
    int nOldPoints = nPointCount;
    int nPointsToAdd = ABS(nEndVertex-nStartVertex) + 1;

    setNumPoints( nPointsToAdd + nOldPoints );

/* -------------------------------------------------------------------- */
/*      Copy the x/y points - forward copies use memcpy.                */
/* -------------------------------------------------------------------- */
    if( nEndVertex >= nStartVertex )
    {
        memcpy( paoPoints + nOldPoints, 
                poOtherLine->paoPoints + nStartVertex, 
                sizeof(OGRRawPoint) * nPointsToAdd );
        if( poOtherLine->padfZ != NULL )
        {
            Make3D();
            memcpy( padfZ + nOldPoints, poOtherLine->padfZ + nStartVertex,
                    sizeof(double) * nPointsToAdd );
        }
    }
    
/* -------------------------------------------------------------------- */
/*      Copy the x/y points - reverse copies done double by double.     */
/* -------------------------------------------------------------------- */
    else
    {
        int i;

        for( i = 0; i < nPointsToAdd; i++ )
        {
            paoPoints[i+nOldPoints].x = 
                poOtherLine->paoPoints[nStartVertex-i].x;
            paoPoints[i+nOldPoints].y = 
                poOtherLine->paoPoints[nStartVertex-i].y;
        }

        if( poOtherLine->padfZ != NULL )
        {
            Make3D();

            for( i = 0; i < nPointsToAdd; i++ )
            {
                padfZ[i+nOldPoints] = poOtherLine->padfZ[nStartVertex-i];
            }
        }
    }
}

/************************************************************************/
/*                           importFromWkb()                            */
/*                                                                      */
/*      Initialize from serialized stream in well known binary          */
/*      format.                                                         */
/************************************************************************/

OGRErr OGRLineString::importFromWkb( unsigned char * pabyData,
                                     int nSize )

{
    OGRwkbByteOrder     eByteOrder;
    
    if( nSize < 21 && nSize != -1 )
        return OGRERR_NOT_ENOUGH_DATA;

/* -------------------------------------------------------------------- */
/*      Get the byte order byte.                                        */
/* -------------------------------------------------------------------- */
    eByteOrder = DB2_V72_FIX_BYTE_ORDER((OGRwkbByteOrder) *pabyData);
    assert( eByteOrder == wkbXDR || eByteOrder == wkbNDR );

/* -------------------------------------------------------------------- */
/*      Get the geometry feature type.  For now we assume that          */
/*      geometry type is between 0 and 255 so we only have to fetch     */
/*      one byte.                                                       */
/* -------------------------------------------------------------------- */
    OGRwkbGeometryType eGeometryType;
    int bIs3D = FALSE;
    int nBytesAvailable = nSize;

    if( eByteOrder == wkbNDR )
    {
        eGeometryType = (OGRwkbGeometryType) pabyData[1];
        bIs3D = pabyData[4] & 0x80 || pabyData[2] & 0x80;
    }
    else
    {
        eGeometryType = (OGRwkbGeometryType) pabyData[4];
        bIs3D = pabyData[1] & 0x80 || pabyData[3] & 0x80;
    }

    CPLAssert( eGeometryType == wkbLineString );

/* -------------------------------------------------------------------- */
/*      Get the vertex count.                                           */
/* -------------------------------------------------------------------- */
    int         nNewNumPoints;
    
    memcpy( &nNewNumPoints, pabyData + 5, 4 );
    
    if( OGR_SWAP( eByteOrder ) )
        nNewNumPoints = CPL_SWAP32(nNewNumPoints);
    
    /* Check if the wkb stream buffer is big enough to store
     * fetched number of points.
     * 16 or 24 - size of point structure
     */
    int nPointSize = (bIs3D ? 24 : 16);
    int nBufferMinSize = nPointSize * nNewNumPoints;

    if( nBufferMinSize > nBytesAvailable && nBytesAvailable > 0 )
    {
        CPLError( CE_Failure, CPLE_AppDefined,
                  "Length of input WKB is too small" );
        return OGRERR_NOT_ENOUGH_DATA;
    }

    setNumPoints( nNewNumPoints );
    
    if( bIs3D )
        Make3D();
    else
        Make2D();
    
/* -------------------------------------------------------------------- */
/*      Get the vertex.                                                 */
/* -------------------------------------------------------------------- */
    int i = 0;
    int nBytesToCopy = 0;
    
    if( bIs3D )
    {
        for( i = 0; i < nPointCount; i++ )
        {
            nBytesToCopy = 24;

            if( nBytesToCopy > nBytesAvailable && nBytesAvailable > 0 )
            {
                CPLError( CE_Failure, CPLE_AppDefined,
                          "WKB buffer with OGRLineString points is too small! \
                          \n\tWKB stream may be corrupted or it is EWKB stream which is not supported");
                return OGRERR_NOT_ENOUGH_DATA;
            }
            if ( nBytesAvailable > 0 )
                nBytesAvailable -= nBytesToCopy;

            memcpy( paoPoints + i, pabyData + 9 + i*24, 16 );
            memcpy( padfZ + i, pabyData + 9 + 16 + i*24, 8 );
        }
    }
    else
    {
        nBytesToCopy = 16 * nPointCount;

        if( nBytesToCopy > nBytesAvailable && nBytesAvailable > 0 )
        {
            CPLError( CE_Failure, CPLE_AppDefined,
                      "WKB buffer with OGRLineString points is too small! \
                      \n\tWKB stream may be corrupted or it is EWKB stream which is not supported");
            return OGRERR_NOT_ENOUGH_DATA;
        }


        memcpy( paoPoints, pabyData + 9, nBytesToCopy );
    }
    
/* -------------------------------------------------------------------- */
/*      Byte swap if needed.                                            */
/* -------------------------------------------------------------------- */
    if( OGR_SWAP( eByteOrder ) )
    {
        for( i = 0; i < nPointCount; i++ )
        {
            CPL_SWAPDOUBLE( &(paoPoints[i].x) );
            CPL_SWAPDOUBLE( &(paoPoints[i].y) );
        }

        if( bIs3D )
        {
            for( i = 0; i < nPointCount; i++ )
            {
                CPL_SWAPDOUBLE( padfZ + i );
            }
        }
    }
    
    return OGRERR_NONE;
}

/************************************************************************/
/*                            exportToWkb()                             */
/*                                                                      */
/*      Build a well known binary representation of this object.        */
/************************************************************************/

OGRErr  OGRLineString::exportToWkb( OGRwkbByteOrder eByteOrder,
                               unsigned char * pabyData ) const

{
/* -------------------------------------------------------------------- */
/*      Set the byte order.                                             */
/* -------------------------------------------------------------------- */
    pabyData[0] = DB2_V72_UNFIX_BYTE_ORDER((unsigned char) eByteOrder);

/* -------------------------------------------------------------------- */
/*      Set the geometry feature type.                                  */
/* -------------------------------------------------------------------- */
    GUInt32 nGType = getGeometryType();
    
    if( eByteOrder == wkbNDR )
        nGType = CPL_LSBWORD32( nGType );

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美日韩系列| 久久久精品免费网站| 91国内精品野花午夜精品| 粉嫩av亚洲一区二区图片| 国产不卡在线播放| 在线观看亚洲精品| 精品国产一二三| 国产色产综合色产在线视频| 国产精品丝袜一区| 亚洲观看高清完整版在线观看 | 久久精品国产亚洲aⅴ| 久久99精品网久久| 成人18视频在线播放| 亚洲色欲色欲www| 午夜日韩在线观看| 国产一区二区精品久久| 91视频一区二区| 久久这里只有精品视频网| 有坂深雪av一区二区精品| 日韩福利电影在线| 91色.com| 亚洲视频小说图片| 国产精品69毛片高清亚洲| 日韩一区和二区| 亚洲午夜久久久久中文字幕久| 丁香亚洲综合激情啪啪综合| 欧美精品18+| 亚洲综合色婷婷| 91视频在线观看免费| 亚洲视频一区在线| 美日韩一区二区| 日韩欧美在线1卡| 日韩国产欧美在线观看| 欧美性一二三区| 亚洲一区国产视频| 欧美日韩在线电影| 午夜天堂影视香蕉久久| 69成人精品免费视频| 国产乱对白刺激视频不卡| 在线成人av网站| 欧美va天堂va视频va在线| 91麻豆精品91久久久久久清纯| 亚洲视频中文字幕| 欧美日韩国产在线播放网站| 亚洲欧美激情小说另类| 欧洲av在线精品| 天天色综合天天| 久久久久久久久伊人| 丁香婷婷综合网| 亚洲自拍偷拍麻豆| 色噜噜夜夜夜综合网| 色综合久久久网| 亚洲一区二区三区四区在线 | 日韩精品一区二区三区在线| 日韩和欧美一区二区三区| 欧美日韩一二三区| 粉嫩av一区二区三区粉嫩| 日韩一区二区麻豆国产| 国产成人在线免费| 亚洲欧美另类综合偷拍| 日韩精品一区二区三区在线| 91麻豆高清视频| 国产综合久久久久影院| 亚洲第一久久影院| 国产精品久久精品日日| 91精品国产色综合久久不卡电影| 国产一区久久久| 青娱乐精品视频| 亚洲专区一二三| 亚洲精品日日夜夜| 国产精品欧美精品| 久久综合九色欧美综合狠狠| 欧美日韩午夜影院| av电影天堂一区二区在线| 久久97超碰色| 精品在线观看免费| 久久国内精品视频| 亚洲成人av福利| 午夜精品久久久久久久| 亚洲乱码国产乱码精品精可以看| 精品国产凹凸成av人网站| 欧美日韩精品一区二区三区 | 中文字幕一区二区三区四区 | 日韩精品自拍偷拍| 欧美酷刑日本凌虐凌虐| 91.com在线观看| 日韩欧美中文字幕一区| 日韩精品一区二区三区中文不卡| 欧美一区二区三区视频在线观看 | 九九**精品视频免费播放| 视频一区欧美精品| 免费看日韩a级影片| 精品在线免费视频| 国产一区二区三区免费观看| 精品制服美女久久| 成人a级免费电影| 在线观看日韩毛片| 日韩欧美中文字幕一区| 中文字幕一区二区视频| 亚洲国产视频一区二区| 日韩av在线播放中文字幕| 狠狠色丁香九九婷婷综合五月| 国产精品香蕉一区二区三区| 色猫猫国产区一区二在线视频| 91精品一区二区三区在线观看| 国产性色一区二区| 国模一区二区三区白浆| 亚洲综合一区二区精品导航| 青青草97国产精品免费观看无弹窗版 | 欧美精品丝袜久久久中文字幕| 精品久久久久久久久久久久包黑料 | 国产日韩欧美一区二区三区乱码| 一级日本不卡的影视| 国内外成人在线| 欧美另类高清zo欧美| 亚洲视频每日更新| 成人美女视频在线看| 日韩精品一区在线| 青青草97国产精品免费观看 | 免费人成精品欧美精品| 色综合久久中文综合久久牛| 久久蜜桃av一区精品变态类天堂 | 欧美一区二区三级| 欧美久久高跟鞋激| 在线观看网站黄不卡| 国产人成一区二区三区影院| 麻豆一区二区在线| 日韩美女主播在线视频一区二区三区| 亚洲天堂免费看| av在线播放一区二区三区| 欧美激情一区二区三区不卡| 国产一区在线观看视频| 欧美一区欧美二区| 亚洲地区一二三色| 91麻豆精品国产自产在线观看一区| 亚洲电影视频在线| 精品剧情在线观看| 国产激情一区二区三区| 国产精品美女久久久久久| 国产精品美女久久久久高潮| 国产精品自在欧美一区| 国产精品美日韩| 欧美日韩视频专区在线播放| 免费的国产精品| 国产精品青草久久| 欧美一级电影网站| 成人手机电影网| 五月天一区二区| 国产欧美视频在线观看| 欧美系列日韩一区| 国产传媒日韩欧美成人| 亚洲国产精品麻豆| 久久免费视频一区| 日韩欧美在线网站| 一本久久综合亚洲鲁鲁五月天| 日本不卡一区二区三区| 国产精品久久久久一区二区三区| 在线不卡一区二区| 色香蕉成人二区免费| 国产一区中文字幕| 美国三级日本三级久久99| 亚洲品质自拍视频| 国产精品人妖ts系列视频| 精品久久一区二区| 日韩亚洲欧美中文三级| 欧美日韩在线免费视频| 91麻豆.com| 色婷婷久久久久swag精品| av电影天堂一区二区在线 | 一本大道久久精品懂色aⅴ| 国产精品123区| 粉嫩av一区二区三区| 福利一区福利二区| 高清国产午夜精品久久久久久| 狠狠狠色丁香婷婷综合激情| 91精品欧美综合在线观看最新| 成人avav在线| 五月天网站亚洲| 国产精品欧美极品| 久久午夜免费电影| 久久伊99综合婷婷久久伊| 久久久777精品电影网影网 | 免费久久99精品国产| 男女男精品视频网| 国产精品白丝av| www.亚洲精品| 欧美系列一区二区| 久久久国产综合精品女国产盗摄| 久久精品免视看| 一区二区三区欧美| 三级成人在线视频| 国产精一品亚洲二区在线视频| 大美女一区二区三区| 欧美日韩一区在线| 久久久久久久电影| 午夜精品一区二区三区三上悠亚 | 91精品国产欧美一区二区18| 欧美电视剧在线看免费| 亚洲欧美日韩一区二区| 日本少妇一区二区|