13#ifndef OGRWARPEDLAYER_H_INCLUDED
14#define OGRWARPEDLAYER_H_INCLUDED
18#include "ogrlayerdecorator.h"
19#include "ogrlayerwithtranslatefeature.h"
26#pragma warning(disable : 4250)
33class CPL_DLL OGRWarpedLayer final :
public OGRLayerDecorator,
34 public OGRLayerWithTranslateFeature
44 std::unique_ptr<OGRCoordinateTransformation> m_poCT{};
46 std::unique_ptr<OGRCoordinateTransformation> m_poReversedCT{};
51 static int ReprojectEnvelope(
OGREnvelope *psEnvelope,
54 std::unique_ptr<OGRFeature>
55 SrcFeatureToWarpedFeature(std::unique_ptr<OGRFeature> poFeature);
56 std::unique_ptr<OGRFeature>
57 WarpedFeatureToSrcFeature(std::unique_ptr<OGRFeature> poFeature);
60 OGRWarpedLayer(
OGRLayer *poDecoratedLayer,
int iGeomField,
61 int bTakeLayerOwnership,
63 std::unique_ptr<OGRCoordinateTransformation> poCT,
65 std::unique_ptr<OGRCoordinateTransformation> poReversedCT);
66 ~OGRWarpedLayer()
override;
68 void TranslateFeature(
69 std::unique_ptr<OGRFeature> poSrcFeature,
70 std::vector<std::unique_ptr<OGRFeature>> &apoOutFeatures)
override;
72 void SetExtent(
double dfXMin,
double dfYMin,
double dfXMax,
double dfYMax);
74 virtual OGRErr ISetSpatialFilter(
int iGeomField,
80 OGRErr ISetFeatureUniqPtr(std::unique_ptr<OGRFeature> poFeature)
override;
82 OGRErr ICreateFeatureUniqPtr(std::unique_ptr<OGRFeature> poFeature,
86 const int *panUpdatedFieldsIdx,
87 int nUpdatedGeomFieldsCount,
88 const int *panUpdatedGeomFieldsIdx,
89 bool bUpdateStyleString)
override;
95 GIntBig GetFeatureCount(
int bForce = TRUE)
override;
97 bool bForce =
true)
override;
99 int TestCapability(
const char *)
const override;
101 virtual bool GetArrowStream(
struct ArrowArrayStream *out_stream,
Simple container for a bounding region (rectangle)
Definition ogr_core.h:44
Definition of a feature class or feature layer.
Definition ogr_feature.h:521
A simple feature, including geometry and attributes.
Definition ogr_feature.h:1041
Abstract base class for all geometry classes.
Definition ogr_geometry.h:357
This class represents a layer of simple features, with access methods.
Definition ogrsf_frmts.h:61
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition ogr_spatialref.h:152
#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:1101
char ** CSLConstList
Type of a constant null-terminated list of nul terminated strings.
Definition cpl_port.h:1252
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:195
int OGRErr
Type for a OGR error.
Definition ogr_core.h:388