OGR
ogrwarpedlayer.h
1 /******************************************************************************
2  * $Id: ogrwarpedlayer.h 24633 2012-07-01 14:37:25Z rouault $
3  *
4  * Project: OpenGIS Simple Features Reference Implementation
5  * Purpose: Defines OGRWarpedLayer class
6  * Author: Even Rouault, even dot rouault at mines dash paris dot org
7  *
8  ******************************************************************************
9  * Copyright (c) 2012, Even Rouault <even dot rouault at mines dash paris dot org>
10  *
11  * Permission is hereby granted, free of charge, to any person obtaining a
12  * copy of this software and associated documentation files (the "Software"),
13  * to deal in the Software without restriction, including without limitation
14  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
15  * and/or sell copies of the Software, and to permit persons to whom the
16  * Software is furnished to do so, subject to the following conditions:
17  *
18  * The above copyright notice and this permission notice shall be included
19  * in all copies or substantial portions of the Software.
20  *
21  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
22  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
24  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
26  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
27  * DEALINGS IN THE SOFTWARE.
28  ****************************************************************************/
29 
30 #ifndef _OGRWARPEDLAYER_H_INCLUDED
31 #define _OGRWARPEDLAYER_H_INCLUDED
32 
33 #include "ogrlayerdecorator.h"
34 
35 /************************************************************************/
36 /* OGRWarpedLayer */
37 /************************************************************************/
38 
40 {
41  protected:
43  OGRCoordinateTransformation *m_poReversedCT; /* may be NULL */
44  OGRSpatialReference *m_poSRS;
45 
46  OGREnvelope sStaticEnvelope;
47 
48  static int ReprojectEnvelope( OGREnvelope* psEnvelope,
50 
51  public:
52 
53  OGRWarpedLayer(OGRLayer* poDecoratedLayer,
54  int bTakeOwnership,
55  OGRCoordinateTransformation* poCT, /* must NOT be NULL, ownership acquired by OGRWarpedLayer */
56  OGRCoordinateTransformation* poReversedCT /* may be NULL, ownership acquired by OGRWarpedLayer */);
57  virtual ~OGRWarpedLayer();
58 
59  void SetExtent(double dfXMin, double dfYMin, double dfXMax, double dfYMax);
60 
61  virtual void SetSpatialFilter( OGRGeometry * );
62  virtual void SetSpatialFilterRect( double dfMinX, double dfMinY,
63  double dfMaxX, double dfMaxY );
64 
65  virtual OGRFeature *GetNextFeature();
66  virtual OGRFeature *GetFeature( long nFID );
67  virtual OGRErr SetFeature( OGRFeature *poFeature );
68  virtual OGRErr CreateFeature( OGRFeature *poFeature );
69 
71 
72  virtual int GetFeatureCount( int bForce = TRUE );
73  virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);
74 
75  virtual int TestCapability( const char * );
76 };
77 
78 #endif // _OGRWARPEDLAYER_H_INCLUDED
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce=TRUE)
Fetch the extent of this layer.
Definition: ogrwarpedlayer.cpp:254
virtual int GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrwarpedlayer.cpp:242
Definition: ogrwarpedlayer.h:39
Definition: ogrlayerdecorator.h:35
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrwarpedlayer.cpp:74
Definition: ogr_geometry.h:77
virtual OGRFeature * GetFeature(long nFID)
Fetch a feature by its identifier.
Definition: ogrwarpedlayer.cpp:146
virtual OGRErr CreateFeature(OGRFeature *poFeature)
Create and write a new feature within a layer.
Definition: ogrwarpedlayer.cpp:199
Definition: ogr_spatialref.h:128
virtual void SetSpatialFilterRect(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)
Set a new rectangular spatial filter.
Definition: ogrwarpedlayer.cpp:104
virtual OGRFeature * GetNextFeature()
Fetch the next available feature from this layer.
Definition: ogrwarpedlayer.cpp:114
Definition: ogr_core.h:47
Definition: ogrsf_frmts.h:58
virtual OGRErr SetFeature(OGRFeature *poFeature)
Rewrite an existing feature.
Definition: ogrwarpedlayer.cpp:164
Definition: ogr_spatialref.h:568
Definition: ogr_feature.h:178
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrwarpedlayer.cpp:234
virtual int TestCapability(const char *)
Test if this layer supported the named capability.
Definition: ogrwarpedlayer.cpp:433

Generated for GDAL by doxygen 1.8.8.