30 #ifndef OGRUNIONLAYER_H_INCLUDED
31 #define OGRUNIONLAYER_H_INCLUDED
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
73 int bHasLayerOwnership;
79 OGRUnionLayerGeomFieldDefn **papoGeomFields;
80 FieldUnionStrategy eFieldStrategy;
88 char *pszAttributeFilter;
91 char **papszIgnoredFields;
92 int bAttrFilterPassThroughValue;
93 int *pabModifiedLayers;
94 int *pabCheckIfAutoWrap;
97 void AutoWarpLayerIfNecessary(
int iSubLayer);
99 void ApplyAttributeFilterToSrcLayer(
int iSubLayer);
100 int GetAttrFilterPassThroughValue();
101 void ConfigureActiveLayer();
102 void SetSpatialFilterToSourceLayer(
OGRLayer* poSrcLayer);
105 OGRUnionLayer(
const char* pszName,
108 int bTakeLayerOwnership);
110 virtual ~OGRUnionLayer();
114 void SetFields(FieldUnionStrategy eFieldStrategy,
118 OGRUnionLayerGeomFieldDefn** papoGeomFields );
119 void SetSourceLayerFieldName(
const char* pszSourceLayerFieldName);
120 void SetPreserveSrcFID(
int bPreserveSrcFID);
121 void SetFeatureCount(
int nFeatureCount);
122 virtual const char *
GetName()
override {
return osName.c_str(); }
144 virtual OGRErr GetExtent(
int iGeomField, OGREnvelope *psExtent,
int bForce = TRUE)
override;
145 virtual OGRErr GetExtent( OGREnvelope *psExtent,
int bForce )
override;
157 #endif // OGRUNIONLAYER_H_INCLUDED
virtual OGRErr ISetFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Rewrite an existing feature.
Definition: ogrlayer.cpp:595
virtual OGRFeatureDefn * GetLayerDefn()=0
Fetch the schema information for this layer.
virtual OGRErr SetAttributeFilter(const char *)
Set a new attribute query.
Definition: ogrlayer.cpp:337
virtual OGRErr ICreateFeature(OGRFeature *poFeature) CPL_WARN_UNUSED_RESULT
Create and write a new feature within a layer.
Definition: ogrlayer.cpp:634
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrlayer.cpp:1106
Definition: ogr_feature.h:141
virtual OGRErr SetIgnoredFields(const char **papszFields)
Set which fields can be omitted when retrieving features from the layer.
Definition: ogrlayer.cpp:1780
virtual const char * GetName()
Return the layer name.
Definition: ogrlayer.cpp:1716
Convenient string class based on std::string.
Definition: cpl_string.h:338
Definition: ogr_feature.h:207
virtual OGRFeature * GetFeature(GIntBig nFID) CPL_WARN_UNUSED_RESULT
Fetch a feature by its identifier.
Definition: ogrlayer.cpp:445
Definition: ogr_feature.h:62
OGRwkbGeometryType
Definition: ogr_core.h:312
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrlayer.cpp:166
Definition: ogr_geometry.h:118
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.
Definition: ogr_spatialref.h:132
virtual OGRErr SyncToDisk()
Flush pending changes to disk.
Definition: ogrlayer.cpp:1511
Definition: ogrsf_frmts.h:68
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE) CPL_WARN_UNUSED_RESULT
Fetch the extent of this layer.
Definition: ogrlayer.cpp:207
Definition: ogr_feature.h:279
virtual OGRFeature * GetNextFeature() CPL_WARN_UNUSED_RESULT=0
Fetch the next available feature from this layer.
long long GIntBig
Definition: cpl_port.h:250
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrlayer.cpp:1032
int OGRErr
Definition: ogr_core.h:285
virtual OGRwkbGeometryType GetGeomType()
Return the layer geometry type.
Definition: ogrlayer.cpp:1743