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

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

?? ogr_api.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/******************************************************************************
 * $Id: ogr_api.cpp 12043 2007-09-03 17:58:51Z mloskot $
 *
 * Project:  OpenGIS Simple Features Reference Implementation
 * Purpose:  C API Functions that don't correspond one-to-one with C++ 
 *           methods, such as the "simplified" geometry access functions.
 * Author:   Frank Warmerdam, warmerdam@pobox.com
 *
 ******************************************************************************
 * Copyright (c) 2002, 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_api.h"
#include "cpl_error.h"

/************************************************************************/
/*                        OGR_G_GetPointCount()                         */
/************************************************************************/
/**
 * Fetch number of points from a geometry.
 *
 * @param hGeom handle to the geometry from which to get the number of points.
 * @return the number of points.
 */

int OGR_G_GetPointCount( OGRGeometryH hGeom )

{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
        return 1;

      case wkbLineString:
      {
          OGRLineString *poLine = (OGRLineString *) hGeom;
          return poLine->getNumPoints();
      }

      default:
        return 0;
    }
}

/************************************************************************/
/*                             OGR_G_GetX()                             */
/************************************************************************/
/**
 * Fetch the x coordinate of a point from a geometry.
 *
 * @param hGeom handle to the geometry from which to get the x coordinate.
 * @param i point to get the x coordinate.
 * @return the X coordinate of this point. 
 */

double OGR_G_GetX( OGRGeometryH hGeom, int i )

{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
      {
          if( i == 0 )
              return ((OGRPoint *) hGeom)->getX();
          else
              return 0.0;
      }

      case wkbLineString:
        return ((OGRLineString *) hGeom)->getX( i );

      default:
        return 0.0;
    }
}

/************************************************************************/
/*                             OGR_G_GetY()                             */
/************************************************************************/
/**
 * Fetch the x coordinate of a point from a geometry.
 *
 * @param hGeom handle to the geometry from which to get the y coordinate.
 * @param i point to get the Y coordinate.
 * @return the Y coordinate of this point. 
 */

double OGR_G_GetY( OGRGeometryH hGeom, int i )

{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
      {
          if( i == 0 )
              return ((OGRPoint *) hGeom)->getY();
          else
              return 0.0;
      }

      case wkbLineString:
          return ((OGRLineString *) hGeom)->getY( i );

      default:
        return 0.0;
    }
}

/************************************************************************/
/*                             OGR_G_GetZ()                             */
/************************************************************************/
/**
 * Fetch the z coordinate of a point from a geometry.
 *
 * @param hGeom handle to the geometry from which to get the Z coordinate.
 * @param i point to get the Z coordinate.
 * @return the Z coordinate of this point. 
 */

double OGR_G_GetZ( OGRGeometryH hGeom, int i )

{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
      {
          if( i == 0 )
              return ((OGRPoint *) hGeom)->getZ();
          else
              return 0.0;
      }

      case wkbLineString:
          return ((OGRLineString *) hGeom)->getZ( i );

      default:
          return 0.0;
    }
}

/************************************************************************/
/*                           OGR_G_GetPoint()                           */
/************************************************************************/

/**
 * Fetch a point in line string or a point geometry.
 *
 * @param hGeom handle to the geometry from which to get the coordinates.
 * @param i the vertex to fetch, from 0 to getNumPoints()-1, zero for a point.
 * @param pdfX value of x coordinate.
 * @param pdfY value of y coordinate.
 * @param pdfZ value of z coordinate.
 */

void OGR_G_GetPoint( OGRGeometryH hGeom, int i, 
                     double *pdfX, double *pdfY, double *pdfZ )

{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
      {
          CPLAssert( i == 0 );
          if( i == 0 )
          {
              *pdfX = ((OGRPoint *)hGeom)->getX();
              *pdfY = ((OGRPoint *)hGeom)->getY();
              if( pdfZ != NULL )
                  *pdfZ = ((OGRPoint *)hGeom)->getZ();
          }
      }
      break;

      case wkbLineString:
      {
          *pdfX = ((OGRLineString *) hGeom)->getX( i );
          *pdfY = ((OGRLineString *) hGeom)->getY( i );
          if( pdfZ != NULL )
              *pdfZ = ((OGRLineString *) hGeom)->getZ( i );
      }
      break;

      default:
        CPLAssert( FALSE );
        break;
    }
}

/************************************************************************/
/*                           OGR_G_SetPoint()                           */
/************************************************************************/
/**
 * Set the location of a vertex in a point or linestring geometry.
 *
 * If iPoint is larger than the number of existing
 * points in the linestring, the point count will be increased to
 * accomodate the request.
 *
 * @param hGeom handle to the geometry to add a vertex to.
 * @param i the index of the vertex to assign (zero based) or
 *  zero for a point.
 * @param dfX input X coordinate to assign.
 * @param dfY input Y coordinate to assign.
 * @param dfZ input Z coordinate to assign (defaults to zero).
 */

