30 #ifndef OGRUNIONLAYER_H_INCLUDED 31 #define OGRUNIONLAYER_H_INCLUDED 45 int bGeomTypeSet =
false;
47 OGREnvelope sStaticEnvelope{};
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 :
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(); }
146 virtual OGRErr GetExtent(
int iGeomField, OGREnvelope *psExtent,
int bForce = TRUE)
override;
147 virtual OGRErr GetExtent( OGREnvelope *psExtent,
int bForce )
override;
159 #endif // OGRUNIONLAYER_H_INCLUDED virtual OGRErr ISetFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Rewrite an existing feature.
Definition: ogrlayer.cpp:598
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:338
virtual OGRErr ICreateFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:637
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrlayer.cpp:1113
Definition of a geometry field of an OGRFeatureDefn.
Definition: ogr_feature.h:182
virtual OGRErr SetIgnoredFields(const char **papszFields)
Set which fields can be omitted when retrieving features from the layer.
Definition: ogrlayer.cpp:1792
virtual const char * GetName()
Return the layer name.
Definition: ogrlayer.cpp:1728
Convenient string class based on std::string.
Definition: cpl_string.h:329
Definition of a feature class or feature layer.
Definition: ogr_feature.h:259
virtual OGRFeature * GetFeature(GIntBig nFID) CPL_WARN_UNUSED_RESULT
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:447
Definition of an attribute of an OGRFeatureDefn.
Definition: ogr_feature.h:92
OGRwkbGeometryType
List of well known binary geometry types.
Definition: ogr_core.h:317
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:286
Classes related to registration of format support, and opening datasets.
virtual int TestCapability(const char *)=0
Test if this layer supported the named capability.
virtual void ResetReading()=0
Reset feature reading to start on the first feature.
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:147
virtual OGRErr SyncToDisk()
Flush pending changes to disk.
Definition: ogrlayer.cpp:1520
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:70
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE) CPL_WARN_UNUSED_RESULT
Fetch the extent of this layer.
Definition: ogrlayer.cpp:211
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:354
virtual OGRFeature * GetNextFeature() CPL_WARN_UNUSED_RESULT=0
Fetch the next available feature from this layer.
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition: cpl_port.h:248
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrlayer.cpp:1037
int OGRErr
Simple container for a bounding region.
Definition: ogr_core.h:290
virtual OGRwkbGeometryType GetGeomType()
Return the layer geometry type.
Definition: ogrlayer.cpp:1755
#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:989