📄 ogr_api.h
字号:
/******************************************************************************
* $Id: ogr_api.h 10646 2007-01-18 02:38:10Z warmerdam $
*
* Project: OpenGIS Simple Features Reference Implementation
* Purpose: C API for OGR Geometry, Feature, Layers, DataSource and drivers.
* 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.
****************************************************************************/
#ifndef _OGR_API_H_INCLUDED
#define _OGR_API_H_INCLUDED
/**
* \file ogr_api.h
*
* C API and defines for OGRFeature, OGRGeometry, and OGRDataSource
* related classes.
*
* See also: ogr_geometry.h, ogr_feature.h, ogrsf_frmts.h
*/
#include "ogr_core.h"
CPL_C_START
/* -------------------------------------------------------------------- */
/* Geometry related functions (ogr_geometry.h) */
/* -------------------------------------------------------------------- */
typedef void *OGRGeometryH;
#ifndef _DEFINED_OGRSpatialReferenceH
#define _DEFINED_OGRSpatialReferenceH
typedef void *OGRSpatialReferenceH;
typedef void *OGRCoordinateTransformationH;
#endif
struct _CPLXMLNode;
/* From base OGRGeometry class */
OGRErr CPL_DLL OGR_G_CreateFromWkb( unsigned char *, OGRSpatialReferenceH,
OGRGeometryH *, int );
OGRErr CPL_DLL OGR_G_CreateFromWkt( char **, OGRSpatialReferenceH,
OGRGeometryH * );
void CPL_DLL OGR_G_DestroyGeometry( OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_CreateGeometry( OGRwkbGeometryType );
int CPL_DLL OGR_G_GetDimension( OGRGeometryH );
int CPL_DLL OGR_G_GetCoordinateDimension( OGRGeometryH );
void CPL_DLL OGR_G_SetCoordinateDimension( OGRGeometryH, int );
OGRGeometryH CPL_DLL OGR_G_Clone( OGRGeometryH );
void CPL_DLL OGR_G_GetEnvelope( OGRGeometryH, OGREnvelope * );
OGRErr CPL_DLL OGR_G_ImportFromWkb( OGRGeometryH, unsigned char *, int );
OGRErr CPL_DLL OGR_G_ExportToWkb( OGRGeometryH, OGRwkbByteOrder, unsigned char*);
int CPL_DLL OGR_G_WkbSize( OGRGeometryH hGeom );
OGRErr CPL_DLL OGR_G_ImportFromWkt( OGRGeometryH, char ** );
OGRErr CPL_DLL OGR_G_ExportToWkt( OGRGeometryH, char ** );
OGRwkbGeometryType CPL_DLL OGR_G_GetGeometryType( OGRGeometryH );
const char CPL_DLL *OGR_G_GetGeometryName( OGRGeometryH );
void CPL_DLL OGR_G_DumpReadable( OGRGeometryH, FILE *, const char * );
void CPL_DLL OGR_G_FlattenTo2D( OGRGeometryH );
void CPL_DLL OGR_G_CloseRings( OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_CreateFromGML( const char * );
char CPL_DLL *OGR_G_ExportToGML( OGRGeometryH );
#if defined(_CPL_MINIXML_H_INCLUDED)
OGRGeometryH CPL_DLL OGR_G_CreateFromGMLTree( const CPLXMLNode * );
CPLXMLNode CPL_DLL *OGR_G_ExportToGMLTree( OGRGeometryH );
CPLXMLNode CPL_DLL *OGR_G_ExportEnvelopeToGMLTree( OGRGeometryH );
#endif
void CPL_DLL OGR_G_AssignSpatialReference( OGRGeometryH,
OGRSpatialReferenceH );
OGRSpatialReferenceH CPL_DLL OGR_G_GetSpatialReference( OGRGeometryH );
OGRErr CPL_DLL OGR_G_Transform( OGRGeometryH, OGRCoordinateTransformationH );
OGRErr CPL_DLL OGR_G_TransformTo( OGRGeometryH, OGRSpatialReferenceH );
int CPL_DLL OGR_G_Intersects( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Equals( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Disjoint( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Touches( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Crosses( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Within( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Contains( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Overlaps( OGRGeometryH, OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_GetBoundary( OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_ConvexHull( OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_Buffer( OGRGeometryH, double, int );
OGRGeometryH CPL_DLL OGR_G_Intersection( OGRGeometryH, OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_Union( OGRGeometryH, OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_Difference( OGRGeometryH, OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_SymmetricDifference( OGRGeometryH, OGRGeometryH );
double CPL_DLL OGR_G_Distance( OGRGeometryH, OGRGeometryH );
double CPL_DLL OGR_G_GetArea( OGRGeometryH );
int CPL_DLL OGR_G_Centroid( OGRGeometryH, OGRGeometryH );
void CPL_DLL OGR_G_Empty( OGRGeometryH );
/* backward compatibility */
int CPL_DLL OGR_G_Intersect( OGRGeometryH, OGRGeometryH );
int CPL_DLL OGR_G_Equal( OGRGeometryH, OGRGeometryH );
/* Methods for getting/setting vertices in points, line strings and rings */
int CPL_DLL OGR_G_GetPointCount( OGRGeometryH );
double CPL_DLL OGR_G_GetX( OGRGeometryH, int );
double CPL_DLL OGR_G_GetY( OGRGeometryH, int );
double CPL_DLL OGR_G_GetZ( OGRGeometryH, int );
void CPL_DLL OGR_G_GetPoint( OGRGeometryH, int iPoint,
double *, double *, double * );
void CPL_DLL OGR_G_SetPoint( OGRGeometryH, int iPoint,
double, double, double );
void CPL_DLL OGR_G_SetPoint_2D( OGRGeometryH, int iPoint,
double, double );
void CPL_DLL OGR_G_AddPoint( OGRGeometryH, double, double, double );
void CPL_DLL OGR_G_AddPoint_2D( OGRGeometryH, double, double );
/* Methods for getting/setting rings and members collections */
int CPL_DLL OGR_G_GetGeometryCount( OGRGeometryH );
OGRGeometryH CPL_DLL OGR_G_GetGeometryRef( OGRGeometryH, int );
OGRErr CPL_DLL OGR_G_AddGeometry( OGRGeometryH, OGRGeometryH );
OGRErr CPL_DLL OGR_G_AddGeometryDirectly( OGRGeometryH, OGRGeometryH );
OGRErr CPL_DLL OGR_G_RemoveGeometry( OGRGeometryH, int, int );
OGRGeometryH CPL_DLL OGRBuildPolygonFromEdges( OGRGeometryH hLinesAsCollection,
int bBestEffort,
int bAutoClose,
double dfTolerance,
OGRErr * peErr );
OGRErr CPL_DLL OGRSetGenerate_DB2_V72_BYTE_ORDER(
int bGenerate_DB2_V72_BYTE_ORDER );
int CPL_DLL OGRGetGenerate_DB2_V72_BYTE_ORDER(void);
/* -------------------------------------------------------------------- */
/* Feature related (ogr_feature.h) */
/* -------------------------------------------------------------------- */
typedef void *OGRFieldDefnH;
typedef void *OGRFeatureDefnH;
typedef void *OGRFeatureH;
/* OGRFieldDefn */
OGRFieldDefnH CPL_DLL OGR_Fld_Create( const char *, OGRFieldType );
void CPL_DLL OGR_Fld_Destroy( OGRFieldDefnH );
void CPL_DLL OGR_Fld_SetName( OGRFieldDefnH, const char * );
const char CPL_DLL *OGR_Fld_GetNameRef( OGRFieldDefnH );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -