14#ifndef OGRUNIONLAYER_H_INCLUDED
15#define OGRUNIONLAYER_H_INCLUDED
28 int bGeomTypeSet =
false;
34 explicit OGRUnionLayerGeomFieldDefn(
35 const OGRUnionLayerGeomFieldDefn *poSrc);
36 ~OGRUnionLayerGeomFieldDefn();
45 FIELD_FROM_FIRST_LAYER,
46 FIELD_UNION_ALL_LAYERS,
47 FIELD_INTERSECTION_ALL_LAYERS,
51class CPL_DLL OGRUnionLayer final :
public OGRLayer
59 int bHasLayerOwnership =
false;
65 OGRUnionLayerGeomFieldDefn **papoGeomFields =
nullptr;
66 FieldUnionStrategy eFieldStrategy = FIELD_UNION_ALL_LAYERS;
69 int bPreserveSrcFID =
false;
74 char *pszAttributeFilter =
nullptr;
76 int *panMap =
nullptr;
78 int bAttrFilterPassThroughValue = -1;
79 int *pabModifiedLayers =
nullptr;
80 int *pabCheckIfAutoWrap =
nullptr;
83 void AutoWarpLayerIfNecessary(
int iSubLayer);
85 void ApplyAttributeFilterToSrcLayer(
int iSubLayer);
86 int GetAttrFilterPassThroughValue();
87 void ConfigureActiveLayer();
88 void SetSpatialFilterToSourceLayer(
OGRLayer *poSrcLayer);
92 const char *pszName,
int nSrcLayers,
96 int bTakeLayerOwnership);
98 virtual ~OGRUnionLayer();
104 FieldUnionStrategy eFieldStrategy,
int nFields,
107 OGRUnionLayerGeomFieldDefn *
109 void SetSourceLayerFieldName(
const char *pszSourceLayerFieldName);
110 void SetPreserveSrcFID(
int bPreserveSrcFID);
111 void SetFeatureCount(
int nFeatureCount);
113 virtual const char *GetName()
override
115 return osName.c_str();
120 virtual void ResetReading()
override;
121 virtual OGRFeature *GetNextFeature()
override;
132 const int *panUpdatedFieldsIdx,
133 int nUpdatedGeomFieldsCount,
134 const int *panUpdatedGeomFieldsIdx,
135 bool bUpdateStyleString)
override;
141 virtual GIntBig GetFeatureCount(
int)
override;
143 virtual OGRErr SetAttributeFilter(
const char *)
override;
145 virtual int TestCapability(
const char *)
override;
148 int bForce = TRUE)
override;
151 virtual void SetSpatialFilter(
OGRGeometry *poGeomIn)
override;
152 virtual void SetSpatialFilter(
int iGeomField,
OGRGeometry *)
override;
156 virtual OGRErr SyncToDisk()
override;
String list class designed around our use of C "char**" string lists.
Definition: cpl_string.h:436
Convenient string class based on std::string.
Definition: cpl_string.h:307
Simple container for a bounding region (rectangle)
Definition: ogr_core.h:45
Definition of a feature class or feature layer.
Definition: ogr_feature.h:501
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:877
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:95
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:330
virtual const OGRSpatialReference * GetSpatialRef() const
Fetch spatial reference system of this field.
Definition: ogrgeomfielddefn.cpp:463
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:361
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:58
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:153
#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:1030
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition: cpl_port.h:1179
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:199
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:407
int OGRErr
Type for a OGR error.
Definition: ogr_core.h:371
Classes related to registration of format support, and opening datasets.