30#ifndef OGRWARPEDLAYER_H_INCLUDED
31#define OGRWARPEDLAYER_H_INCLUDED
35#include "ogrlayerdecorator.h"
41class OGRWarpedLayer :
public OGRLayerDecorator
46 OGRFeatureDefn *m_poFeatureDefn;
49 OGRCoordinateTransformation *m_poCT;
50 OGRCoordinateTransformation *m_poReversedCT;
51 OGRSpatialReference *m_poSRS;
53 OGREnvelope sStaticEnvelope{};
55 static int ReprojectEnvelope( OGREnvelope* psEnvelope,
56 OGRCoordinateTransformation* poCT );
58 OGRFeature * SrcFeatureToWarpedFeature(OGRFeature* poFeature);
59 OGRFeature * WarpedFeatureToSrcFeature(OGRFeature* poFeature);
63 OGRWarpedLayer(OGRLayer* poDecoratedLayer,
66 OGRCoordinateTransformation* poCT,
67 OGRCoordinateTransformation* poReversedCT );
68 virtual ~OGRWarpedLayer();
70 void SetExtent(
double dfXMin,
double dfYMin,
double dfXMax,
double dfYMax);
72 virtual void SetSpatialFilter( OGRGeometry * )
override;
73 virtual void SetSpatialFilterRect(
double dfMinX,
double dfMinY,
74 double dfMaxX,
double dfMaxY )
override;
75 virtual void SetSpatialFilter(
int iGeomField, OGRGeometry * )
override;
76 virtual void SetSpatialFilterRect(
int iGeomField,
double dfMinX,
double dfMinY,
77 double dfMaxX,
double dfMaxY )
override;
79 virtual OGRFeature *GetNextFeature()
override;
80 virtual OGRFeature *GetFeature(
GIntBig nFID )
override;
81 virtual OGRErr ISetFeature( OGRFeature *poFeature )
override;
82 virtual OGRErr ICreateFeature( OGRFeature *poFeature )
override;
84 virtual OGRFeatureDefn *GetLayerDefn()
override;
86 virtual OGRSpatialReference *GetSpatialRef()
override;
88 virtual GIntBig GetFeatureCount(
int bForce = TRUE )
override;
89 virtual OGRErr GetExtent(
int iGeomField, OGREnvelope *psExtent,
int bForce = TRUE)
override;
90 virtual OGRErr GetExtent(OGREnvelope *psExtent,
int bForce = TRUE)
override;
92 virtual int TestCapability(
const char * )
override;
#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:955
long long GIntBig
Large signed integer type (generally 64-bit integer type).
Definition cpl_port.h:244
int OGRErr
Type for a OGR error.
Definition ogr_core.h:341