ogr_core.h File Reference

#include "cpl_port.h"
#include "gdal_version.h"

Go to the source code of this file.

Classes

class  OGREnvelope
union  OGRField

Defines

#define GDAL_CHECK_VERSION(pszCallingComponentName)   GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)

Typedefs

typedef enum
ogr_style_tool_class_id 
OGRSTClassId
typedef enum
ogr_style_tool_units_id 
OGRSTUnitId
typedef enum
ogr_style_tool_param_pen_id 
OGRSTPenParam
typedef enum
ogr_style_tool_param_brush_id 
OGRSTBrushParam
typedef enum
ogr_style_tool_param_symbol_id 
OGRSTSymbolParam
typedef enum
ogr_style_tool_param_label_id 
OGRSTLabelParam

Enumerations

enum  OGRwkbGeometryType {
  wkbUnknown = 0, wkbPoint = 1, wkbLineString = 2, wkbPolygon = 3,
  wkbMultiPoint = 4, wkbMultiLineString = 5, wkbMultiPolygon = 6, wkbGeometryCollection = 7,
  wkbNone = 100, wkbLinearRing = 101, wkbPoint25D = 0x80000001, wkbLineString25D = 0x80000002,
  wkbPolygon25D = 0x80000003, wkbMultiPoint25D = 0x80000004, wkbMultiLineString25D = 0x80000005, wkbMultiPolygon25D = 0x80000006,
  wkbGeometryCollection25D = 0x80000007
}
enum  OGRFieldType {
  OFTInteger = 0, OFTIntegerList = 1, OFTReal = 2, OFTRealList = 3,
  OFTString = 4, OFTStringList = 5, OFTWideString = 6, OFTWideStringList = 7,
  OFTBinary = 8, OFTDate = 9, OFTTime = 10, OFTDateTime = 11
}
enum  OGRJustification
enum  ogr_style_tool_class_id
enum  ogr_style_tool_units_id
enum  ogr_style_tool_param_pen_id
enum  ogr_style_tool_param_brush_id
enum  ogr_style_tool_param_symbol_id
enum  ogr_style_tool_param_label_id

Functions

const char * OGRGeometryTypeToName (OGRwkbGeometryType eType)
 Fetch a human readable name corresponding to an OGRwkBGeometryType value. The returned value should not be modified, or freed by the application.
OGRwkbGeometryType OGRMergeGeometryTypes (OGRwkbGeometryType eMain, OGRwkbGeometryType eExtra)
 Find common geometry type.
int OGRParseDate (const char *pszInput, OGRField *psOutput, int nOptions)
int CPL_STDCALL GDALCheckVersion (int nVersionMajor, int nVersionMinor, const char *pszCallingComponentName)


Detailed Description

Core portability services for cross-platform OGR code.

Define Documentation

#define GDAL_CHECK_VERSION ( pszCallingComponentName   )     GDALCheckVersion(GDAL_VERSION_MAJOR, GDAL_VERSION_MINOR, pszCallingComponentName)

Helper macro for GDALCheckVersion


Typedef Documentation

List of parameters for use with OGRStyleBrush.

OGRStyleTool derived class types (returned by GetType()).

List of parameters for use with OGRStyleLabel.

List of parameters for use with OGRStylePen.

List of parameters for use with OGRStyleSymbol.

List of units supported by OGRStyleTools.


Enumeration Type Documentation

OGRStyleTool derived class types (returned by GetType()).

List of parameters for use with OGRStyleBrush.

List of parameters for use with OGRStyleLabel.

List of parameters for use with OGRStylePen.

List of parameters for use with OGRStyleSymbol.

List of units supported by OGRStyleTools.

List of feature field types. This list is likely to be extended in the future ... avoid coding applications based on the assumption that all field types can be known.

Enumerator:
OFTInteger  Simple 32bit integer
OFTIntegerList  List of 32bit integers
OFTReal  Double Precision floating point
OFTRealList  List of doubles
OFTString  String of ASCII chars
OFTStringList  Array of strings
OFTWideString  deprecated
OFTWideStringList  deprecated
OFTBinary  Raw Binary data
OFTDate  Date
OFTTime  Time
OFTDateTime  Date and Time

Display justification for field values.

List of well known binary geometry types. These are used within the BLOBs but are also returned from OGRGeometry::getGeometryType() to identify the type of a geometry object.

