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{};
122 void SetName(
const char * );
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;
221 void SetName(
const char * );
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;
299 virtual int GetFieldCount()
const;
301 virtual const OGRFieldDefn *GetFieldDefn(
int i )
const;
302 virtual int GetFieldIndex(
const char * )
const;
303 int GetFieldIndexCaseSensitive(
const char * )
const;
307 int GetFieldCountUnsafe()
const {
return static_cast<int>(apoFieldDefn.size()); }
310 OGRFieldDefn *GetFieldDefnUnsafe(
int i ) {
if( apoFieldDefn.empty() ) GetFieldDefn(i);
return apoFieldDefn[i].get(); }
311 const OGRFieldDefn *GetFieldDefnUnsafe(
int i )
const {
if( apoFieldDefn.empty() ) GetFieldDefn(i);
return apoFieldDefn[i].get(); }
315 virtual OGRErr DeleteFieldDefn(
int iField );
316 virtual OGRErr ReorderFieldDefns(
const int* panMap );
318 virtual int GetGeomFieldCount()
const;
321 virtual int GetGeomFieldIndex(
const char * )
const;
324 virtual void AddGeomFieldDefn( std::unique_ptr<OGRGeomFieldDefn>&& );
325 virtual OGRErr DeleteGeomFieldDefn(
int iGeomField );
337 virtual int IsGeometryIgnored()
const;
338 virtual void SetGeometryIgnored(
int bIgnore );
341 { bIgnoreStyle = bIgnore; }
343 virtual int IsSame(
const OGRFeatureDefn * poOtherFeatureDefn )
const;
346 void ReserveSpaceForFields(
int nFieldCountIn);
349 std::vector<int> ComputeMapForSetFrom(
const OGRFeatureDefn* poSrcFDefn,
350 bool bForgiving =
true )
const;
352 static OGRFeatureDefn *CreateFeatureDefn(
const char *pszName =
nullptr );
387 char *m_pszNativeData;
388 char *m_pszNativeMediaType;
390 bool SetFieldInternal(
int i,
const OGRField * puValue );
394 mutable char *m_pszStyleString;
396 mutable char *m_pszTmpFieldValue;
410 std::unique_ptr<Private> m_poPrivate;
432 FieldValue& operator= (
const std::string& osVal);
434 FieldValue& operator= (
const std::vector<int>& oArray);
436 FieldValue& operator= (
const std::vector<GIntBig>& oArray);
438 FieldValue& operator= (
const std::vector<double>& oArray);
440 FieldValue& operator= (
const std::vector<std::string>& oArray);
450 void SetDateTime(
int nYear,
int nMonth,
int nDay,
451 int nHour=0,
int nMinute=0,
float fSecond=0.f,
455 int GetIndex()
const;
459 const char*
GetName()
const {
return GetDefn()->GetNameRef(); }
467 bool empty()
const {
return IsUnset(); }
471 bool IsUnset()
const;
478 const OGRField *GetRawValue()
const;
496 double GetDouble()
const {
return GetRawValue()->Real; }
502 const char*
GetString()
const {
return GetRawValue()->String; }
505 bool GetDateTime(
int *pnYear,
int *pnMonth,
507 int *pnHour,
int *pnMinute,
509 int *pnTZFlag )
const;
512 operator int ()
const {
return GetAsInteger(); }
514 operator GIntBig()
const {
return GetAsInteger64(); }
516 operator double ()
const {
return GetAsDouble(); }
518 operator const char*()
const {
return GetAsString(); }
520 operator const std::vector<int>& ()
const {
return GetAsIntegerList(); }
522 operator const std::vector<GIntBig>& ()
const {
return GetAsInteger64List(); }
524 operator const std::vector<double>& ()
const {
return GetAsDoubleList(); }
526 operator const std::vector<std::string>& ()
const {
return GetAsStringList(); }
531 int GetAsInteger()
const;
533 GIntBig GetAsInteger64()
const;
535 double GetAsDouble()
const;
537 const char* GetAsString()
const;
539 const std::vector<int>& GetAsIntegerList()
const;
541 const std::vector<GIntBig>& GetAsInteger64List()
const;
543 const std::vector<double>& GetAsDoubleList()
const;
545 const std::vector<std::string>& GetAsStringList()
const;
553 std::unique_ptr<Private> m_poPrivate;
587 const FieldValue operator[](
int iField)
const;
593 const FieldValue operator[](
const char* pszFieldName)
const;
594 FieldValue operator[](
const char* pszFieldName);
609 int GetGeomFieldCount()
const
619 const OGRGeometry* GetGeomFieldRef(
int iField )
const;
621 OGRGeometry* GetGeomFieldRef(
const char* pszFName );
622 const OGRGeometry* GetGeomFieldRef(
const char* pszFName )
const;
631 int GetFieldCount()
const
640 int IsFieldSet(
int iField )
const;
642 void UnsetField(
int iField );
644 bool IsFieldNull(
int iField )
const;
646 void SetFieldNull(
int iField );
648 bool IsFieldSetAndNotNull(
int iField )
const;
653 int GetFieldAsInteger(
int i )
const;
654 GIntBig GetFieldAsInteger64(
int i )
const;
655 double GetFieldAsDouble(
int i )
const;
656 const char *GetFieldAsString(
int i )
const;
657 const int *GetFieldAsIntegerList(
int i,
int *pnCount )
const;
658 const GIntBig *GetFieldAsInteger64List(
int i,
int *pnCount )
const;
659 const double *GetFieldAsDoubleList(
int i,
int *pnCount )
const;
660 char **GetFieldAsStringList(
int i )
const;
661 GByte *GetFieldAsBinary(
int i,
int *pnCount )
const;
662 int GetFieldAsDateTime(
int i,
663 int *pnYear,
int *pnMonth,
665 int *pnHour,
int *pnMinute,
667 int *pnTZFlag )
const;
668 int GetFieldAsDateTime(
int i,
669 int *pnYear,
int *pnMonth,
671 int *pnHour,
int *pnMinute,
673 int *pnTZFlag )
const;
674 char *GetFieldAsSerializedJSon(
int i )
const;
677 bool IsFieldSetUnsafe(
int i )
const {
return !(pauFields[i].Set.nMarker1 ==
OGRUnsetMarker &&
680 bool IsFieldNullUnsafe(
int i )
const {
return (pauFields[i].Set.nMarker1 ==
OGRNullMarker &&
683 bool IsFieldSetAndNotNullUnsafe(
int i )
const {
return IsFieldSetUnsafe(i) && !IsFieldNullUnsafe(i); }
686 int GetFieldAsIntegerUnsafe(
int i )
const {
return pauFields[i].Integer; }
687 GIntBig GetFieldAsInteger64Unsafe(
int i )
const {
return pauFields[i].Integer64; }
688 double GetFieldAsDoubleUnsafe(
int i )
const {
return pauFields[i].Real; }
689 const char* GetFieldAsStringUnsafe(
int i)
const {
return pauFields[i].String; }
693 {
return GetFieldAsInteger( GetFieldIndex(pszFName) ); }
695 {
return GetFieldAsInteger64( GetFieldIndex(pszFName) ); }
697 {
return GetFieldAsDouble( GetFieldIndex(pszFName) ); }
699 {
return GetFieldAsString( GetFieldIndex(pszFName) ); }
702 {
return GetFieldAsIntegerList( GetFieldIndex(pszFName),
706 {
return GetFieldAsInteger64List( GetFieldIndex(pszFName),
710 {
return GetFieldAsDoubleList( GetFieldIndex(pszFName),
713 {
return GetFieldAsStringList(GetFieldIndex(pszFName)); }
715 void SetField(
int i,
int nValue );
716 void SetField(
int i,
GIntBig nValue );
717 void SetField(
int i,
double dfValue );
718 void SetField(
int i,
const char * pszValue );
719 void SetField(
int i,
int nCount,
const int * panValues );
720 void SetField(
int i,
int nCount,
722 void SetField(
int i,
int nCount,
const double * padfValues );
723 void SetField(
int i,
const char *
const * papszValues );
724 void SetField(
int i,
const OGRField * puValue );
725 void SetField(
int i,
int nCount,
const void * pabyBinary );
726 void SetField(
int i,
int nYear,
int nMonth,
int nDay,
727 int nHour=0,
int nMinute=0,
float fSecond=0.f,
733 void SetFieldSameTypeUnsafe(
int i,
int nValue ) {
734 pauFields[i].Integer = nValue; pauFields[i].Set.nMarker2 = 0; pauFields[i].Set.nMarker3 = 0; }
735 void SetFieldSameTypeUnsafe(
int i,
GIntBig nValue ) { pauFields[i].Integer64 = nValue; }
736 void SetFieldSameTypeUnsafe(
int i,
double dfValue ) { pauFields[i].Real = dfValue; }
737 void SetFieldSameTypeUnsafe(
int i,
char* pszValueTransfered ) { pauFields[i].String = pszValueTransfered; }
741 { SetField( GetFieldIndex(pszFName), nValue ); }
743 { SetField( GetFieldIndex(pszFName), nValue ); }
744 void SetField(
const char *pszFName,
double dfValue )
745 { SetField( GetFieldIndex(pszFName), dfValue ); }
746 void SetField(
const char *pszFName,
const char * pszValue )
747 { SetField( GetFieldIndex(pszFName), pszValue ); }
749 const int * panValues )
750 { SetField(GetFieldIndex(pszFName),nCount,panValues); }
753 { SetField(GetFieldIndex(pszFName),nCount,panValues); }
755 const double * padfValues )
756 {SetField(GetFieldIndex(pszFName),nCount,padfValues); }
757 void SetField(
const char *pszFName,
const char *
const * papszValues )
758 { SetField( GetFieldIndex(pszFName), papszValues); }
760 { SetField( GetFieldIndex(pszFName), puValue ); }
762 int nYear,
int nMonth,
int nDay,
763 int nHour=0,
int nMinute=0,
float fSecond=0.f,
765 { SetField( GetFieldIndex(pszFName),
767 nHour, nMinute, fSecond, nTZFlag ); }
772 void DumpReadable( FILE *,
char** papszOptions =
nullptr )
const;
780 const int *panRemapSource );
783 const int *panRemapSource );
786 int Validate(
int nValidateFlags,
787 int bEmitError )
const;
788 void FillUnsetWithDefault(
int bNotNullableOnly,
789 char** papszOptions );
791 virtual const char *GetStyleString()
const;
792 virtual void SetStyleString(
const char * );
793 virtual void SetStyleStringDirectly(
char * );
800 virtual void SetStyleTableDirectly(
OGRStyleTable *poStyleTable );
804 {
return m_pszNativeMediaType; }
805 void SetNativeData(
const char* pszNativeData );
806 void SetNativeMediaType(
const char* pszNativeMediaType );
815 {
return reinterpret_cast<OGRFeatureH>(poFeature); }
821 {
return reinterpret_cast<OGRFeature*
>(hFeature); }
828 struct CPL_DLL OGRFeatureUniquePtrDeleter
880 std::string m_osName;
881 std::string m_osDescription;
889 const std::string& osDescription,
912 const std::string&
GetName()
const {
return m_osName; }
981 std::vector<OGRCodedValue> m_asValues{};
1002 const std::string& osDescription,
1005 std::vector<OGRCodedValue>&& asValues);
1026 bool m_bMinIsInclusive;
1027 bool m_bMaxIsInclusive;
1058 const std::string& osDescription,
1062 bool bMinIsInclusive,
1064 bool bMaxIsInclusive);
1068 m_eFieldType, m_eFieldSubType,
1069 m_sMin, m_bMinIsInclusive,
1070 m_sMax, m_bMaxIsInclusive);
1085 bIsInclusiveOut = m_bMinIsInclusive;
1101 bIsInclusiveOut = m_bMaxIsInclusive;
1113 std::string m_osGlob;
1130 const std::string& osDescription,
1133 const std::string& osBlob);
1137 m_eFieldType, m_eFieldSubType,
1145 const std::string&
GetGlob()
const {
return m_osGlob; }
1154 class swq_expr_node;
1155 class swq_custom_func_registrar;
1157 class CPL_DLL OGRFeatureQuery
1163 char **FieldCollector(
void *,
char ** );
1168 int CanUseIndex( swq_expr_node*,
OGRLayer * );
1172 swq_custom_func_registrar* poCustomFuncRegistrar );
1182 swq_custom_func_registrar*
1183 poCustomFuncRegistrar =
nullptr );
1186 swq_custom_func_registrar*
1187 poCustomFuncRegistrar =
nullptr );
1194 char **GetUsedFields();
1196 void *GetSWQExpr() {
return pSWQExpr; }
Definition of a coded / enumerated field domain.
Definition: ogr_feature.h:979
const OGRCodedValue * GetEnumeration() const
Get the enumeration as (code, value) pairs.
Definition: ogr_feature.h:1016
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:332
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
static OGRFeatureDefn * FromHandle(OGRFeatureDefnH hFeatureDefn)
Convert a OGRFeatureDefnH to a OGRFeatureDefn*.
Definition: ogr_feature.h:364
virtual bool IsStyleIgnored() const
Determine whether the style can be omitted when fetching features.
Definition: ogr_feature.h:339
int Dereference()
Decrements the reference count by one.
Definition: ogr_feature.h:333
static OGRFeatureDefnH ToHandle(OGRFeatureDefn *poFeatureDefn)
Convert a OGRFeatureDefn* to a OGRFeatureDefnH.
Definition: ogr_feature.h:358
virtual OGRGeomFieldDefn * GetGeomFieldDefn(int i)
Fetch geometry field definition.
Definition: ogrfeaturedefn.cpp:642
virtual int GetGeomFieldCount() const
Fetch number of geometry fields on this feature.
Definition: ogrfeaturedefn.cpp:593
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:334
virtual int GetGeomFieldIndex(const char *) const
Find geometry field by name.
Definition: ogrfeaturedefn.cpp:879
virtual void SetStyleIgnored(bool bIgnore)
Set whether the style can be omitted when fetching features.
Definition: ogr_feature.h:340
Field value iterator class.
Definition: ogr_feature.h:550
Exception raised by operator[](const char*) when a field is not found.
Definition: ogr_feature.h:591
Field value.
Definition: ogr_feature.h:407
bool empty() const
Return whether the field value is unset/empty.
Definition: ogr_feature.h:467
int GetInteger() const
Return the integer value.
Definition: ogr_feature.h:484
OGRFieldType GetType() const
Return field type.
Definition: ogr_feature.h:461
void Unset()
Unset the field.
Definition: ogr_feature.h:448
const char * GetString() const
Return the string value.
Definition: ogr_feature.h:502
double GetDouble() const
Return the double value.
Definition: ogr_feature.h:496
const char * GetName() const
Return field name.
Definition: ogr_feature.h:459
GIntBig GetInteger64() const
Return the 64-bit integer value.
Definition: ogr_feature.h:490
OGRFieldSubType GetSubType() const
Return field subtype.
Definition: ogr_feature.h:463
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:380
OGRFeatureDefn * GetDefnRef()
Fetch feature definition.
Definition: ogr_feature.h:596
static OGRFeatureH ToHandle(OGRFeature *poFeature)
Convert a OGRFeature* to a OGRFeatureH.
Definition: ogr_feature.h:814
char ** GetFieldAsStringList(const char *pszFName) const
Fetch field value as a list of strings.
Definition: ogr_feature.h:712
virtual OGRStyleTable * GetStyleTable() const
Return style table.
Definition: ogr_feature.h:798
ConstFieldIterator end() const
Return end of field value iterator.
Definition: ogrfeature.cpp:7269
ConstFieldIterator begin() const
Return begin of field value iterator.
Definition: ogrfeature.cpp:7264
void SetField(const char *pszFName, int nCount, const GIntBig *panValues)
Set field to list of 64 bit integers value.
Definition: ogr_feature.h:751
const OGRFeatureDefn * GetDefnRef() const
Fetch feature definition.
Definition: ogr_feature.h:597
OGRFieldDefn * GetFieldDefnRef(int iField)
Fetch definition for this field.
Definition: ogr_feature.h:635
const double * GetFieldAsDoubleList(const char *pszFName, int *pnCount) const
Fetch field value as a list of doubles.
Definition: ogr_feature.h:708
void SetField(const char *pszFName, int nCount, const int *panValues)
Set field to list of integers value.
Definition: ogr_feature.h:748
void SetField(const char *pszFName, GIntBig nValue)
Set field to 64 bit integer value.
Definition: ogr_feature.h:742
void SetField(const char *pszFName, const char *pszValue)
Set field to string value.
Definition: ogr_feature.h:746
void SetField(const char *pszFName, int nValue)
Set field to integer value.
Definition: ogr_feature.h:740
const OGRFieldDefn * GetFieldDefnRef(int iField) const
Fetch definition for this field.
Definition: ogr_feature.h:633
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:761
const OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField) const
Fetch definition for this geometry field.
Definition: ogr_feature.h:613
const char * GetNativeData() const
Returns the native data for the feature.
Definition: ogr_feature.h:802
int GetFieldIndex(const char *pszName) const
Fetch the field index given field name.
Definition: ogr_feature.h:637
static OGRFeature * FromHandle(OGRFeatureH hFeature)
Convert a OGRFeatureH to a OGRFeature*.
Definition: ogr_feature.h:820
int GetGeomFieldIndex(const char *pszName) const
Fetch the geometry field index given geometry field name.
Definition: ogr_feature.h:615
OGRGeomFieldDefn * GetGeomFieldDefnRef(int iField)
Fetch definition for this geometry field.
Definition: ogr_feature.h:611
GIntBig GetFieldAsInteger64(const char *pszFName) const
Fetch field value as integer 64 bit.
Definition: ogr_feature.h:694
const int * GetFieldAsIntegerList(const char *pszFName, int *pnCount) const
Fetch field value as a list of integers.
Definition: ogr_feature.h:700
void SetField(const char *pszFName, double dfValue)
Set field to double value.
Definition: ogr_feature.h:744
const char * GetFieldAsString(const char *pszFName) const
Fetch field value as a string.
Definition: ogr_feature.h:698
void SetField(const char *pszFName, const char *const *papszValues)
Set field to list of strings value.
Definition: ogr_feature.h:757
const OGRField * GetRawFieldRef(int i) const
Fetch a pointer to the internal field value given the index.
Definition: ogr_feature.h:651
int GetFieldAsInteger(const char *pszFName) const
Fetch field value as integer.
Definition: ogr_feature.h:692
const char * GetNativeMediaType() const
Returns the native media type for the feature.
Definition: ogr_feature.h:803
void SetField(const char *pszFName, const OGRField *puValue)
Set field.
Definition: ogr_feature.h:759
GIntBig GetFID() const
Get feature identifier.
Definition: ogr_feature.h:769
OGRField * GetRawFieldRef(int i)
Fetch a pointer to the internal field value given the index.
Definition: ogr_feature.h:650
void SetField(const char *pszFName, int nCount, const double *padfValues)
Set field to list of doubles value.
Definition: ogr_feature.h:754
double GetFieldAsDouble(const char *pszFName) const
Fetch field value as a double.
Definition: ogr_feature.h:696
const GIntBig * GetFieldAsInteger64List(const char *pszFName, int *pnCount) const
Fetch field value as a list of 64 bit integers.
Definition: ogr_feature.h:704
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
static OGRFieldDefn * FromHandle(OGRFieldDefnH hFieldDefn)
Convert a OGRFieldDefnH to a OGRFieldDefn*.
Definition: ogr_feature.h:177
int IsUnique() const
Return whether this field has a unique constraint.
Definition: ogr_feature.h:160
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
Definition of a field domain.
Definition: ogr_feature.h:877
OGRFieldDomainMergePolicy GetMergePolicy() const
Get the merge policy.
Definition: ogr_feature.h:963
void SetMergePolicy(OGRFieldDomainMergePolicy policy)
Set the merge policy.
Definition: ogr_feature.h:969
static OGRFieldDomain * FromHandle(OGRFieldDomainH hFieldDomain)
Convert a OGRFieldDomainH to a OGRFieldDomain*.
Definition: ogr_feature.h:944
OGRFieldSubType GetFieldSubType() const
Get the field subtype.
Definition: ogr_feature.h:937
virtual ~OGRFieldDomain()=0
Destructor.
virtual OGRFieldDomain * Clone() const =0
Clone.
OGRFieldDomainSplitPolicy GetSplitPolicy() const
Get the split policy.
Definition: ogr_feature.h:951
static OGRFieldDomainH ToHandle(OGRFieldDomain *poFieldDomain)
Convert a OGRFieldDomain* to a OGRFieldDomainH.
Definition: ogr_feature.h:940
const std::string & GetDescription() const
Get the description of the field domain.
Definition: ogr_feature.h:919
OGRFieldType GetFieldType() const
Get the field type.
Definition: ogr_feature.h:931
OGRFieldDomainType GetDomainType() const
Get the type of the field domain.
Definition: ogr_feature.h:925
const std::string & GetName() const
Get the name of the field domain.
Definition: ogr_feature.h:912
void SetSplitPolicy(OGRFieldDomainSplitPolicy policy)
Set the split policy.
Definition: ogr_feature.h:957
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
int IsNullable() const
Return whether this geometry field can receive null values.
Definition: ogr_feature.h:233
static OGRGeomFieldDefn * FromHandle(OGRGeomFieldDefnH hGeomFieldDefn)
Convert a OGRGeomFieldDefnH to a OGRGeomFieldDefn*.
Definition: ogr_feature.h:248
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
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
Definition of a field domain for field content validated by a glob.
Definition: ogr_feature.h:1111
OGRGlobFieldDomain * Clone() const override
Clone.
Definition: ogr_feature.h:1135
const std::string & GetGlob() const
Get the glob expression.
Definition: ogr_feature.h:1145
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:71
Definition of a numeric field domain with a range of validity for values.
Definition: ogr_feature.h:1022
OGRRangeFieldDomain * Clone() const override
Clone.
Definition: ogr_feature.h:1066
const OGRField & GetMin(bool &bIsInclusiveOut) const
Get the minimum value.
Definition: ogr_feature.h:1084
const OGRField & GetMax(bool &bIsInclusiveOut) const
Get the maximum value.
Definition: ogr_feature.h:1100
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:927
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1053
#define CPL_WARN_UNUSED_RESULT
Qualifier to warn when the return value of a function is not used.
Definition: cpl_port.h:866
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:203
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:230
#define MAX(a, b)
Macro to compute the maximum of 2 values.
Definition: cpl_port.h:378
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
#define OGRUnsetMarker
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a unset field.
Definition: ogr_core.h:743
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:1054
@ OFDMP_DEFAULT_VALUE
Default value.
Definition: ogr_core.h:1056
OGRFieldDomainType
Type of field domain.
Definition: ogr_core.h:1020
OGRJustification
Display justification for field values.
Definition: ogr_core.h:721
OGRFieldType
List of feature field types.
Definition: ogr_core.h:669
#define OGRNullMarker
Special value set in OGRField.Set.nMarker1, nMarker2 and nMarker3 for a null field.
Definition: ogr_core.h:751
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:1037
@ OFDSP_DEFAULT_VALUE
Default value.
Definition: ogr_core.h:1039
std::unique_ptr< OGRFeature, OGRFeatureUniquePtrDeleter > OGRFeatureUniquePtr
Unique pointer type for OGRFeature.
Definition: ogr_feature.h:837
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
void * OGRStyleTableH
Opaque type for a style table (OGRStyleTable)
Definition: ogr_feature.h:66
Simple feature style classes.
Simple feature geometry classes.
OGRLayer::FeatureIterator begin(OGRLayer *poLayer)
Return begin of feature iterator.
Definition: ogrsf_frmts.h:289
OGRLayer::FeatureIterator end(OGRLayer *poLayer)
Return end of feature iterator.
Definition: ogrsf_frmts.h:294
Associates a code and a value.
Definition: ogr_core.h:1007
OGRFeature field attribute value union.
Definition: ogr_core.h:761