void OGR_G_SetPoint( OGRGeometryH hGeom, int i, 
                     double dfX, double dfY, double dfZ )

{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
      {
          CPLAssert( i == 0 );
          if( i == 0 )
          {
              ((OGRPoint *) hGeom)->setX( dfX );
              ((OGRPoint *) hGeom)->setY( dfY );
              ((OGRPoint *) hGeom)->setZ( dfZ );
          }
      }
      break;

      case wkbLineString:
        ((OGRLineString *) hGeom)->setPoint( i, dfX, dfY, dfZ );
        break;

      default:
        CPLAssert( FALSE );
        break;
    }
}

/************************************************************************/
/*                         OGR_G_SetPoint_2D()                          */
/************************************************************************/
/**
 * Set the location of a vertex in a point or linestring geometry.
 *
 * If iPoint is larger than the number of existing
 * points in the linestring, the point count will be increased to
 * accomodate the request.
 *
 * @param hGeom handle to the geometry to add a vertex to.
 * @param i the index of the vertex to assign (zero based) or
 *  zero for a point.
 * @param dfX input X coordinate to assign.
 * @param dfY input Y coordinate to assign.
 */

void OGR_G_SetPoint_2D( OGRGeometryH hGeom, int i, 
                        double dfX, double dfY )
    
{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
      {
          CPLAssert( i == 0 );
          if( i == 0 )
          {
              ((OGRPoint *) hGeom)->setX( dfX );
              ((OGRPoint *) hGeom)->setY( dfY );
          }
      }
      break;

      case wkbLineString:
        ((OGRLineString *) hGeom)->setPoint( i, dfX, dfY );
        break;

      default:
        CPLAssert( FALSE );
        break;
    }
}

/************************************************************************/
/*                           OGR_G_AddPoint()                           */
/************************************************************************/
/**
 * Add a point to a geometry (line string or point).
 *
 * The vertex count of the line string is increased by one, and assigned from
 * the passed location value.
 *
 * @param hGeom handle to the geometry to add a point to.
 * @param dfX x coordinate of point to add.
 * @param dfY y coordinate of point to add.
 * @param dfZ z coordinate of point to add.
 */

void OGR_G_AddPoint( OGRGeometryH hGeom, 
                     double dfX, double dfY, double dfZ )

