31#ifndef OGR_FEATURE_H_INCLUDED
32#define OGR_FEATURE_H_INCLUDED
34#include "cpl_atomic_ops.h"
49#ifndef DEFINE_OGRFeatureH
51#define DEFINE_OGRFeatureH
102 char *pszAlternativeName;
115 std::string m_osDomainName{};
125 void SetAlternativeName(
const char * );
138 { eJustify = eJustifyIn; }
145 { nPrecision = nPrecisionIn; }
150 void SetDefault(
const char* );
151 const char *GetDefault()
const;
152 int IsDefaultDriverSpecific()
const;
161 void SetUnique(
int bUniqueIn ) { bUnique = bUniqueIn; }
164 void SetDomainName(
const std::string& osDomainName) { m_osDomainName = osDomainName; }
205 char *pszName =
nullptr;
210 mutable int bNullable =
true;
235 { bNullable = bNullableIn; }
282 volatile int nRefCount = 0;
284 mutable std::vector<std::unique_ptr<OGRFieldDefn>> apoFieldDefn{};
285 mutable std::vector<std::unique_ptr<OGRGeomFieldDefn>> apoGeomFieldDefn{};
287 char *pszFeatureClassName =
nullptr;
289 bool bIgnoreStyle =
false;
296 void SetName(
const char* pszName );
297 virtual const char *
GetName()
const;
328 virtual int IsGeometryIgnored()
const;
329 virtual void SetGeometryIgnored(
int bIgnore );
332 { bIgnoreStyle = bIgnore; }
334 virtual int IsSame(
const OGRFeatureDefn * poOtherFeatureDefn )
const;
337 void ReserveSpaceForFields(
int nFieldCountIn);
340 std::vector<int> ComputeMapForSetFrom(
const OGRFeatureDefn* poSrcFDefn,
341 bool bForgiving =
true )
const;
343 static OGRFeatureDefn *CreateFeatureDefn(
const char *pszName =
nullptr );
378 char *m_pszNativeData;
379 char *m_pszNativeMediaType;
381 bool SetFieldInternal(
int i,
OGRField * puValue );
385 mutable char *m_pszStyleString;
387 mutable char *m_pszTmpFieldValue;
397 class CPL_DLL FieldValue
399 friend class OGRFeature;
401 std::unique_ptr<Private> m_poPrivate;
403 FieldValue(OGRFeature* poFeature,
int iFieldIndex);
404 FieldValue(
const OGRFeature* poFeature,
int iFieldIndex);
405 FieldValue(
const FieldValue& oOther) =
delete;
413 FieldValue& operator= (
const FieldValue& oOther);
415 FieldValue& operator= (
int nVal);
417 FieldValue& operator= (
GIntBig nVal);
419 FieldValue& operator= (
double dfVal);
421 FieldValue& operator= (
const char *pszVal);
423 FieldValue& operator= (
const std::string& osVal);
425 FieldValue& operator= (
const std::vector<int>& oArray);
427 FieldValue& operator= (
const std::vector<GIntBig>& oArray);
429 FieldValue& operator= (
const std::vector<double>& oArray);
431 FieldValue& operator= (
const std::vector<std::string>& oArray);
441 void SetDateTime(
int nYear,
int nMonth,
int nDay,
442 int nHour=0,
int nMinute=0,
float fSecond=0.f,
446 int GetIndex()
const;
462 bool IsUnset()
const;
469 const OGRField *GetRawValue()
const;
496 bool GetDateTime(
int *pnYear,
int *pnMonth,
498 int *pnHour,
int *pnMinute,
500 int *pnTZFlag )
const;
522 int GetAsInteger()
const;
524 GIntBig GetAsInteger64()
const;
526 double GetAsDouble()
const;
528 const char* GetAsString()
const;
530 const std::vector<int>& GetAsIntegerList()
const;
532 const std::vector<GIntBig>& GetAsInteger64List()
const;
534 const std::vector<double>& GetAsDoubleList()
const;
536 const std::vector<std::string>& GetAsStringList()
const;
540 class CPL_DLL ConstFieldIterator
542 friend class OGRFeature;
544 std::unique_ptr<Private> m_poPrivate;
546 ConstFieldIterator(
const OGRFeature* poSelf,
int nPos);
550 ConstFieldIterator(ConstFieldIterator&& oOther)
noexcept;
551 ~ConstFieldIterator();
553 ConstFieldIterator& operator++();
554 bool operator!=(
const ConstFieldIterator& it)
const;
597 {
return poDefn->GetGeomFieldCount(); }
599 {
return poDefn->GetGeomFieldDefn(iField); }
601 {
return poDefn->GetGeomFieldDefn(iField); }
603 {
return poDefn->GetGeomFieldIndex(pszName); }
606 const OGRGeometry* GetGeomFieldRef(
int iField )
const;
608 OGRGeometry* GetGeomFieldRef(
const char* pszFName );
609 const OGRGeometry* GetGeomFieldRef(
const char* pszFName )
const;
617 {
return poDefn->GetFieldCount(); }
619 {
return poDefn->GetFieldDefn(iField); }
621 {
return poDefn->GetFieldDefn(iField); }
623 {
return poDefn->GetFieldIndex(pszName); }
625 int IsFieldSet(
int iField )
const;
627 void UnsetField(
int iField );
629 bool IsFieldNull(
int iField )
const;
631 void SetFieldNull(
int iField );
633 bool IsFieldSetAndNotNull(
int iField )
const;
638 int GetFieldAsInteger(
int i )
const;
639 GIntBig GetFieldAsInteger64(
int i )
const;
640 double GetFieldAsDouble(
int i )
const;
641 const char *GetFieldAsString(
int i )
const;
642 const int *GetFieldAsIntegerList(
int i,
int *pnCount )
const;
643 const GIntBig *GetFieldAsInteger64List(
int i,
int *pnCount )
const;
644 const double *GetFieldAsDoubleList(
int i,
int *pnCount )
const;
645 char **GetFieldAsStringList(
int i )
const;
646 GByte *GetFieldAsBinary(
int i,
int *pnCount )
const;
647 int GetFieldAsDateTime(
int i,
648 int *pnYear,
int *pnMonth,
650 int *pnHour,
int *pnMinute,
652 int *pnTZFlag )
const;
653 int GetFieldAsDateTime(
int i,
654 int *pnYear,
int *pnMonth,
656 int *pnHour,
int *pnMinute,
658 int *pnTZFlag )
const;
659 char *GetFieldAsSerializedJSon(
int i )
const;
684 void SetField(
int i,
int nValue );
685 void SetField(
int i,
GIntBig nValue );
686 void SetField(
int i,
double dfValue );
687 void SetField(
int i,
const char * pszValue );
688 void SetField(
int i,
int nCount,
const int * panValues );
689 void SetField(
int i,
int nCount,
691 void SetField(
int i,
int nCount,
const double * padfValues );
692 void SetField(
int i,
const char *
const * papszValues );
693 void SetField(
int i,
OGRField * puValue );
694 void SetField(
int i,
int nCount,
const void * pabyBinary );
695 void SetField(
int i,
int nYear,
int nMonth,
int nDay,
696 int nHour=0,
int nMinute=0,
float fSecond=0.f,
703 void SetField(
const char *pszFName,
double dfValue )
705 void SetField(
const char *pszFName,
const char * pszValue )
708 const int * panValues )
714 const double * padfValues )
716 void SetField(
const char *pszFName,
const char *
const * papszValues )
721 int nYear,
int nMonth,
int nDay,
722 int nHour=0,
int nMinute=0,
float fSecond=0.f,
726 nHour, nMinute, fSecond, nTZFlag ); }
731 void DumpReadable( FILE *,
char** papszOptions =
nullptr )
const;
739 const int *panRemapSource );
742 const int *panRemapSource );
745 int Validate(
int nValidateFlags,
746 int bEmitError )
const;
747 void FillUnsetWithDefault(
int bNotNullableOnly,
748 char** papszOptions );
750 virtual const char *GetStyleString()
const;
751 virtual void SetStyleString(
const char * );
752 virtual void SetStyleStringDirectly(
char * );
759 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable );
763 {
return m_pszNativeMediaType; }
764 void SetNativeData(
const char* pszNativeData );
765 void SetNativeMediaType(
const char* pszNativeMediaType );
774 {
return reinterpret_cast<OGRFeatureH>(poFeature); }
780 {
return reinterpret_cast<OGRFeature*
>(hFeature); }
787struct CPL_DLL OGRFeatureUniquePtrDeleter
789 void operator()(OGRFeature*)
const;
839 std::string m_osName;
840 std::string m_osDescription;
848 const std::string& osDescription,
871 const std::string&
GetName()
const {
return m_osName; }
940 std::vector<OGRCodedValue> m_asValues{};
942 OGRCodedFieldDomain(
const OGRCodedFieldDomain&) =
delete;
943 OGRCodedFieldDomain& operator= (
const OGRCodedFieldDomain&) =
delete;
960 OGRCodedFieldDomain(
const std::string& osName,
961 const std::string& osDescription,
964 std::vector<OGRCodedValue>&& asValues);
966 ~OGRCodedFieldDomain()
override;
968 OGRCodedFieldDomain*
Clone()
const override;
985 bool m_bMinIsInclusive;
986 bool m_bMaxIsInclusive;
988 OGRRangeFieldDomain(
const OGRRangeFieldDomain&) =
delete;
989 OGRRangeFieldDomain& operator= (
const OGRRangeFieldDomain&) =
delete;
1016 OGRRangeFieldDomain(
const std::string& osName,
1017 const std::string& osDescription,
1021 bool bMinIsInclusive,
1023 bool bMaxIsInclusive);
1025 OGRRangeFieldDomain*
Clone()
const override {
1026 return new OGRRangeFieldDomain(m_osName, m_osDescription,
1027 m_eFieldType, m_eFieldSubType,
1028 m_sMin, m_bMinIsInclusive,
1029 m_sMax, m_bMaxIsInclusive);
1044 bIsInclusiveOut = m_bMinIsInclusive;
1060 bIsInclusiveOut = m_bMaxIsInclusive;
1072 std::string m_osGlob;
1074 OGRGlobFieldDomain(
const OGRGlobFieldDomain&) =
delete;
1075 OGRGlobFieldDomain& operator= (
const OGRGlobFieldDomain&) =
delete;
1088 OGRGlobFieldDomain(
const std::string& osName,
1089 const std::string& osDescription,
1092 const std::string& osBlob);
1094 OGRGlobFieldDomain*
Clone()
const override {
1095 return new OGRGlobFieldDomain(m_osName, m_osDescription,
1096 m_eFieldType, m_eFieldSubType,
1104 const std::string&
GetGlob()
const {
return m_osGlob; }
1114class swq_custom_func_registrar;
1116class CPL_DLL OGRFeatureQuery
1119 OGRFeatureDefn *poTargetDefn;
1122 char **FieldCollector(
void *,
char ** );
1124 GIntBig *EvaluateAgainstIndices( swq_expr_node*, OGRLayer *,
1127 int CanUseIndex( swq_expr_node*, OGRLayer * );
1129 OGRErr Compile( OGRLayer *, OGRFeatureDefn*,
const char *,
1131 swq_custom_func_registrar* poCustomFuncRegistrar );
1139 OGRErr Compile( OGRLayer *,
const char *,
1141 swq_custom_func_registrar*
1142 poCustomFuncRegistrar =
nullptr );
1143 OGRErr Compile( OGRFeatureDefn *,
const char *,
1145 swq_custom_func_registrar*
1146 poCustomFuncRegistrar =
nullptr );
1147 int Evaluate( OGRFeature * );
1151 int CanUseIndex( OGRLayer * );
1153 char **GetUsedFields();
1155 void *GetSWQExpr() {
return pSWQExpr; }
const OGRCodedValue * GetEnumeration() const
Get the enumeration as (code, value) pairs.
Definition ogr_feature.h:975
OGRCodedFieldDomain * Clone() const override
Clone.
Definition ogrfielddefn.cpp:1844
Definition of a feature class or feature layer.
Definition ogr_feature.h:279
int Reference()
Increments the reference count by one.
Definition ogr_feature.h:323
virtual OGRErr DeleteGeomFieldDefn(int iGeomField)
Delete an existing geometry field definition.
Definition ogrfeaturedefn.cpp:821
virtual OGRFeatureDefn * Clone() const
Create a copy of this feature definition.
Definition ogrfeaturedefn.cpp:178
virtual int GetFieldCount() const
Fetch number of fields on this feature.
Definition ogrfeaturedefn.cpp:269
virtual OGRFieldDefn * GetFieldDefn(int i)
Fetch field definition.
Definition ogrfeaturedefn.cpp:313
virtual void AddFieldDefn(const OGRFieldDefn *)
Add a new field definition.
Definition ogrfeaturedefn.cpp:414
int Dereference()
Decrements the reference count by one.
Definition ogr_feature.h:324
static OGRFeatureDefnH ToHandle(OGRFeatureDefn *poFeatureDefn)
Convert a OGRFeatureDefn* to a OGRFeatureDefnH.
Definition ogr_feature.h:349
virtual OGRErr ReorderFieldDefns(const int *panMap)
Reorder the field definitions in the array of the feature definition.
Definition ogrfeaturedefn.cpp:528
int GetFieldIndexCaseSensitive(const char *) const
Find field by name, in a case sensitive way.
Definition ogrfeaturedefn.cpp:1210
virtual void SetGeomType(OGRwkbGeometryType)
Assign the base geometry type for this layer.
Definition ogrfeaturedefn.cpp:1011
virtual bool IsStyleIgnored() const
Determine whether the style can be omitted when fetching features.
Definition ogr_feature.h:330
virtual void AddGeomFieldDefn(const OGRGeomFieldDefn *)
Add a new geometry field definition.
Definition ogrfeaturedefn.cpp:742
void SetName(const char *pszName)
Change name of this OGRFeatureDefn.
Definition ogrfeaturedefn.cpp:212
static OGRFeatureDefn * FromHandle(OGRFeatureDefnH hFeatureDefn)
Convert a OGRFeatureDefnH to a OGRFeatureDefn*.
Definition ogr_feature.h:355
virtual const char * GetName() const
Get name of this OGRFeatureDefn.
Definition ogrfeaturedefn.cpp:232
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition ogrfeaturedefn.cpp:642
virtual OGRwkbGeometryType GetGeomType() const
Fetch the geometry base type.
Definition ogrfeaturedefn.cpp:947
virtual void SetStyleIgnored(bool bIgnore)
Set whether the style can be omitted when fetching features.
Definition ogr_feature.h:331
virtual int GetGeomFieldCount() const
Fetch number of geometry fields on this feature.
Definition ogrfeaturedefn.cpp:593
virtual OGRErr DeleteFieldDefn(int iField)
Delete an existing field definition.
Definition ogrfeaturedefn.cpp:468
OGRFeatureDefn(const char *pszName=nullptr)
Constructor.
Definition ogrfeaturedefn.cpp:64
virtual int GetFieldIndex(const char *) const
Find field by name.
Definition ogrfeaturedefn.cpp:1182
int GetReferenceCount() const
Fetch current reference count.
Definition ogr_feature.h:325
virtual int GetGeomFieldIndex(const char *) const
Find geometry field by name.
Definition ogrfeaturedefn.cpp:879
Field value iterator class.
Definition ogr_feature.h:541
Exception raised by operator[](const char*) when a field is not found.
Definition ogr_feature.h:582
Field value.
Definition ogr_feature.h:398
const std::vector< std::string > & GetAsStringList() const
Return the field value as string list, with potential conversion.
Definition ogrfeature.cpp:7348
bool empty() const
Return whether the field value is unset/empty.
Definition ogr_feature.h:458
const std::vector< int > & GetAsIntegerList() const
Return the field value as integer list, with potential conversion.
Definition ogrfeature.cpp:7321
const char * GetAsString() const
Return the field value as string, with potential conversion.
Definition ogrfeature.cpp:7304
int GetInteger() const
Return the integer value.
Definition ogr_feature.h:475
bool IsUnset() const
Return whether the field value is unset/empty.
Definition ogrfeature.cpp:7276
OGRFieldType GetType() const
Return field type.
Definition ogr_feature.h:452
void Unset()
Unset the field.
Definition ogr_feature.h:439
double GetDouble() const
Return the double value.
Definition ogr_feature.h:487
const char * GetName() const
Return field name.
Definition ogr_feature.h:450
const std::vector< GIntBig > & GetAsInteger64List() const
Return the field value as 64-bit integer list, with potential conversion.
Definition ogrfeature.cpp:7330
int GetAsInteger() const
Return the field value as integer, with potential conversion.
Definition ogrfeature.cpp:7286
GIntBig GetInteger64() const
Return the 64-bit integer value.
Definition ogr_feature.h:481
void clear()
Unset the field.
Definition ogrfeature.cpp:7251
const std::vector< double > & GetAsDoubleList() const
Return the field value as double list, with potential conversion.
Definition ogrfeature.cpp:7339
const OGRFieldDefn * GetDefn() const
Return field definition.
Definition ogrfeature.cpp:7266
const OGRField * GetRawValue() const
Return the raw field value.
Definition ogrfeature.cpp:7271
OGRFieldSubType GetSubType() const
Return field subtype.
Definition ogr_feature.h:454
GIntBig GetAsInteger64() const
Return the field value as 64-bit integer, with potential conversion.
Definition ogrfeature.cpp:7292
const char * GetString() const
Return the string value.
Definition ogr_feature.h:493
double GetAsDouble() const
Return the field value as double, with potential conversion.
Definition ogrfeature.cpp:7298
void SetNull()
Set a null value to the field.
Definition ogrfeature.cpp:7246
A simple feature, including geometry and attributes.
Definition ogr_feature.h:371
OGRFeatureDefn * GetDefnRef()
Fetch feature definition.
Definition ogr_feature.h:587
void SetField(const char *pszFName, int nCount, const double *padfValues)
Set field to list of doubles value.
Definition ogr_feature.h:713
static OGRFeatureH ToHandle(OGRFeature *poFeature)
Convert a OGRFeature* to a OGRFeatureH.
Definition ogr_feature.h:773
const char * GetFieldAsString(const char *pszFName) const
Fetch field value as a string.
Definition ogr_feature.h:667
const GIntBig * GetFieldAsInteger64List(const char *pszFName, int *pnCount) const
Fetch field value as a list of 64 bit integers.
Definition ogr_feature.h:673
const double * GetFieldAsDoubleList(int i, int *pnCount) const
Fetch field value as a list of doubles.
Definition ogrfeature.cpp:2833
ConstFieldIterator end() const
Return end of field value iterator.
Definition ogrfeature.cpp:7077
void SetField(const char *pszFName, double dfValue)
Set field to double value.
Definition ogr_feature.h:703
ConstFieldIterator begin() const
Return begin of field value iterator.
Definition ogrfeature.cpp:7072
const double * GetFieldAsDoubleList(const char *pszFName, int *pnCount) const
Fetch field value as a list of doubles.
Definition ogr_feature.h:677
char ** GetFieldAsStringList(int i) const
Fetch field value as a list of strings.
Definition ogrfeature.cpp:2918
const OGRFeatureDefn * GetDefnRef() const
Fetch feature definition.
Definition ogr_feature.h:588
OGRFieldDefn * GetFieldDefnRef(int iField)
Fetch definition for this field.
Definition ogr_feature.h:620
int GetGeomFieldCount() const
Fetch number of geometry fields on this feature.
Definition ogr_feature.h:596
char ** GetFieldAsStringList(const char *pszFName) const
Fetch field value as a list of strings.
Definition ogr_feature.h:681
void SetField(int i, int nValue)
Set field to integer value.
Definition ogrfeature.cpp:3392
const OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition ogr_feature.h:618
double GetFieldAsDouble(const char *pszFName) const
Fetch field value as a double.
Definition ogr_feature.h:665
void SetField(const char *pszFName, int nValue)
Set field to integer value.
Definition ogr_feature.h:699
const int * GetFieldAsIntegerList(const char *pszFName, int *pnCount) const
Fetch field value as a list of integers.
Definition ogr_feature.h:669
int GetFieldCount() const
Fetch number of fields on this feature.
Definition ogr_feature.h:616
void SetField(const char *pszFName, OGRField *puValue)
Set field.
Definition ogr_feature.h:718
void SetField(const char *pszFName, int nCount, const GIntBig *panValues)
Set field to list of 64 bit integers value.
Definition ogr_feature.h:710
GIntBig GetFieldAsInteger64(int i) const
Fetch field value as integer 64 bit.
Definition ogrfeature.cpp:1998
const OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField) const
Fetch definition for this geometry field.
Definition ogr_feature.h:600
void SetField(const char *pszFName, const char *const *papszValues)
Set field to list of strings value.
Definition ogr_feature.h:716
void SetField(const char *pszFName, GIntBig nValue)
Set field to 64 bit integer value.
Definition ogr_feature.h:701
const int * GetFieldAsIntegerList(int i, int *pnCount) const
Fetch field value as a list of integers.
Definition ogrfeature.cpp:2664
const char * GetNativeData() const
Returns the native data for the feature.
Definition ogr_feature.h:761
int GetFieldAsInteger(const char *pszFName) const
Fetch field value as integer.
Definition ogr_feature.h:661
const char * GetFieldAsString(int i) const
Fetch field value as a string.
Definition ogrfeature.cpp:2298
int GetFieldIndex(const char *pszName) const
Fetch the field index given field name.
Definition ogr_feature.h:622
int GetFieldAsInteger(int i) const
Fetch field value as integer.
Definition ogrfeature.cpp:1859
void SetField(const char *pszFName, int nCount, const int *panValues)
Set field to list of integers value.
Definition ogr_feature.h:707
int GetGeomFieldIndex(const char *pszName) const
Fetch the geometry field index given geometry field name.
Definition ogr_feature.h:602
OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField)
Fetch definition for this geometry field.
Definition ogr_feature.h:598
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:720
GIntBig GetFieldAsInteger64(const char *pszFName) const
Fetch field value as integer 64 bit.
Definition ogr_feature.h:663
const OGRField * GetRawFieldRef(int i) const
Fetch a pointer to the internal field value given the index.
Definition ogr_feature.h:636
void SetField(const char *pszFName, const char *pszValue)
Set field to string value.
Definition ogr_feature.h:705
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition ogr_feature.h:762
OGRFeature(OGRFeatureDefn *)
Constructor.
Definition ogrfeature.cpp:79
GIntBig GetFID() const
Get feature identifier.
Definition ogr_feature.h:728
OGRField * GetRawFieldRef(int i)
Fetch a pointer to the internal field value given the index.
Definition ogr_feature.h:635
bool CopySelfTo(OGRFeature *poNew) const
Copies the innards of this OGRFeature into the supplied object.
Definition ogrfeature.cpp:1003
double GetFieldAsDouble(int i) const
Fetch field value as a double.
Definition ogrfeature.cpp:2116
const FieldValue operator[](int iField) const
Return a field value.
Definition ogrfeature.cpp:1719
virtual OGRStyleTable * GetStyleTable() const
Return style table.
Definition ogr_feature.h:757
static OGRFeature * FromHandle(OGRFeatureH hFeature)
Convert a OGRFeatureH to a OGRFeature*.
Definition ogr_feature.h:779
const GIntBig * GetFieldAsInteger64List(int i, int *pnCount) const
Fetch field value as a list of 64 bit integers.
Definition ogrfeature.cpp:2749
Definition of an attribute of an OGRFeatureDefn.
Definition ogr_feature.h:99
const char * GetNameRef() const
Fetch name of this field.
Definition ogr_feature.h:123
int IsNullable() const
Return whether this field can receive null values.
Definition ogr_feature.h:157
int IsUnique() const
Return whether this field has a unique constraint.
Definition ogr_feature.h:160
void SetName(const char *)
Reset the name of this field.
Definition ogrfielddefn.cpp:163
void SetUnique(int bUniqueIn)
Set whether this field has a unique constraint.
Definition ogr_feature.h:161
OGRFieldSubType GetSubType() const
Fetch subtype of this field.
Definition ogr_feature.h:132
OGRJustification GetJustify() const
Get the justification for this field.
Definition ogr_feature.h:136
void SetIgnored(int bIgnoreIn)
Set whether this field should be omitted when fetching features.
Definition ogr_feature.h:155
void SetDomainName(const std::string &osDomainName)
Set the name of the field domain for this field.
Definition ogr_feature.h:164
int GetPrecision() const
Get the formatting precision for this field.
Definition ogr_feature.h:143
OGRFieldType GetType() const
Fetch type of this field.
Definition ogr_feature.h:128
void SetWidth(int nWidthIn)
Set the formatting width for this field in characters.
Definition ogr_feature.h:141
int GetWidth() const
Get the formatting width for this field.
Definition ogr_feature.h:140
void SetPrecision(int nPrecisionIn)
Set the formatting precision for this field in characters.
Definition ogr_feature.h:144
void SetNullable(int bNullableIn)
Set whether this field can receive null values.
Definition ogr_feature.h:158
void SetJustify(OGRJustification eJustifyIn)
Set the justification for this field.
Definition ogr_feature.h:137
const char * GetAlternativeNameRef() const
Fetch the alternative name (or "alias") for this field.
Definition ogr_feature.h:126
static OGRFieldDefnH ToHandle(OGRFieldDefn *poFieldDefn)
Convert a OGRFieldDefn* to a OGRFieldDefnH.
Definition ogr_feature.h:171
const std::string & GetDomainName() const
Return the name of the field domain for this field.
Definition ogr_feature.h:163
int IsIgnored() const
Return whether this field should be omitted when fetching features.
Definition ogr_feature.h:154
static OGRFieldDefn * FromHandle(OGRFieldDefnH hFieldDefn)
Convert a OGRFieldDefnH to a OGRFieldDefn*.
Definition ogr_feature.h:177
OGRFieldDefn(const char *, OGRFieldType)
Constructor.
Definition ogrfielddefn.cpp:59
Definition of a field domain.
Definition ogr_feature.h:836
OGRFieldDomainMergePolicy GetMergePolicy() const
Get the merge policy.
Definition ogr_feature.h:922
void SetMergePolicy(OGRFieldDomainMergePolicy policy)
Set the merge policy.
Definition ogr_feature.h:928
static OGRFieldDomain * FromHandle(OGRFieldDomainH hFieldDomain)
Convert a OGRFieldDomainH to a OGRFieldDomain*.
Definition ogr_feature.h:903
virtual OGRFieldDomain * Clone() const =0
Clone.
OGRFieldSubType GetFieldSubType() const
Get the field subtype.
Definition ogr_feature.h:896
const std::string & GetName() const
Get the name of the field domain.
Definition ogr_feature.h:871
virtual ~OGRFieldDomain()=0
Destructor.
const std::string & GetDescription() const
Get the description of the field domain.
Definition ogr_feature.h:878
OGRFieldDomainSplitPolicy GetSplitPolicy() const
Get the split policy.
Definition ogr_feature.h:910
static OGRFieldDomainH ToHandle(OGRFieldDomain *poFieldDomain)
Convert a OGRFieldDomain* to a OGRFieldDomainH.
Definition ogr_feature.h:899
OGRFieldType GetFieldType() const
Get the field type.
Definition ogr_feature.h:890
OGRFieldDomainType GetDomainType() const
Get the type of the field domain.
Definition ogr_feature.h:884
void SetSplitPolicy(OGRFieldDomainSplitPolicy policy)
Set the split policy.
Definition ogr_feature.h:916
Definition of a geometry field of an OGRFeatureDefn.
Definition ogr_feature.h:202
void SetIgnored(int bIgnoreIn)
Set whether this field should be omitted when fetching features.
Definition ogr_feature.h:231
static OGRGeomFieldDefn * FromHandle(OGRGeomFieldDefnH hGeomFieldDefn)
Convert a OGRGeomFieldDefnH to a OGRGeomFieldDefn*.
Definition ogr_feature.h:248
int IsNullable() const
Return whether this geometry field can receive null values.
Definition ogr_feature.h:233
void SetNullable(int bNullableIn)
Set whether this geometry field can receive null values.
Definition ogr_feature.h:234
OGRwkbGeometryType GetType() const
Fetch geometry type of this field.
Definition ogr_feature.h:224
OGRGeomFieldDefn(const char *pszNameIn, OGRwkbGeometryType eGeomTypeIn)
Constructor.
Definition ogrgeomfielddefn.cpp:58
void SetName(const char *)
Reset the name of this field.
Definition ogrgeomfielddefn.cpp:177
int IsIgnored() const
Return whether this field should be omitted when fetching features.
Definition ogr_feature.h:230
static OGRGeomFieldDefnH ToHandle(OGRGeomFieldDefn *poGeomFieldDefn)
Convert a OGRGeomFieldDefn* to a OGRGeomFieldDefnH.
Definition ogr_feature.h:242
const char * GetNameRef() const
Fetch name of this field.
Definition ogr_feature.h:222
Abstract base class for all geometry classes.
Definition ogr_geometry.h:327
OGRGlobFieldDomain * Clone() const override
Clone.
Definition ogr_feature.h:1094
const std::string & GetGlob() const
Get the glob expression.
Definition ogr_feature.h:1104
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:71
OGRRangeFieldDomain * Clone() const override
Clone.
Definition ogr_feature.h:1025
const OGRField & GetMax(bool &bIsInclusiveOut) const
Get the maximum value.
Definition ogr_feature.h:1059
const OGRField & GetMin(bool &bIsInclusiveOut) const
Get the minimum value.
Definition ogr_feature.h:1043
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:158
This class represents a style table.
Definition ogr_featurestyle.h:85
#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:955
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1169
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition cpl_port.h:894
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:215
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:244
#define MAX(a, b)
Macro to compute the maximum of 2 values.
Definition cpl_port.h:406
void * OGRFieldDefnH
Opaque type for a field definition (OGRFieldDefn)
Definition ogr_api.h:331
void * OGRFeatureDefnH
Opaque type for a feature definition (OGRFeatureDefn)
Definition ogr_api.h:333
void * OGRFeatureH
Opaque type for a feature (OGRFeature)
Definition ogr_api.h:335
struct OGRFieldDomainHS * OGRFieldDomainH
Opaque type for a field domain definition (OGRFieldDomain)
Definition ogr_api.h:343
struct OGRGeomFieldDefnHS * OGRGeomFieldDefnH
Opaque type for a geometry field definition (OGRGeomFieldDefn)
Definition ogr_api.h:340
void * OGRStyleTableH
Opaque type for a style table (OGRStyleTable)
Definition ogr_api.h:337
int OGRBoolean
Type for a OGR boolean.
Definition ogr_core.h:357
OGRFieldSubType
List of field subtypes.
Definition ogr_core.h:697
OGRFieldDomainMergePolicy
Merge policy for field domains.
Definition ogr_core.h:1050
@ OFDMP_DEFAULT_VALUE
Default value.
Definition ogr_core.h:1052
OGRFieldDomainType
Type of field domain.
Definition ogr_core.h:1016
OGRJustification
Display justification for field values.
Definition ogr_core.h:721
OGRFieldType
List of feature field types.
Definition ogr_core.h:669
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:369
@ wkbUnknown
unknown type, non-standard
Definition ogr_core.h:370
int OGRErr
Type for a OGR error.
Definition ogr_core.h:341
OGRFieldDomainSplitPolicy
Split policy for field domains.
Definition ogr_core.h:1033
@ OFDSP_DEFAULT_VALUE
Default value.
Definition ogr_core.h:1035
std::unique_ptr< OGRFeature, OGRFeatureUniquePtrDeleter > OGRFeatureUniquePtr
Unique pointer type for OGRFeature.
Definition ogr_feature.h:796
void * OGRFieldDefnH
Opaque type for a field definition (OGRFieldDefn)
Definition ogr_feature.h:60
void * OGRFeatureDefnH
Opaque type for a feature definition (OGRFeatureDefn)
Definition ogr_feature.h:62
void * OGRFeatureH
Opaque type for a feature (OGRFeature)
Definition ogr_feature.h:64
struct OGRFieldDomainHS * OGRFieldDomainH
Opaque type for a field domain definition (OGRFieldDomain)
Definition ogr_feature.h:72
struct OGRGeomFieldDefnHS * OGRGeomFieldDefnH
Opaque type for a geometry field definition (OGRGeomFieldDefn)
Definition ogr_feature.h:69
Simple feature style classes.
Simple feature geometry classes.
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition ogrsf_frmts.h:287
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition ogrsf_frmts.h:292
Associates a code and a value.
Definition ogr_core.h:1003
OGRFeature field attribute value union.
Definition ogr_core.h:761