30 #ifndef OGRUNIONLAYER_H_INCLUDED
31 #define OGRUNIONLAYER_H_INCLUDED
45 int bGeomTypeSet =
false;
51 explicit OGRUnionLayerGeomFieldDefn(OGRUnionLayerGeomFieldDefn* poSrc);
52 ~OGRUnionLayerGeomFieldDefn();
61 FIELD_FROM_FIRST_LAYER,
62 FIELD_UNION_ALL_LAYERS,
63 FIELD_INTERSECTION_ALL_LAYERS,
67 class 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);
107 OGRUnionLayer(
const char* pszName,
110 int bTakeLayerOwnership);
112 virtual ~OGRUnionLayer();
116 void SetFields(FieldUnionStrategy eFieldStrategy,
120 OGRUnionLayerGeomFieldDefn** papoGeomFields );
121 void SetSourceLayerFieldName(
const char* pszSourceLayerFieldName);
122 void SetPreserveSrcFID(
int bPreserveSrcFID);
123 void SetFeatureCount(
int nFeatureCount);
124 virtual const char *
GetName()
override {
return osName.c_str(); }
159 #endif // OGRUNIONLAYER_H_INCLUDED
virtual const char * GetName()
Return the layer name.
Definition: ogrlayer.cpp:1728
virtual OGRErr ICreateFeature(OGRFeature *poFeature)
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:637
virtual void ResetReading()=0
Reset feature reading to start on the first feature.
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrlayer.cpp:1037
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:158
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:173
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:326
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:71
Convenient string class based on std::string.
Definition: cpl_string.h:333
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE)
Fetch the extent of this layer.
Definition: ogrlayer.cpp:211
virtual OGRErr ISetFeature(OGRFeature *poFeature)
Rewrite an existing feature.
Definition: ogrlayer.cpp:598
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrlayer.cpp:1113
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
Classes related to registration of format support, and opening datasets.
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:93
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:183
int OGRErr
Type for a OGR error.
Definition: ogr_core.h:318
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:248
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:346
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:355
virtual OGRErr SetIgnoredFields(const char **papszFields)
Set which fields can be omitted when retrieving features from the layer.
Definition: ogrlayer.cpp:1792
Simple container for a bounding region (rectangle)
Definition: ogr_core.h:58
Definition of a feature class or feature layer.
Definition: ogr_feature.h:260
virtual OGRwkbGeometryType GetGeomType()
Return the layer geometry type.
Definition: ogrlayer.cpp:1755
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:338
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:1520
virtual OGRFeature * GetFeature(GIntBig nFID)
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:447
#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:1003