30 #ifndef OGRUNIONLAYER_H_INCLUDED
31 #define OGRUNIONLAYER_H_INCLUDED
44 int bGeomTypeSet =
false;
50 explicit OGRUnionLayerGeomFieldDefn(
51 const OGRUnionLayerGeomFieldDefn *poSrc);
52 ~OGRUnionLayerGeomFieldDefn();
61 FIELD_FROM_FIRST_LAYER,
62 FIELD_UNION_ALL_LAYERS,
63 FIELD_INTERSECTION_ALL_LAYERS,
67 class CPL_DLL OGRUnionLayer final :
public OGRLayer
75 int bHasLayerOwnership;
81 OGRUnionLayerGeomFieldDefn **papoGeomFields;
82 FieldUnionStrategy eFieldStrategy;
90 char *pszAttributeFilter;
93 char **papszIgnoredFields;
94 int bAttrFilterPassThroughValue;
95 int *pabModifiedLayers;
96 int *pabCheckIfAutoWrap;
99 void AutoWarpLayerIfNecessary(
int iSubLayer);
101 void ApplyAttributeFilterToSrcLayer(
int iSubLayer);
102 int GetAttrFilterPassThroughValue();
103 void ConfigureActiveLayer();
104 void SetSpatialFilterToSourceLayer(
OGRLayer *poSrcLayer);
108 const char *pszName,
int nSrcLayers,
112 int bTakeLayerOwnership);
114 virtual ~OGRUnionLayer();
120 FieldUnionStrategy eFieldStrategy,
int nFields,
123 OGRUnionLayerGeomFieldDefn *
125 void SetSourceLayerFieldName(
const char *pszSourceLayerFieldName);
126 void SetPreserveSrcFID(
int bPreserveSrcFID);
127 void SetFeatureCount(
int nFeatureCount);
128 virtual const char *
GetName()
override
130 return osName.c_str();
146 const int *panUpdatedFieldsIdx,
147 int nUpdatedGeomFieldsCount,
148 const int *panUpdatedGeomFieldsIdx,
149 bool bUpdateStyleString)
override;
162 int bForce = TRUE)
override;
175 #endif // OGRUNIONLAYER_H_INCLUDED
virtual const char * GetName()
Return the layer name.
Definition: ogrlayer.cpp:1994
virtual OGRErr ICreateFeature(OGRFeature *poFeature)
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:648
virtual void ResetReading()=0
Reset feature reading to start on the first feature.
virtual OGRErr IUpdateFeature(OGRFeature *poFeature, int nUpdatedFieldsCount, const int *panUpdatedFieldsIdx, int nUpdatedGeomFieldsCount, const int *panUpdatedGeomFieldsIdx, bool bUpdateStyleString)
Update (part of) an existing feature.
Definition: ogrlayer.cpp:756
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrlayer.cpp:1224
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:166
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:177
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:334
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:73
Convenient string class based on std::string.
Definition: cpl_string.h:311
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE)
Fetch the extent of this layer.
Definition: ogrlayer.cpp:215
virtual OGRErr ISetFeature(OGRFeature *poFeature)
Rewrite/replace an existing feature.
Definition: ogrlayer.cpp:608
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrlayer.cpp:1301
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
virtual OGRErr IUpsertFeature(OGRFeature *poFeature)
Rewrite/replace an existing feature or create a new feature within a layer.
Definition: ogrlayer.cpp:688
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:103
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:286
int OGRErr
Type for a OGR error.
Definition: ogr_core.h:378
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:226
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:406
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:680
virtual OGRErr SetIgnoredFields(const char **papszFields)
Set which fields can be omitted when retrieving features from the layer.
Definition: ogrlayer.cpp:2058
Simple container for a bounding region (rectangle)
Definition: ogr_core.h:57
Definition of a feature class or feature layer.
Definition: ogr_feature.h:385
virtual OGRwkbGeometryType GetGeomType()
Return the layer geometry type.
Definition: ogrlayer.cpp:2021
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:344
virtual int TestCapability(const char *)=0
Test if this layer supported the named capability.
virtual OGRFeature * GetNextFeature()=0
Fetch the next available feature from this layer.
virtual OGRErr SyncToDisk()
Flush pending changes to disk.
Definition: ogrlayer.cpp:1788
virtual OGRFeature * GetFeature(GIntBig nFID)
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:451
#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:1042