31#ifndef OGR_FEATURE_H_INCLUDED
32#define OGR_FEATURE_H_INCLUDED
34#include "cpl_atomic_ops.h"
51#ifndef DEFINE_OGRFeatureH
53#define DEFINE_OGRFeatureH
107 char *pszAlternativeName;
120 std::string m_osDomainName{};
127 void SetName(
const char *);
133 void SetAlternativeName(
const char *);
136 return pszAlternativeName;
159 eJustify = eJustifyIn;
168 nWidth =
MAX(0, nWidthIn);
177 nPrecision = nPrecisionIn;
183 void SetDefault(
const char *);
184 const char *GetDefault()
const;
185 int IsDefaultDriverSpecific()
const;
202 bNullable = bNullableIn;
216 return m_osDomainName;
220 m_osDomainName = osDomainName;
268 char *pszName =
nullptr;
274 mutable int bNullable =
true;
284 void SetName(
const char *);
314 bNullable = bNullableIn;
367 volatile int nRefCount = 0;
369 mutable std::vector<std::unique_ptr<OGRFieldDefn>> apoFieldDefn{};
370 mutable std::vector<std::unique_ptr<OGRGeomFieldDefn>> apoGeomFieldDefn{};
372 char *pszFeatureClassName =
nullptr;
374 bool bIgnoreStyle =
false;
381 void SetName(
const char *pszName);
382 virtual const char *GetName()
const;
384 virtual int GetFieldCount()
const;
387 virtual int GetFieldIndex(
const char *)
const;
388 int GetFieldIndexCaseSensitive(
const char *)
const;
393 int GetFieldCountUnsafe()
const
395 return static_cast<int>(apoFieldDefn.size());
401 if (apoFieldDefn.empty())
403 return apoFieldDefn[
static_cast<std::size_t
>(i)].get();
407 if (apoFieldDefn.empty())
409 return apoFieldDefn[
static_cast<std::size_t
>(i)].get();
414 virtual OGRErr DeleteFieldDefn(
int iField);
415 virtual OGRErr ReorderFieldDefns(
const int *panMap);
417 virtual int GetGeomFieldCount()
const;
420 virtual int GetGeomFieldIndex(
const char *)
const;
423 virtual void AddGeomFieldDefn(std::unique_ptr<OGRGeomFieldDefn> &&);
424 virtual OGRErr DeleteGeomFieldDefn(
int iGeomField);
433 return CPLAtomicInc(&nRefCount);
437 return CPLAtomicDec(&nRefCount);
445 virtual int IsGeometryIgnored()
const;
446 virtual void SetGeometryIgnored(
int bIgnore);
453 bIgnoreStyle = bIgnore;
456 virtual int IsSame(
const OGRFeatureDefn *poOtherFeatureDefn)
const;
459 void ReserveSpaceForFields(
int nFieldCountIn);
462 std::vector<int> ComputeMapForSetFrom(
const OGRFeatureDefn *poSrcFDefn,
463 bool bForgiving =
true)
const;
465 static OGRFeatureDefn *CreateFeatureDefn(
const char *pszName =
nullptr);
503 char *m_pszNativeData;
504 char *m_pszNativeMediaType;
506 bool SetFieldInternal(
int i,
const OGRField *puValue);
510 mutable char *m_pszStyleString;
512 mutable char *m_pszTmpFieldValue;
526 std::unique_ptr<Private> m_poPrivate;
551 FieldValue &operator=(
const std::string &osVal);
553 FieldValue &operator=(
const std::vector<int> &oArray);
555 FieldValue &operator=(
const std::vector<GIntBig> &oArray);
557 FieldValue &operator=(
const std::vector<double> &oArray);
559 FieldValue &operator=(
const std::vector<std::string> &oArray);
572 void SetDateTime(
int nYear,
int nMonth,
int nDay,
int nHour = 0,
573 int nMinute = 0,
float fSecond = 0.f,
int nTZFlag = 0);
576 int GetIndex()
const;
582 return GetDefn()->GetNameRef();
587 return GetDefn()->GetType();
592 return GetDefn()->GetSubType();
604 bool IsUnset()
const;
611 const OGRField *GetRawValue()
const;
619 return GetRawValue()->Integer;
628 return GetRawValue()->Integer64;
637 return GetRawValue()->Real;
646 return GetRawValue()->String;
650 bool GetDateTime(
int *pnYear,
int *pnMonth,
int *pnDay,
int *pnHour,
651 int *pnMinute,
float *pfSecond,
int *pnTZFlag)
const;
656 return GetAsInteger();
662 return GetAsInteger64();
665 operator double()
const
667 return GetAsDouble();
670 operator const char *()
const
672 return GetAsString();
675 operator const std::vector<int> &()
const
677 return GetAsIntegerList();
681 operator const std::vector<GIntBig> &()
const
683 return GetAsInteger64List();
686 operator const std::vector<double> &()
const
688 return GetAsDoubleList();
691 operator const std::vector<std::string> &()
const
693 return GetAsStringList();
699 int GetAsInteger()
const;
702 GIntBig GetAsInteger64()
const;
704 double GetAsDouble()
const;
706 const char *GetAsString()
const;
708 const std::vector<int> &GetAsIntegerList()
const;
711 const std::vector<GIntBig> &GetAsInteger64List()
const;
713 const std::vector<double> &GetAsDoubleList()
const;
715 const std::vector<std::string> &GetAsStringList()
const;
723 std::unique_ptr<Private> m_poPrivate;
760 const FieldValue operator[](
int iField)
const;
769 const FieldValue operator[](
const char *pszFieldName)
const;
770 FieldValue operator[](
const char *pszFieldName);
791 int GetGeomFieldCount()
const
809 const OGRGeometry *GetGeomFieldRef(
int iField)
const;
811 OGRGeometry *GetGeomFieldRef(
const char *pszFName);
812 const OGRGeometry *GetGeomFieldRef(
const char *pszFName)
const;
821 int GetFieldCount()
const
838 int IsFieldSet(
int iField)
const;
840 void UnsetField(
int iField);
842 bool IsFieldNull(
int iField)
const;
844 void SetFieldNull(
int iField);
846 bool IsFieldSetAndNotNull(
int iField)
const;
850 return pauFields + i;
854 return pauFields + i;
857 int GetFieldAsInteger(
int i)
const;
858 GIntBig GetFieldAsInteger64(
int i)
const;
859 double GetFieldAsDouble(
int i)
const;
860 const char *GetFieldAsString(
int i)
const;
861 const int *GetFieldAsIntegerList(
int i,
int *pnCount)
const;
862 const GIntBig *GetFieldAsInteger64List(
int i,
int *pnCount)
const;
863 const double *GetFieldAsDoubleList(
int i,
int *pnCount)
const;
864 char **GetFieldAsStringList(
int i)
const;
865 GByte *GetFieldAsBinary(
int i,
int *pnCount)
const;
866 int GetFieldAsDateTime(
int i,
int *pnYear,
int *pnMonth,
int *pnDay,
867 int *pnHour,
int *pnMinute,
int *pnSecond,
868 int *pnTZFlag)
const;
869 int GetFieldAsDateTime(
int i,
int *pnYear,
int *pnMonth,
int *pnDay,
870 int *pnHour,
int *pnMinute,
float *pfSecond,
871 int *pnTZFlag)
const;
872 char *GetFieldAsSerializedJSon(
int i)
const;
875 bool IsFieldSetUnsafe(
int i)
const
881 bool IsFieldNullUnsafe(
int i)
const
887 bool IsFieldSetAndNotNullUnsafe(
int i)
const
889 return IsFieldSetUnsafe(i) && !IsFieldNullUnsafe(i);
893 int GetFieldAsIntegerUnsafe(
int i)
const
895 return pauFields[i].Integer;
897 GIntBig GetFieldAsInteger64Unsafe(
int i)
const
899 return pauFields[i].Integer64;
901 double GetFieldAsDoubleUnsafe(
int i)
const
903 return pauFields[i].Real;
905 const char *GetFieldAsStringUnsafe(
int i)
const
907 return pauFields[i].String;
913 return GetFieldAsInteger(GetFieldIndex(pszFName));
917 return GetFieldAsInteger64(GetFieldIndex(pszFName));
921 return GetFieldAsDouble(GetFieldIndex(pszFName));
925 return GetFieldAsString(GetFieldIndex(pszFName));
929 return GetFieldAsIntegerList(GetFieldIndex(pszFName), pnCount);
934 return GetFieldAsInteger64List(GetFieldIndex(pszFName), pnCount);
938 return GetFieldAsDoubleList(GetFieldIndex(pszFName), pnCount);
942 return GetFieldAsStringList(GetFieldIndex(pszFName));
945 void SetField(
int i,
int nValue);
946 void SetField(
int i,
GIntBig nValue);
947 void SetField(
int i,
double dfValue);
948 void SetField(
int i,
const char *pszValue);
949 void SetField(
int i,
int nCount,
const int *panValues);
950 void SetField(
int i,
int nCount,
const GIntBig *panValues);
951 void SetField(
int i,
int nCount,
const double *padfValues);
952 void SetField(
int i,
const char *
const *papszValues);
953 void SetField(
int i,
const OGRField *puValue);
954 void SetField(
int i,
int nCount,
const void *pabyBinary);
955 void SetField(
int i,
int nYear,
int nMonth,
int nDay,
int nHour = 0,
956 int nMinute = 0,
float fSecond = 0.f,
int nTZFlag = 0);
961 void SetFieldSameTypeUnsafe(
int i,
int nValue)
963 pauFields[i].Integer = nValue;
964 pauFields[i].Set.nMarker2 = 0;
965 pauFields[i].Set.nMarker3 = 0;
967 void SetFieldSameTypeUnsafe(
int i,
GIntBig nValue)
969 pauFields[i].Integer64 = nValue;
971 void SetFieldSameTypeUnsafe(
int i,
double dfValue)
973 pauFields[i].Real = dfValue;
975 void SetFieldSameTypeUnsafe(
int i,
char *pszValueTransferred)
977 pauFields[i].String = pszValueTransferred;
983 SetField(GetFieldIndex(pszFName), nValue);
987 SetField(GetFieldIndex(pszFName), nValue);
989 void SetField(
const char *pszFName,
double dfValue)
991 SetField(GetFieldIndex(pszFName), dfValue);
993 void SetField(
const char *pszFName,
const char *pszValue)
995 SetField(GetFieldIndex(pszFName), pszValue);
997 void SetField(
const char *pszFName,
int nCount,
const int *panValues)
999 SetField(GetFieldIndex(pszFName), nCount, panValues);
1003 SetField(GetFieldIndex(pszFName), nCount, panValues);
1005 void SetField(
const char *pszFName,
int nCount,
const double *padfValues)
1007 SetField(GetFieldIndex(pszFName), nCount, padfValues);
1009 void SetField(
const char *pszFName,
const char *
const *papszValues)
1011 SetField(GetFieldIndex(pszFName), papszValues);
1015 SetField(GetFieldIndex(pszFName), puValue);
1017 void SetField(
const char *pszFName,
int nYear,
int nMonth,
int nDay,
1018 int nHour = 0,
int nMinute = 0,
float fSecond = 0.f,
1021 SetField(GetFieldIndex(pszFName), nYear, nMonth, nDay, nHour, nMinute,
1031 void DumpReadable(FILE *,
char **papszOptions =
nullptr)
const;
1041 const int *panRemapSource);
1044 int Validate(
int nValidateFlags,
int bEmitError)
const;
1045 void FillUnsetWithDefault(
int bNotNullableOnly,
char **papszOptions);
1047 virtual const char *GetStyleString()
const;
1048 virtual void SetStyleString(
const char *);
1049 virtual void SetStyleStringDirectly(
char *);
1056 return m_poStyleTable;
1059 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable);
1063 return m_pszNativeData;
1067 return m_pszNativeMediaType;
1069 void SetNativeData(
const char *pszNativeData);
1070 void SetNativeMediaType(
const char *pszNativeMediaType);
1088 return reinterpret_cast<OGRFeature *
>(hFeature);
1096struct CPL_DLL OGRFeatureUniquePtrDeleter
1105typedef std::unique_ptr<OGRFeature, OGRFeatureUniquePtrDeleter>
1112 return poFeature->
begin();
1117 return poFeature->
end();
1124 return poFeature->begin();
1129 return poFeature->end();
1164 std::string m_osName;
1165 std::string m_osDescription;
1172 OGRFieldDomain(
const std::string &osName,
const std::string &osDescription,
1206 return m_osDescription;
1215 return m_eDomainType;
1224 return m_eFieldType;
1233 return m_eFieldSubType;
1254 return m_eSplitPolicy;
1263 m_eSplitPolicy = policy;
1272 return m_eMergePolicy;
1281 m_eMergePolicy = policy;
1294 std::vector<OGRCodedValue> m_asValues{};
1316 const std::string &osDescription,
1318 std::vector<OGRCodedValue> &&asValues);
1331 return m_asValues.data();
1342 bool m_bMinIsInclusive;
1343 bool m_bMaxIsInclusive;
1377 const std::string &osDescription,
1379 const OGRField &sMin,
bool bMinIsInclusive,
1380 const OGRField &sMax,
bool bMaxIsInclusive);
1385 m_osName, m_osDescription, m_eFieldType, m_eFieldSubType, m_sMin,
1386 m_bMinIsInclusive, m_sMax, m_bMaxIsInclusive);
1387 poDomain->SetMergePolicy(m_eMergePolicy);
1388 poDomain->SetSplitPolicy(m_eSplitPolicy);
1407 bIsInclusiveOut = m_bMinIsInclusive;
1426 bIsInclusiveOut = m_bMaxIsInclusive;
1438 std::string m_osGlob;
1455 const std::string &osDescription,
1457 const std::string &osBlob);
1462 m_osName, m_osDescription, m_eFieldType, m_eFieldSubType, m_osGlob);
1463 poDomain->SetMergePolicy(m_eMergePolicy);
1464 poDomain->SetSplitPolicy(m_eSplitPolicy);
1485class swq_custom_func_registrar;
1487class CPL_DLL OGRFeatureQuery
1493 char **FieldCollector(
void *,
char **);
1498 int CanUseIndex(swq_expr_node *,
OGRLayer *);
1501 swq_custom_func_registrar *poCustomFuncRegistrar);
1510 swq_custom_func_registrar *poCustomFuncRegistrar =
nullptr);
1512 swq_custom_func_registrar *poCustomFuncRegistrar =
nullptr);
1519 char **GetUsedFields();
Definition of a coded / enumerated field domain.
Definition ogr_feature.h:1292
const OGRCodedValue * GetEnumeration() const
Get the enumeration as (code, value) pairs.
Definition ogr_feature.h:1329
Definition of a feature class or feature layer.
Definition ogr_feature.h:364
int Reference()
Increments the reference count by one.
Definition ogr_feature.h:431
virtual int GetFieldCount() const
Fetch number of fields on this feature.
Definition ogrfeaturedefn.cpp:268
virtual OGRFieldDefn * GetFieldDefn(int i)
Fetch field definition.
Definition ogrfeaturedefn.cpp:312
virtual bool IsStyleIgnored() const
Determine whether the style can be omitted when fetching features.
Definition ogr_feature.h:447
int Dereference()
Decrements the reference count by one.
Definition ogr_feature.h:435
static OGRFeatureDefnH ToHandle(OGRFeatureDefn *poFeatureDefn)
Convert a OGRFeatureDefn* to a OGRFeatureDefnH.
Definition ogr_feature.h:471
static OGRFeatureDefn * FromHandle(OGRFeatureDefnH hFeatureDefn)
Convert a OGRFeatureDefnH to a OGRFeatureDefn*.
Definition ogr_feature.h:479
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition ogrfeaturedefn.cpp:640
virtual int GetGeomFieldCount() const
Fetch number of geometry fields on this feature.
Definition ogrfeaturedefn.cpp:591
virtual int GetFieldIndex(const char *) const
Find field by name.
Definition ogrfeaturedefn.cpp:1177
int GetReferenceCount() const
Fetch current reference count.
Definition ogr_feature.h:439
virtual int GetGeomFieldIndex(const char *) const
Find geometry field by name.
Definition ogrfeaturedefn.cpp:875
virtual void SetStyleIgnored(bool bIgnore)
Set whether the style can be omitted when fetching features.
Definition ogr_feature.h:451
Field value iterator class.
Definition ogr_feature.h:720
Exception raised by operator[](const char*) when a field is not found.
Definition ogr_feature.h:766
Field value.
Definition ogr_feature.h:523
bool empty() const
Return whether the field value is unset/empty.
Definition ogr_feature.h:597
int GetInteger() const
Return the integer value.
Definition ogr_feature.h:617
OGRFieldType GetType() const
Return field type.
Definition ogr_feature.h:585
void Unset()
Unset the field.
Definition ogr_feature.h:567
double GetDouble() const
Return the double value.
Definition ogr_feature.h:635
const char * GetName() const
Return field name.
Definition ogr_feature.h:580
GIntBig GetInteger64() const
Return the 64-bit integer value.
Definition ogr_feature.h:626
OGRFieldSubType GetSubType() const
Return field subtype.
Definition ogr_feature.h:590
const char * GetString() const
Return the string value.
Definition ogr_feature.h:644
A simple feature, including geometry and attributes.
Definition ogr_feature.h:497
OGRFeatureDefn * GetDefnRef()
Fetch feature definition.
Definition ogr_feature.h:772
static OGRFeatureH ToHandle(OGRFeature *poFeature)
Convert a OGRFeature* to a OGRFeatureH.
Definition ogr_feature.h:1078
char ** GetFieldAsStringList(const char *pszFName) const
Fetch field value as a list of strings.
Definition ogr_feature.h:940
ConstFieldIterator end() const
Return end of field value iterator.
Definition ogrfeature.cpp:7212
ConstFieldIterator begin() const
Return begin of field value iterator.
Definition ogrfeature.cpp:7207
void SetField(const char *pszFName, int nCount, const GIntBig *panValues)
Set field to list of 64 bit integers value.
Definition ogr_feature.h:1001
const OGRFeatureDefn * GetDefnRef() const
Fetch feature definition.
Definition ogr_feature.h:776
OGRFieldDefn * GetFieldDefnRef(int iField)
Fetch definition for this field.
Definition ogr_feature.h:829
const double * GetFieldAsDoubleList(const char *pszFName, int *pnCount) const
Fetch field value as a list of doubles.
Definition ogr_feature.h:936
void SetField(const char *pszFName, int nCount, const int *panValues)
This method currently on has an effect of OFTIntegerList, OFTInteger64List and OFTRealList fields.
Definition ogr_feature.h:997
void SetField(const char *pszFName, GIntBig nValue)
Set field to 64 bit integer value.
Definition ogr_feature.h:985
void SetField(const char *pszFName, const char *pszValue)
Set field to string value.
Definition ogr_feature.h:993
void SetField(const char *pszFName, int nValue)
Set field to integer value.
Definition ogr_feature.h:981
const OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition ogr_feature.h:825
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:1017
const OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField) const
Fetch definition for this geometry field.
Definition ogr_feature.h:799
const char * GetNativeData() const
Returns the native data for the feature.
Definition ogr_feature.h:1061
int GetFieldIndex(const char *pszName) const
Fetch the field index given field name.
Definition ogr_feature.h:833
int GetGeomFieldIndex(const char *pszName) const
Fetch the geometry field index given geometry field name.
Definition ogr_feature.h:803
OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField)
Fetch definition for this geometry field.
Definition ogr_feature.h:795
GIntBig GetFieldAsInteger64(const char *pszFName) const
Fetch field value as integer 64 bit.
Definition ogr_feature.h:915
const int * GetFieldAsIntegerList(const char *pszFName, int *pnCount) const
Fetch field value as a list of integers.
Definition ogr_feature.h:927
void SetField(const char *pszFName, double dfValue)
Set field to double value.
Definition ogr_feature.h:989
const char * GetFieldAsString(const char *pszFName) const
Fetch field value as a string.
Definition ogr_feature.h:923
void SetField(const char *pszFName, const char *const *papszValues)
This method currently on has an effect of OFTStringList fields.
Definition ogr_feature.h:1009
const OGRField * GetRawFieldRef(int i) const
Fetch a pointer to the internal field value given the index.
Definition ogr_feature.h:852
int GetFieldAsInteger(const char *pszFName) const
Fetch field value as integer.
Definition ogr_feature.h:911
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition ogr_feature.h:1065
void SetField(const char *pszFName, const OGRField *puValue)
Set field.
Definition ogr_feature.h:1013
GIntBig GetFID() const
Get feature identifier.
Definition ogr_feature.h:1025
OGRField * GetRawFieldRef(int i)
Fetch a pointer to the internal field value given the index.
Definition ogr_feature.h:848
void SetField(const char *pszFName, int nCount, const double *padfValues)
This method currently on has an effect of OFTIntegerList, OFTInteger64List, OFTRealList fields.
Definition ogr_feature.h:1005
virtual OGRStyleTable * GetStyleTable() const
Return style table.
Definition ogr_feature.h:1054
double GetFieldAsDouble(const char *pszFName) const
Fetch field value as a double.
Definition ogr_feature.h:919
static OGRFeature * FromHandle(OGRFeatureH hFeature)
Convert a OGRFeatureH to a OGRFeature*.
Definition ogr_feature.h:1086
const GIntBig * GetFieldAsInteger64List(const char *pszFName, int *pnCount) const
Fetch field value as a list of 64 bit integers.
Definition ogr_feature.h:931
Definition of an attribute of an OGRFeatureDefn.
Definition ogr_feature.h:104
const char * GetNameRef() const
Fetch name of this field.
Definition ogr_feature.h:128
int IsNullable() const
Return whether this field can receive null values.
Definition ogr_feature.h:196
int IsUnique() const
Return whether this field has a unique constraint.
Definition ogr_feature.h:205
void SetUnique(int bUniqueIn)
Set whether this field has a unique constraint.
Definition ogr_feature.h:209
OGRFieldSubType GetSubType() const
Fetch subtype of this field.
Definition ogr_feature.h:146
OGRJustification GetJustify() const
Get the justification for this field.
Definition ogr_feature.h:153
void SetIgnored(int bIgnoreIn)
Set whether this field should be omitted when fetching features.
Definition ogr_feature.h:191
void SetDomainName(const std::string &osDomainName)
Set the name of the field domain for this field.
Definition ogr_feature.h:218
int GetPrecision() const
Get the formatting precision for this field.
Definition ogr_feature.h:171
OGRFieldType GetType() const
Fetch type of this field.
Definition ogr_feature.h:139
void SetWidth(int nWidthIn)
Set the formatting width for this field in characters.
Definition ogr_feature.h:166
int GetWidth() const
Get the formatting width for this field.
Definition ogr_feature.h:162
void SetPrecision(int nPrecisionIn)
Set the formatting precision for this field in characters.
Definition ogr_feature.h:175
void SetNullable(int bNullableIn)
Set whether this field can receive null values.
Definition ogr_feature.h:200
void SetJustify(OGRJustification eJustifyIn)
Set the justification for this field.
Definition ogr_feature.h:157
const char * GetAlternativeNameRef() const
Fetch the alternative name (or "alias") for this field.
Definition ogr_feature.h:134
static OGRFieldDefnH ToHandle(OGRFieldDefn *poFieldDefn)
Convert a OGRFieldDefn* to a OGRFieldDefnH.
Definition ogr_feature.h:228
const std::string & GetDomainName() const
Return the name of the field domain for this field.
Definition ogr_feature.h:214
int IsIgnored() const
Return whether this field should be omitted when fetching features.
Definition ogr_feature.h:187
static OGRFieldDefn * FromHandle(OGRFieldDefnH hFieldDefn)
Convert a OGRFieldDefnH to a OGRFieldDefn*.
Definition ogr_feature.h:236
Definition of a field domain.
Definition ogr_feature.h:1161
OGRFieldDomainMergePolicy GetMergePolicy() const
Get the merge policy.
Definition ogr_feature.h:1270
void SetMergePolicy(OGRFieldDomainMergePolicy policy)
Set the merge policy.
Definition ogr_feature.h:1279
static OGRFieldDomain * FromHandle(OGRFieldDomainH hFieldDomain)
Convert a OGRFieldDomainH to a OGRFieldDomain*.
Definition ogr_feature.h:1243
virtual OGRFieldDomain * Clone() const =0
Clone.
OGRFieldSubType GetFieldSubType() const
Get the field subtype.
Definition ogr_feature.h:1231
const std::string & GetName() const
Get the name of the field domain.
Definition ogr_feature.h:1194
virtual ~OGRFieldDomain()=0
Destructor.
const std::string & GetDescription() const
Get the description of the field domain.
Definition ogr_feature.h:1204
OGRFieldDomainSplitPolicy GetSplitPolicy() const
Get the split policy.
Definition ogr_feature.h:1252
static OGRFieldDomainH ToHandle(OGRFieldDomain *poFieldDomain)
Convert a OGRFieldDomain* to a OGRFieldDomainH.
Definition ogr_feature.h:1237
OGRFieldType GetFieldType() const
Get the field type.
Definition ogr_feature.h:1222
OGRFieldDomainType GetDomainType() const
Get the type of the field domain.
Definition ogr_feature.h:1213
void SetSplitPolicy(OGRFieldDomainSplitPolicy policy)
Set the split policy.
Definition ogr_feature.h:1261
Definition of a geometry field of an OGRFeatureDefn.
Definition ogr_feature.h:265
void SetIgnored(int bIgnoreIn)
Set whether this field should be omitted when fetching features.
Definition ogr_feature.h:303
static OGRGeomFieldDefn * FromHandle(OGRGeomFieldDefnH hGeomFieldDefn)
Convert a OGRGeomFieldDefnH to a OGRGeomFieldDefn*.
Definition ogr_feature.h:330
int IsNullable() const
Return whether this geometry field can receive null values.
Definition ogr_feature.h:308
void SetNullable(int bNullableIn)
Set whether this geometry field can receive null values.
Definition ogr_feature.h:312
OGRwkbGeometryType GetType() const
Fetch geometry type of this field.
Definition ogr_feature.h:290
int IsIgnored() const
Return whether this field should be omitted when fetching features.
Definition ogr_feature.h:299
static OGRGeomFieldDefnH ToHandle(OGRGeomFieldDefn *poGeomFieldDefn)
Convert a OGRGeomFieldDefn* to a OGRGeomFieldDefnH.
Definition ogr_feature.h:322
const char * GetNameRef() const
Fetch name of this field.
Definition ogr_feature.h:285
Abstract base class for all geometry classes.
Definition ogr_geometry.h:335
Definition of a field domain for field content validated by a glob.
Definition ogr_feature.h:1436
OGRGlobFieldDomain * Clone() const override
Clone.
Definition ogr_feature.h:1459
const std::string & GetGlob() const
Get the glob expression.
Definition ogr_feature.h:1472
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:73
Definition of a numeric field domain with a range of validity for values.
Definition ogr_feature.h:1338
OGRRangeFieldDomain * Clone() const override
Clone.
Definition ogr_feature.h:1382
const OGRField & GetMax(bool &bIsInclusiveOut) const
Get the maximum value.
Definition ogr_feature.h:1424
const OGRField & GetMin(bool &bIsInclusiveOut) const
Get the minimum value.
Definition ogr_feature.h:1405
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:167
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:1049
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1190
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition cpl_port.h:983
unsigned char GByte
Unsigned byte type.
Definition cpl_port.h:205
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:233
#define MAX(a, b)
Macro to compute the maximum of 2 values.
Definition cpl_port.h:392
#define OGRUnsetMarker
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a unset field.
Definition ogr_core.h:847
int OGRBoolean
Type for a OGR boolean.
Definition ogr_core.h:395
OGRFieldSubType
List of field subtypes.
Definition ogr_core.h:800
OGRFieldDomainMergePolicy
Merge policy for field domains.
Definition ogr_core.h:1232
@ OFDMP_DEFAULT_VALUE
Default value.
Definition ogr_core.h:1234
OGRFieldDomainType
Type of field domain.
Definition ogr_core.h:1197
OGRJustification
Display justification for field values.
Definition ogr_core.h:825
OGRFieldType
List of feature field types.
Definition ogr_core.h:772
#define OGRNullMarker
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a null field.
Definition ogr_core.h:855
OGRwkbGeometryType
List of well known binary geometry types.
Definition ogr_core.h:407
@ wkbUnknown
unknown type, non-standard
Definition ogr_core.h:408
int OGRErr
Type for a OGR error.
Definition ogr_core.h:378
OGRFieldDomainSplitPolicy
Split policy for field domains.
Definition ogr_core.h:1214
@ OFDSP_DEFAULT_VALUE
Default value.
Definition ogr_core.h:1216
std::unique_ptr< OGRFeature, OGRFeatureUniquePtrDeleter > OGRFeatureUniquePtr
Unique pointer type for OGRFeature.
Definition ogr_feature.h:1106
void * OGRFieldDefnH
Opaque type for a field definition (OGRFieldDefn)
Definition ogr_feature.h:62
void * OGRFeatureDefnH
Opaque type for a feature definition (OGRFeatureDefn)
Definition ogr_feature.h:64
void * OGRFeatureH
Opaque type for a feature (OGRFeature)
Definition ogr_feature.h:66
struct OGRFieldDomainHS * OGRFieldDomainH
Opaque type for a field domain definition (OGRFieldDomain)
Definition ogr_feature.h:74
struct OGRGeomFieldDefnHS * OGRGeomFieldDefnH
Opaque type for a geometry field definition (OGRGeomFieldDefn)
Definition ogr_feature.h:71
void * OGRStyleTableH
Opaque type for a style table (OGRStyleTable)
Definition ogr_feature.h:68
Simple feature style classes.
Simple feature geometry classes.
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition ogrsf_frmts.h:345
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition ogrsf_frmts.h:353
Associates a code and a value.
Definition ogr_core.h:1184
OGRFeature field attribute value union.
Definition ogr_core.h:866