Enumerator:
wkbUnknown  unknown type, non-standard
wkbPoint  0-dimensional geometric object, standard WKB
wkbLineString  1-dimensional geometric object with linear interpolation between Points, standard WKB
wkbPolygon  planar 2-dimensional geometric object defined by 1 exterior boundary and 0 or more interior boundaries, standard WKB
wkbMultiPoint  GeometryCollection of Points, standard WKB
wkbMultiLineString  GeometryCollection of LineStrings, standard WKB
wkbMultiPolygon  GeometryCollection of Polygons, standard WKB
wkbGeometryCollection  geometric object that is a collection of 1 or more geometric objects, standard WKB
wkbNone  non-standard, for pure attribute records
wkbLinearRing  non-standard, just for createGeometry()
wkbPoint25D  2.5D extension as per 99-402
wkbLineString25D  2.5D extension as per 99-402
wkbPolygon25D  2.5D extension as per 99-402
wkbMultiPoint25D  2.5D extension as per 99-402
wkbMultiLineString25D  2.5D extension as per 99-402
wkbMultiPolygon25D  2.5D extension as per 99-402
wkbGeometryCollection25D  2.5D extension as per 99-402


Function Documentation

int CPL_STDCALL GDALCheckVersion ( int  nVersionMajor,
int  nVersionMinor,
const char *  pszCallingComponentName 
)

Return TRUE if GDAL library version at runtime matches nVersionMajor.nVersionMinor.

The purpose of this method is to ensure that calling code will run with the GDAL version it is compiled for. It is primarly intented for external plugins.

Parameters:
nVersionMajor Major version to be tested against
nVersionMinor Minor version to be tested against
pszCallingComponentName If not NULL, in case of version mismatch, the method will issue a failure mentionning the name of the calling component.

const char* OGRGeometryTypeToName ( OGRwkbGeometryType  eType  ) 

Fetch a human readable name corresponding to an OGRwkBGeometryType value. The returned value should not be modified, or freed by the application.

This function is C callable.

Parameters:
eType the geometry type.
Returns:
internal human readable string, or NULL on failure.

References OGRGeometryTypeToName(), wkbGeometryCollection, wkbGeometryCollection25D, wkbLineString, wkbLineString25D, wkbMultiLineString, wkbMultiLineString25D, wkbMultiPoint, wkbMultiPoint25D, wkbMultiPolygon, wkbMultiPolygon25D, wkbNone, wkbPoint, wkbPoint25D, wkbPolygon, wkbPolygon25D, and wkbUnknown.

Referenced by OGRGeometryTypeToName().

OGRwkbGeometryType OGRMergeGeometryTypes ( OGRwkbGeometryType  eMain,
OGRwkbGeometryType  eExtra 
)

Find common geometry type.

Given two geometry types, find the most specific common type. Normally used repeatedly with the geometries in a layer to try and establish the most specific geometry type that can be reported for the layer.

NOTE: wkbUnknown is the "worst case" indicating a mixture of geometry types with nothing in common but the base geometry type. wkbNone should be used to indicate that no geometries have been encountered yet, and means the first geometry encounted will establish the preliminary type.

Parameters:
eMain the first input geometry type.
eExtra the second input geometry type.
Returns:
the merged geometry type.

References OGRMergeGeometryTypes(), wkbGeometryCollection, wkbMultiLineString, wkbMultiPoint, wkbMultiPolygon, wkbNone, and wkbUnknown.

Referenced by OGRMergeGeometryTypes().

int OGRParseDate ( const char *  pszInput,
OGRField psField,
int  nOptions 
)

Parse date string.

This function attempts to parse a date string in a variety of formats into the OGRField.Date format suitable for use with OGR. Generally speaking this function is expecting values like:

YYYY-MM-DD HH:MM:SS+nn

The seconds may also have a decimal portion (which is ignored). And just dates (YYYY-MM-DD) or just times (HH:MM:SS) are also supported. The date may also be in YYYY/MM/DD format. If the year is less than 100 and greater than 30 a "1900" century value will be set. If it is less than 30 and greater than -1 then a "2000" century value will be set. In the future this function may be generalized, and additional control provided through nOptions, but an nOptions value of "0" should always do a reasonable default form of processing.

The value of psField will be indeterminate if the function fails (returns FALSE).

Parameters:
pszInput the input date string.
psField the OGRField that will be updated with the parsed result.
nOptions parsing options, for now always 0.
Returns:
TRUE if apparently successful or FALSE on failure.

References OGRField::Date, OGRField::Day, OGRField::Hour, OGRField::Minute, OGRField::Month, OGRParseDate(), OGRField::Second, OGRField::TZFlag, and OGRField::Year.

Referenced by OGRParseDate(), and OGRFeature::SetField().


Generated for GDAL by doxygen 1.5.7.1.