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

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

?? ogr_api.cpp

?? mitab,讀取MapInfo的地圖文件
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************
 * $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;
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品一级黄| 开心九九激情九九欧美日韩精美视频电影| 国产精品一区二区在线播放 | 91精品国产乱码久久蜜臀| 一二三四社区欧美黄| 精品视频1区2区| 日韩国产高清影视| 日韩欧美高清在线| 国产河南妇女毛片精品久久久| 久久人人超碰精品| 成人av资源在线观看| 自拍av一区二区三区| 欧美日韩一本到| 久久精品免费观看| 国产精品美女久久久久aⅴ| 97久久精品人人做人人爽50路| 亚洲主播在线观看| 欧美岛国在线观看| 成人avav影音| 午夜成人在线视频| 国产视频一区不卡| 欧美伊人久久大香线蕉综合69| 日韩中文字幕不卡| 中文字幕二三区不卡| 欧美性感一类影片在线播放| 精品在线播放午夜| 1区2区3区精品视频| 欧美顶级少妇做爰| 粉嫩aⅴ一区二区三区四区五区| 亚洲精品成人在线| 欧美mv日韩mv亚洲| 在线观看一区日韩| 国产一区二区三区精品欧美日韩一区二区三区| 欧美国产精品一区二区三区| 欧美色窝79yyyycom| 国产精品一品视频| 三级不卡在线观看| 国产精品国产成人国产三级| 欧美一区二区视频免费观看| 成人app在线观看| 麻豆精品国产91久久久久久| 亚洲精品日韩综合观看成人91| 精品国产乱码久久久久久影片| 白白色 亚洲乱淫| 蜜臀91精品一区二区三区| 成人欧美一区二区三区| 精品少妇一区二区三区日产乱码| 在线中文字幕一区二区| 成人午夜av电影| 久久aⅴ国产欧美74aaa| 偷窥国产亚洲免费视频| 中文字幕在线不卡一区| 久久久综合视频| 日韩免费观看高清完整版在线观看| 91在线你懂得| 日本aⅴ亚洲精品中文乱码| 亚洲欧洲无码一区二区三区| 精品国产一区二区三区av性色| 在线观看三级视频欧美| 99视频一区二区三区| 国产美女精品人人做人人爽| 麻豆国产精品777777在线| 亚洲bt欧美bt精品777| 亚洲女子a中天字幕| 国产精品视频一区二区三区不卡| 欧美成人一区二区三区片免费 | 在线成人免费观看| 在线看国产一区| 色激情天天射综合网| 99麻豆久久久国产精品免费优播| 国产在线日韩欧美| 黑人精品欧美一区二区蜜桃| 久久不见久久见免费视频1| 捆绑调教一区二区三区| 奇米综合一区二区三区精品视频| 丝袜美腿亚洲综合| 亚洲成人av福利| 亚洲一区二区三区在线看| 亚洲综合网站在线观看| 亚洲国产视频一区二区| 亚洲一区二区精品3399| 亚洲v精品v日韩v欧美v专区| 午夜视黄欧洲亚洲| 日韩精品亚洲专区| 久久99国产精品成人| 精品一区二区国语对白| 久久se精品一区二区| 国产精品99久久久久久宅男| 成人av资源下载| 色婷婷综合五月| 欧美视频在线播放| 欧美精品在线一区二区三区| 日韩午夜激情免费电影| 久久综合狠狠综合久久综合88| 国产性做久久久久久| 久久久久久久久久久99999| 国产日韩欧美在线一区| 亚洲天堂av老司机| 亚洲超丰满肉感bbw| 精品一区二区免费| 高清日韩电视剧大全免费| 91香蕉视频污| 欧美日韩aaaaa| 久久综合色综合88| 亚洲欧洲日产国码二区| 亚洲成a人片在线不卡一二三区| 日韩电影在线看| 国产精品一级黄| 日本二三区不卡| 91精品国产色综合久久| 国产欧美久久久精品影院| 一级中文字幕一区二区| 青青草国产精品亚洲专区无| 成人黄色网址在线观看| 欧美日韩成人一区二区| 久久久久久毛片| 一区二区三区加勒比av| 极品少妇xxxx偷拍精品少妇| 成人av在线播放网站| 欧美日韩一二三| 亚洲国产高清不卡| 日本伊人色综合网| 成人动漫视频在线| 欧美一区二区高清| 亚洲欧洲综合另类在线| 美女在线观看视频一区二区| 95精品视频在线| 精品人在线二区三区| 最新国产成人在线观看| 久久99精品久久只有精品| 色婷婷久久久亚洲一区二区三区 | 国内精品久久久久影院薰衣草| 色综合天天综合网天天狠天天| 欧美电影免费观看高清完整版在线 | 国产福利精品导航| 欧美人与性动xxxx| 国产精品萝li| 激情综合五月婷婷| 欧美日韩精品欧美日韩精品一综合| 久久久www成人免费无遮挡大片| 亚洲一区二区三区四区在线| 粉嫩欧美一区二区三区高清影视| 91精品国产91热久久久做人人 | 在线视频一区二区免费| 久久久精品日韩欧美| 蜜臀久久99精品久久久久久9| 色哟哟欧美精品| 国产精品高潮久久久久无| 激情五月播播久久久精品| 欧美久久久久久久久中文字幕| 亚洲女爱视频在线| av在线不卡免费看| 中文子幕无线码一区tr| 国产原创一区二区| 91精品国产色综合久久不卡蜜臀| 亚洲综合一区二区三区| 99久久免费视频.com| 国产精品网站在线| 国产成人午夜99999| 久久久无码精品亚洲日韩按摩| 免费av成人在线| 欧美一区二区在线看| 日本不卡不码高清免费观看| 欧美欧美欧美欧美| 天天亚洲美女在线视频| 欧美日韩在线播放| 亚洲超碰精品一区二区| 欧美日韩一区二区三区四区| 亚洲国产一区视频| 7777精品伊人久久久大香线蕉| 亚洲成人精品一区二区| 欧美日韩精品一区二区天天拍小说 | 香蕉加勒比综合久久| 欧美日韩国产天堂| 日韩电影在线观看一区| 欧美不卡一区二区三区| 裸体一区二区三区| 2021国产精品久久精品| 懂色av一区二区三区蜜臀| 国产精品每日更新在线播放网址| 不卡区在线中文字幕| 一区二区三区日韩精品| 欧美熟乱第一页| 日韩精品午夜视频| 欧美精品一区二区三区蜜桃| 激情综合网av| 国产精品嫩草99a| 色婷婷精品久久二区二区蜜臂av| 一区二区国产盗摄色噜噜| 欧美妇女性影城| 狠狠色狠狠色综合系列| 国产精品萝li| 欧美日韩国产精选| 极品美女销魂一区二区三区免费| 久久久久久久国产精品影院| 91丝袜美女网| 奇米精品一区二区三区四区 | 三级在线观看一区二区| 欧美精品一区视频| 色噜噜狠狠成人网p站|