GDAL
ogr_feature.h
Go to the documentation of this file.
1 /******************************************************************************
2  * $Id: ogr_feature.h 36411 2016-11-21 22:03:48Z rouault $
3  *
4  * Project: OpenGIS Simple Features Reference Implementation
5  * Purpose: Class for representing a whole feature, and layer schemas.
6  * Author: Frank Warmerdam, warmerdam@pobox.com
7  *
8  ******************************************************************************
9  * Copyright (c) 1999, Les Technologies SoftMap Inc.
10  * Copyright (c) 2008-2013, Even Rouault <even dot rouault at mines-paris dot org>
11  *
12  * Permission is hereby granted, free of charge, to any person obtaining a
13  * copy of this software and associated documentation files (the "Software"),
14  * to deal in the Software without restriction, including without limitation
15  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
16  * and/or sell copies of the Software, and to permit persons to whom the
17  * Software is furnished to do so, subject to the following conditions:
18  *
19  * The above copyright notice and this permission notice shall be included
20  * in all copies or substantial portions of the Software.
21  *
22  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
23  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28  * DEALINGS IN THE SOFTWARE.
29  ****************************************************************************/
30 
31 #ifndef OGR_FEATURE_H_INCLUDED
32 #define OGR_FEATURE_H_INCLUDED
33 
34 #include "cpl_atomic_ops.h"
35 #include "ogr_featurestyle.h"
36 #include "ogr_geometry.h"
37 
44 /************************************************************************/
45 /* OGRFieldDefn */
46 /************************************************************************/
47 
62 class CPL_DLL OGRFieldDefn
63 {
64  private:
65  char *pszName;
66  OGRFieldType eType;
67  OGRJustification eJustify;
68  int nWidth; // Zero is variable.
69  int nPrecision;
70  char *pszDefault;
71 
72  int bIgnore;
73  OGRFieldSubType eSubType;
74 
75  int bNullable;
76 
77  public:
78  OGRFieldDefn( const char *, OGRFieldType );
79  explicit OGRFieldDefn( OGRFieldDefn * );
80  ~OGRFieldDefn();
81 
82  void SetName( const char * );
83  const char *GetNameRef() { return pszName; }
84 
85  OGRFieldType GetType() const { return eType; }
86  void SetType( OGRFieldType eTypeIn );
87  static const char *GetFieldTypeName( OGRFieldType );
88 
89  OGRFieldSubType GetSubType() const { return eSubType; }
90  void SetSubType( OGRFieldSubType eSubTypeIn );
91  static const char *GetFieldSubTypeName( OGRFieldSubType );
92 
93  OGRJustification GetJustify() const { return eJustify; }
94  void SetJustify( OGRJustification eJustifyIn )
95  { eJustify = eJustifyIn; }
96 
97  int GetWidth() const { return nWidth; }
98  void SetWidth( int nWidthIn ) { nWidth = MAX(0,nWidthIn); }
99 
100  int GetPrecision() const { return nPrecision; }
101  void SetPrecision( int nPrecisionIn )
102  { nPrecision = nPrecisionIn; }
103 
104  void Set( const char *, OGRFieldType, int = 0, int = 0,
105  OGRJustification = OJUndefined );
106 
107  void SetDefault( const char* );
108  const char *GetDefault() const;
109  int IsDefaultDriverSpecific() const;
110 
111  int IsIgnored() const { return bIgnore; }
112  void SetIgnored( int bIgnoreIn ) { bIgnore = bIgnoreIn; }
113 
114  int IsNullable() const { return bNullable; }
115  void SetNullable( int bNullableIn ) { bNullable = bNullableIn; }
116 
117  int IsSame( const OGRFieldDefn * ) const;
118 
119  private:
121 };
122 
123 /************************************************************************/
124 /* OGRGeomFieldDefn */
125 /************************************************************************/
126 
141 class CPL_DLL OGRGeomFieldDefn
142 {
143 protected:
145  char *pszName;
146  OGRwkbGeometryType eGeomType; /* all values possible except wkbNone */
147  OGRSpatialReference* poSRS;
148 
149  int bIgnore;
150  int bNullable;
151 
152  void Initialize( const char *, OGRwkbGeometryType );
154 
155 public:
156  OGRGeomFieldDefn( const char *pszNameIn,
157  OGRwkbGeometryType eGeomTypeIn );
158  explicit OGRGeomFieldDefn( OGRGeomFieldDefn * );
159  virtual ~OGRGeomFieldDefn();
160 
161  void SetName( const char * );
162  const char *GetNameRef() { return pszName; }
163 
164  OGRwkbGeometryType GetType() const { return eGeomType; }
165  void SetType( OGRwkbGeometryType eTypeIn );
166 
167  virtual OGRSpatialReference* GetSpatialRef();
168  void SetSpatialRef( OGRSpatialReference* poSRSIn );
169 
170  int IsIgnored() const { return bIgnore; }
171  void SetIgnored( int bIgnoreIn ) { bIgnore = bIgnoreIn; }
172 
173  int IsNullable() const { return bNullable; }
174  void SetNullable( int bNullableIn )
175  { bNullable = bNullableIn; }
176 
177  int IsSame( OGRGeomFieldDefn * );
178 
179  private:
181 };
182 
183 /************************************************************************/
184 /* OGRFeatureDefn */
185 /************************************************************************/
186 
207 class CPL_DLL OGRFeatureDefn
208 {
209  protected:
211  volatile int nRefCount;
212 
213  int nFieldCount;
214  OGRFieldDefn **papoFieldDefn;
215 
216  int nGeomFieldCount;
217  OGRGeomFieldDefn **papoGeomFieldDefn;
218 
219  char *pszFeatureClassName;
220 
221  int bIgnoreStyle;
223 
224  public:
225  explicit OGRFeatureDefn( const char * pszName = NULL );
226  virtual ~OGRFeatureDefn();
227 
228  virtual const char *GetName();
229 
230  virtual int GetFieldCount();
231  virtual OGRFieldDefn *GetFieldDefn( int i );
232  virtual int GetFieldIndex( const char * );
233 
234  virtual void AddFieldDefn( OGRFieldDefn * );
235  virtual OGRErr DeleteFieldDefn( int iField );
236  virtual OGRErr ReorderFieldDefns( int* panMap );
237 
238  virtual int GetGeomFieldCount();
239  virtual OGRGeomFieldDefn *GetGeomFieldDefn( int i );
240  virtual int GetGeomFieldIndex( const char * );
241 
242  virtual void AddGeomFieldDefn( OGRGeomFieldDefn *,
243  int bCopy = TRUE );
244  virtual OGRErr DeleteGeomFieldDefn( int iGeomField );
245 
246  virtual OGRwkbGeometryType GetGeomType();
247  virtual void SetGeomType( OGRwkbGeometryType );
248 
249  virtual OGRFeatureDefn *Clone();
250 
251  int Reference() { return CPLAtomicInc(&nRefCount); }
252  int Dereference() { return CPLAtomicDec(&nRefCount); }
253  int GetReferenceCount() { return nRefCount; }
254  void Release();
255 
256  virtual int IsGeometryIgnored();
257  virtual void SetGeometryIgnored( int bIgnore );
258  virtual int IsStyleIgnored() const { return bIgnoreStyle; }
259  virtual void SetStyleIgnored( int bIgnore )
260  { bIgnoreStyle = bIgnore; }
261 
262  virtual int IsSame( OGRFeatureDefn * poOtherFeatureDefn );
263 
264  static OGRFeatureDefn *CreateFeatureDefn( const char *pszName = NULL );
265  static void DestroyFeatureDefn( OGRFeatureDefn * );
266 
267  private:
269 };
270 
271 /************************************************************************/
272 /* OGRFeature */
273 /************************************************************************/
274 
279 class CPL_DLL OGRFeature
280 {
281  private:
282 
283  GIntBig nFID;
284  OGRFeatureDefn *poDefn;
285  OGRGeometry **papoGeometries;
286  OGRField *pauFields;
287  char *m_pszNativeData;
288  char *m_pszNativeMediaType;
289 
290  bool SetFieldInternal( int i, OGRField * puValue );
291 
292  protected:
294  char *m_pszStyleString;
295  OGRStyleTable *m_poStyleTable;
296  char *m_pszTmpFieldValue;
298 
299  public:
300  explicit OGRFeature( OGRFeatureDefn * );
301  virtual ~OGRFeature();
302 
303  OGRFeatureDefn *GetDefnRef() { return poDefn; }
304 
305  OGRErr SetGeometryDirectly( OGRGeometry * );
306  OGRErr SetGeometry( const OGRGeometry * );
307  OGRGeometry *GetGeometryRef();
308  OGRGeometry *StealGeometry() CPL_WARN_UNUSED_RESULT;
309 
310  int GetGeomFieldCount() const
311  { return poDefn->GetGeomFieldCount(); }
313  { return poDefn->GetGeomFieldDefn(iField); }
314  int GetGeomFieldIndex( const char * pszName )
315  { return poDefn->GetGeomFieldIndex(pszName); }
316 
317  OGRGeometry* GetGeomFieldRef( int iField );
318  OGRGeometry* StealGeometry( int iField );
319  OGRGeometry* GetGeomFieldRef( const char* pszFName );
320  OGRErr SetGeomFieldDirectly( int iField, OGRGeometry * );
321  OGRErr SetGeomField( int iField, const OGRGeometry * );
322 
324  virtual OGRBoolean Equal( OGRFeature * poFeature );
325 
326  int GetFieldCount() const
327  { return poDefn->GetFieldCount(); }
328  OGRFieldDefn *GetFieldDefnRef( int iField ) const
329  { return poDefn->GetFieldDefn(iField); }
330  int GetFieldIndex( const char * pszName )
331  { return poDefn->GetFieldIndex(pszName); }
332 
333  int IsFieldSet( int iField );
334 
335  void UnsetField( int iField );
336 
337  OGRField *GetRawFieldRef( int i ) { return pauFields + i; }
338 
339  int GetFieldAsInteger( int i );
340  GIntBig GetFieldAsInteger64( int i );
341  double GetFieldAsDouble( int i );
342  const char *GetFieldAsString( int i );
343  const int *GetFieldAsIntegerList( int i, int *pnCount );
344  const GIntBig *GetFieldAsInteger64List( int i, int *pnCount );
345  const double *GetFieldAsDoubleList( int i, int *pnCount );
346  char **GetFieldAsStringList( int i );
347  GByte *GetFieldAsBinary( int i, int *pnCount );
348  int GetFieldAsDateTime( int i,
349  int *pnYear, int *pnMonth,
350  int *pnDay,
351  int *pnHour, int *pnMinute,
352  int *pnSecond,
353  int *pnTZFlag );
354  int GetFieldAsDateTime( int i,
355  int *pnYear, int *pnMonth,
356  int *pnDay,
357  int *pnHour, int *pnMinute,
358  float *pfSecond,
359  int *pnTZFlag );
360  char *GetFieldAsSerializedJSon( int i );
361 
362  int GetFieldAsInteger( const char *pszFName )
363  { return GetFieldAsInteger( GetFieldIndex(pszFName) ); }
364  GIntBig GetFieldAsInteger64( const char *pszFName )
365  { return GetFieldAsInteger64( GetFieldIndex(pszFName) ); }
366  double GetFieldAsDouble( const char *pszFName )
367  { return GetFieldAsDouble( GetFieldIndex(pszFName) ); }
368  const char *GetFieldAsString( const char *pszFName )
369  { return GetFieldAsString( GetFieldIndex(pszFName) ); }
370  const int *GetFieldAsIntegerList( const char *pszFName,
371  int *pnCount )
372  { return GetFieldAsIntegerList( GetFieldIndex(pszFName),
373  pnCount ); }
374  const GIntBig *GetFieldAsInteger64List( const char *pszFName,
375  int *pnCount )
376  { return GetFieldAsInteger64List( GetFieldIndex(pszFName),
377  pnCount ); }
378  const double *GetFieldAsDoubleList( const char *pszFName,
379  int *pnCount )
380  { return GetFieldAsDoubleList( GetFieldIndex(pszFName),
381  pnCount ); }
382  char **GetFieldAsStringList( const char *pszFName )
383  { return GetFieldAsStringList(GetFieldIndex(pszFName)); }
384 
385  void SetField( int i, int nValue );
386  void SetField( int i, GIntBig nValue );
387  void SetField( int i, double dfValue );
388  void SetField( int i, const char * pszValue );
389  void SetField( int i, int nCount, int * panValues );
390  void SetField( int i, int nCount,
391  const GIntBig * panValues );
392  void SetField( int i, int nCount, double * padfValues );
393  void SetField( int i, char ** papszValues );
394  void SetField( int i, OGRField * puValue );
395  void SetField( int i, int nCount, GByte * pabyBinary );
396  void SetField( int i, int nYear, int nMonth, int nDay,
397  int nHour=0, int nMinute=0, float fSecond=0.f,
398  int nTZFlag = 0 );
399 
400  void SetField( const char *pszFName, int nValue )
401  { SetField( GetFieldIndex(pszFName), nValue ); }
402  void SetField( const char *pszFName, GIntBig nValue )
403  { SetField( GetFieldIndex(pszFName), nValue ); }
404  void SetField( const char *pszFName, double dfValue )
405  { SetField( GetFieldIndex(pszFName), dfValue ); }
406  void SetField( const char *pszFName, const char * pszValue )
407  { SetField( GetFieldIndex(pszFName), pszValue ); }
408  void SetField( const char *pszFName, int nCount,
409  int * panValues )
410  { SetField(GetFieldIndex(pszFName),nCount,panValues); }
411  void SetField( const char *pszFName, int nCount,
412  const GIntBig * panValues )
413  { SetField(GetFieldIndex(pszFName),nCount,panValues); }
414  void SetField( const char *pszFName, int nCount,
415  double * padfValues )
416  {SetField(GetFieldIndex(pszFName),nCount,padfValues); }
417  void SetField( const char *pszFName, char ** papszValues )
418  { SetField( GetFieldIndex(pszFName), papszValues); }
419  void SetField( const char *pszFName, OGRField * puValue )
420  { SetField( GetFieldIndex(pszFName), puValue ); }
421  void SetField( const char *pszFName,
422  int nYear, int nMonth, int nDay,
423  int nHour=0, int nMinute=0, float fSecond=0.f,
424  int nTZFlag = 0 )
425  { SetField( GetFieldIndex(pszFName),
426  nYear, nMonth, nDay,
427  nHour, nMinute, fSecond, nTZFlag ); }
428 
429  GIntBig GetFID() const { return nFID; }
430  virtual OGRErr SetFID( GIntBig nFIDIn );
431 
432  void DumpReadable( FILE *, char** papszOptions = NULL );
433 
434  OGRErr SetFrom( OGRFeature *, int = TRUE );
435  OGRErr SetFrom( OGRFeature *, int *, int = TRUE );
436  OGRErr SetFieldsFrom( OGRFeature *, int *, int = TRUE );
437 
439  OGRErr RemapFields( OGRFeatureDefn *poNewDefn,
440  int *panRemapSource );
441  OGRErr RemapGeomFields( OGRFeatureDefn *poNewDefn,
442  int *panRemapSource );
444 
445  int Validate( int nValidateFlags,
446  int bEmitError );
447  void FillUnsetWithDefault( int bNotNullableOnly,
448  char** papszOptions );
449 
450  virtual const char *GetStyleString();
451  virtual void SetStyleString( const char * );
452  virtual void SetStyleStringDirectly( char * );
453 
457  virtual OGRStyleTable *GetStyleTable() { return m_poStyleTable; }
458  virtual void SetStyleTable( OGRStyleTable *poStyleTable );
459  virtual void SetStyleTableDirectly( OGRStyleTable *poStyleTable );
460 
461  const char *GetNativeData() const { return m_pszNativeData; }
462  const char *GetNativeMediaType() const
463  { return m_pszNativeMediaType; }
464  void SetNativeData( const char* pszNativeData );
465  void SetNativeMediaType( const char* pszNativeMediaType );
466 
467  static OGRFeature *CreateFeature( OGRFeatureDefn * );
468  static void DestroyFeature( OGRFeature * );
469 
470  private:
472 };
473 
474 /************************************************************************/
475 /* OGRFeatureQuery */
476 /************************************************************************/
477 
479 class OGRLayer;
480 class swq_expr_node;
481 class swq_custom_func_registrar;
482 
483 class CPL_DLL OGRFeatureQuery
484 {
485  private:
486  OGRFeatureDefn *poTargetDefn;
487  void *pSWQExpr;
488 
489  char **FieldCollector( void *, char ** );
490 
491  GIntBig *EvaluateAgainstIndices( swq_expr_node*, OGRLayer *,
492  GIntBig& nFIDCount );
493 
494  int CanUseIndex( swq_expr_node*, OGRLayer * );
495 
496  public:
497  OGRFeatureQuery();
498  ~OGRFeatureQuery();
499 
500  OGRErr Compile( OGRFeatureDefn *, const char *,
501  int bCheck = TRUE,
502  swq_custom_func_registrar*
503  poCustomFuncRegistrar = NULL );
504  int Evaluate( OGRFeature * );
505 
506  GIntBig *EvaluateAgainstIndices( OGRLayer *, OGRErr * );
507 
508  int CanUseIndex( OGRLayer * );
509 
510  char **GetUsedFields();
511 
512  void *GetSWQExpr() { return pSWQExpr; }
513 };
515 
516 #endif /* ndef OGR_FEATURE_H_INCLUDED */
OGRFieldSubType GetSubType() const
Fetch subtype of this field.
Definition: ogr_feature.h:89
int GetReferenceCount()
Fetch current reference count.
Definition: ogr_feature.h:253
OGRFieldSubType
List of field subtypes.
Definition: ogr_core.h:638
OGRJustification GetJustify() const
Get the justification for this field.
Definition: ogr_feature.h:93
int GetFieldAsInteger(const char *pszFName)
Fetch field value as integer.
Definition: ogr_feature.h:362
void SetField(const char *pszFName, double dfValue)
Set field to double value.
Definition: ogr_feature.h:404
OGRField * GetRawFieldRef(int i)
Fetch a pointer to the internal field value given the index.
Definition: ogr_feature.h:337
int IsIgnored() const
Return whether this field should be omitted when fetching features.
Definition: ogr_feature.h:170
const char * GetNameRef()
Fetch name of this field.
Definition: ogr_feature.h:162
void SetNullable(int bNullableIn)
Set whether this geometry field can receive null values.
Definition: ogr_feature.h:174
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:141
virtual int IsStyleIgnored() const
Determine whether the style can be omitted when fetching features.
Definition: ogr_feature.h:258
virtual int GetGeomFieldCount()
Fetch number of geometry fields on this feature.
Definition: ogrfeaturedefn.cpp:583
virtual void SetStyleIgnored(int bIgnore)
Set whether the style can be omitted when fetching features.
Definition: ogr_feature.h:259
void SetField(const char *pszFName, OGRField *puValue)
Set field.
Definition: ogr_feature.h:419
const int * GetFieldAsIntegerList(const char *pszFName, int *pnCount)
Fetch field value as a list of integers.
Definition: ogr_feature.h:370
int OGRBoolean
Type for a OGR boolean.
Definition: ogr_core.h:327
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:207
int GetFieldIndex(const char *pszName)
Fetch the field index given field name.
Definition: ogr_feature.h:330
int GetWidth() const
Get the formatting width for this field.
Definition: ogr_feature.h:97
Definition of a feature class or feature layer.
Definition: ogr_feature.h:207
const GIntBig * GetFieldAsInteger64List(const char *pszFName, int *pnCount)
Fetch field value as a list of 64 bit integers.
Definition: ogr_feature.h:374
void SetField(const char *pszFName, char **papszValues)
Set field to list of strings value.
Definition: ogr_feature.h:417
OGRFieldType GetType() const
Fetch type of this field.
Definition: ogr_feature.h:85
virtual int GetGeomFieldIndex(const char *)
Find geometry field by name.
Definition: ogrfeaturedefn.cpp:842
double GetFieldAsDouble(const char *pszFName)
Fetch field value as a double.
Definition: ogr_feature.h:366
Simple feature style classes.
void SetField(const char *pszFName, int nValue)
Set field to integer value.
Definition: ogr_feature.h:400
int GetPrecision() const
Get the formatting precision for this field.
Definition: ogr_feature.h:100
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:62
const char * GetNameRef()
Fetch name of this field.
Definition: ogr_feature.h:83
virtual OGRStyleTable * GetStyleTable()
Return style table.
Definition: ogr_feature.h:457
#define MAX(a, b)
Macro to compute the maximum of 2 values.
Definition: cpl_port.h:460
GIntBig GetFieldAsInteger64(const char *pszFName)
Fetch field value as integer 64 bit.
Definition: ogr_feature.h:364
GIntBig GetFID() const
Get feature identifier.
Definition: ogr_feature.h:429
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:338
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition: ogr_feature.h:462
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition: ogrfeaturedefn.cpp:632
void SetPrecision(int nPrecisionIn)
Set the formatting precision for this field in characters.
Definition: ogr_feature.h:101
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:118
OGRwkbGeometryType GetType() const
Fetch geometry type of this field.
Definition: ogr_feature.h:164
int IsNullable() const
Return whether this field can receive null values.
Definition: ogr_feature.h:114
void SetWidth(int nWidthIn)
Set the formatting width for this field in characters.
Definition: ogr_feature.h:98
OGRJustification
Display justification for field values.
Definition: ogr_core.h:654
const double * GetFieldAsDoubleList(const char *pszFName, int *pnCount)
Fetch field value as a list of doubles.
Definition: ogr_feature.h:378
void SetField(const char *pszFName, int nCount, const GIntBig *panValues)
Set field to list of 64 bit integers value.
Definition: ogr_feature.h:411
int Reference()
Increments the reference count by one.
Definition: ogr_feature.h:251
OGRFieldType
List of feature field types.
Definition: ogr_core.h:610
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:132
int GetGeomFieldIndex(const char *pszName)
Fetch the geometry field index given geometry field name.
Definition: ogr_feature.h:314
void SetField(const char *pszFName, GIntBig nValue)
Set field to 64 bit integer value.
Definition: ogr_feature.h:402
int Dereference()
Decrements the reference count by one.
Definition: ogr_feature.h:252
OGRFeature field attribute value union.
Definition: ogr_core.h:674
void SetField(const char *pszFName, int nCount, double *padfValues)
Set field to list of doubles value.
Definition: ogr_feature.h:414
void SetIgnored(int bIgnoreIn)
Set whether this field should be omitted when fetching features.
Definition: ogr_feature.h:171
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:68
int IsIgnored() const
Return whether this field should be omitted when fetching features.
Definition: ogr_feature.h:111
char ** GetFieldAsStringList(const char *pszFName)
Fetch field value as a list of strings.
Definition: ogr_feature.h:382
OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField)
Fetch definition for this geometry field.
Definition: ogr_feature.h:312
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:279
virtual int GetFieldCount()
Fetch number of fields on this feature.
Definition: ogrfeaturedefn.cpp:270
virtual OGRFieldDefn * GetFieldDefn(int i)
Fetch field definition.
Definition: ogrfeaturedefn.cpp:317
This class represents a style table.
Definition: ogr_featurestyle.h:83
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:250
void SetField(const char *pszFName, const char *pszValue)
Set field to string value.
Definition: ogr_feature.h:406
OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition: ogr_feature.h:328
const char * GetNativeData() const
Returns the native data for the feature.
Definition: ogr_feature.h:461
Simple feature geometry classes.
void SetJustify(OGRJustification eJustifyIn)
Set the justification for this field.
Definition: ogr_feature.h:94
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:311
int IsNullable() const
Return whether this geometry field can receive null values.
Definition: ogr_feature.h:173
OGRFeatureDefn * GetDefnRef()
Fetch feature definition.
Definition: ogr_feature.h:303
void SetField(const char *pszFName, int nCount, int *panValues)
Set field to list of integers value.
Definition: ogr_feature.h:408
void SetField(const char *pszFName, int nYear, int nMonth, int nDay, int nHour=0, int nMinute=0, float fSecond=0.f, int nTZFlag=0)
Set field to date.
Definition: ogr_feature.h:421
virtual int GetFieldIndex(const char *)
Find field by name.
Definition: ogrfeaturedefn.cpp:1144
void SetIgnored(int bIgnoreIn)
Set whether this field should be omitted when fetching features.
Definition: ogr_feature.h:112
const char * GetFieldAsString(const char *pszFName)
Fetch field value as a string.
Definition: ogr_feature.h:368
#define CPL_DISALLOW_COPY_ASSIGN(ClassName)
Helper to remove the copy and assignment constructors so that the compiler will not generate the defa...
Definition: cpl_port.h:1078
void SetNullable(int bNullableIn)
Set whether this field can receive null values.
Definition: ogr_feature.h:115
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:992

Generated for GDAL by doxygen 1.8.8.