{
    switch( wkbFlatten(((OGRGeometry *) hGeom)->getGeometryType()) )
    {
      case wkbPoint:
      {
          ((OGRPoint *) hGeom)->setX( dfX );
          ((OGRPoint *) hGeom)->setY( dfY );
          ((OGRPoint *) hGeom)->setZ( dfZ );
      }
      break;

      case wkbLineString:
        ((OGRLineString *) hGeom)->addPoint( dfX, dfY, dfZ );
        break;

      default:
        CPLAssert( FALSE );
        break;
    }
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲精品一区二区三区福利| 久久精品亚洲麻豆av一区二区 | 国产成人在线观看免费网站| 欧美日本一道本| 日韩成人精品视频| 日韩视频一区二区在线观看| 理论片日本一区| 国产欧美日韩在线视频| 成人在线综合网站| 日韩毛片视频在线看| 91网页版在线| 日产国产高清一区二区三区 | 精品少妇一区二区三区视频免付费 | 91视频观看视频| 亚洲一二三级电影| 日韩女优视频免费观看| 国产一区在线精品| 亚洲免费观看在线视频| 3atv在线一区二区三区| 国产精品99久久久| 亚洲精品成人精品456| 欧美群妇大交群中文字幕| 久久se这里有精品| 中文字幕一区二区三区四区不卡| 欧美视频三区在线播放| 强制捆绑调教一区二区| 国产精品每日更新在线播放网址| 在线免费视频一区二区| 激情六月婷婷久久| 一区二区三区四区高清精品免费观看 | 天堂一区二区在线免费观看| 久久久久久麻豆| 91福利精品视频| 黄色小说综合网站| 一区二区三区精品视频| 欧美精品一区二区蜜臀亚洲| 在线视频国内自拍亚洲视频| 国内精品第一页| 亚洲愉拍自拍另类高清精品| 久久综合色鬼综合色| 色爱区综合激月婷婷| 国产一区二区三区精品欧美日韩一区二区三区 | 久久成人羞羞网站| 亚洲最大成人网4388xx| 国产午夜精品一区二区三区视频| 在线观看日韩毛片| 成人免费毛片片v| 日本不卡在线视频| 亚洲乱码中文字幕综合| 国产亚洲成av人在线观看导航| 欧美日韩情趣电影| 99国内精品久久| 日本成人在线电影网| 亚洲一区成人在线| 自拍偷拍亚洲综合| 国产精品人成在线观看免费| 欧美不卡一二三| 欧美放荡的少妇| 欧美午夜理伦三级在线观看| 91亚洲男人天堂| 成人国产精品免费观看视频| 久国产精品韩国三级视频| 午夜成人免费视频| 亚洲另类中文字| 亚洲欧洲色图综合| 国产精品不卡一区| 国产女人aaa级久久久级| 26uuu精品一区二区在线观看| 91麻豆精品国产91久久久更新时间 | 95精品视频在线| 成人免费av在线| 国产一区二区三区在线观看免费 | 久久亚洲综合av| 日韩精品一区二区三区视频播放 | 亚洲va欧美va人人爽午夜| 亚洲免费高清视频在线| 中文字幕一区二区视频| 国产婷婷色一区二区三区四区| 久久色.com| 国产日产欧美一区二区视频| 久久久久久久久久久黄色| 久久久久久**毛片大全| 国产片一区二区三区| 国产精品亲子伦对白| 中文字幕视频一区二区三区久| 国产精品人成在线观看免费 | 亚洲欧美一区二区视频| 亚洲色图在线视频| 亚洲制服欧美中文字幕中文字幕| 亚洲国产一区二区视频| 日韩精品免费视频人成| 久久精品理论片| 国产东北露脸精品视频| 成人毛片视频在线观看| 91浏览器打开| 911精品国产一区二区在线| 日韩一区二区在线观看| 久久久亚洲高清| 亚洲欧洲日韩av| 亚洲成人777| 久久er精品视频| 国产91精品免费| 91国偷自产一区二区三区观看| 欧美日韩一区二区在线观看视频| 91麻豆精品国产91久久久资源速度 | 国产精品69毛片高清亚洲| 成人黄色综合网站| 91久久久免费一区二区| 日韩欧美成人一区| 国产日韩欧美亚洲| 夜夜揉揉日日人人青青一国产精品| 天天做天天摸天天爽国产一区 | 久久久久九九视频| 日韩欧美一区电影| 久久99精品国产.久久久久久| 亚洲精品自拍动漫在线| 午夜精品视频在线观看| 国产精品亚洲视频| 色欧美片视频在线观看| 91精品国产综合久久精品app | 欧美自拍偷拍一区| 精品福利一二区| 一区二区三区欧美日韩| 黑人精品欧美一区二区蜜桃| 91啦中文在线观看| 精品国产乱码久久久久久图片| 亚洲精品视频一区二区| 久久精品国产99久久6| 在线看一区二区| 久久精品视频网| 色婷婷综合激情| 男女男精品视频网| 91在线观看美女| 国产精品77777| 欧美日韩二区三区| 国产精品久久久久一区| 免费高清视频精品| 欧洲日韩一区二区三区| 国产精品理论在线观看| 精品亚洲国产成人av制服丝袜| 欧美系列亚洲系列| 国产蜜臀av在线一区二区三区| 全部av―极品视觉盛宴亚洲| 在线精品视频小说1| 中文成人综合网| 国产米奇在线777精品观看| 欧美一区二区在线观看| 亚洲一区二区影院| 91免费看片在线观看| 亚洲国产精品99久久久久久久久| 美腿丝袜一区二区三区| 69堂成人精品免费视频| 亚洲国产欧美在线人成| 色8久久精品久久久久久蜜| 国产精品免费看片| 成人免费视频网站在线观看| 久久精品夜夜夜夜久久| 精品一区二区在线看| 欧美一区二区三区爱爱| 丝袜亚洲另类丝袜在线| 精品视频在线免费看| 亚洲一区二区三区四区在线免费观看| 成人小视频免费在线观看| 国产色一区二区| 国产成人综合在线| 国产亚洲精品中文字幕| 4438成人网| 欧美一区二区在线看| 日本午夜精品视频在线观看| 欧美精品乱码久久久久久| 五月天视频一区| 91精品国产综合久久福利| 免费高清在线一区| 久久亚洲欧美国产精品乐播| 国产精品一区专区| av在线不卡免费看| 亚洲欧美另类在线| 在线免费精品视频| 日本三级亚洲精品| 久久综合资源网| 国产不卡在线播放| ...xxx性欧美| 欧美性一二三区| 久久精品久久综合| 国产欧美日韩不卡| 色综合久久综合| 国产高清久久久久| 久久久91精品国产一区二区精品 | 国产精品免费免费| 欧美午夜精品一区二区蜜桃| 日韩国产欧美三级| 国产性做久久久久久| 色综合天天综合色综合av| 亚洲国产你懂的| 久久综合色一综合色88| 色综合天天天天做夜夜夜夜做| 亚洲成人免费电影| 久久久777精品电影网影网 | 欧美国产国产综合| 在线观看国产日韩|