GDAL

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

ogrwarpedlayer.h
1 /******************************************************************************
2 * $Id: ogrwarpedlayer.h 31777 2015-11-26 14:14:41Z 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-2014, Even Rouault <even dot rouault at mines-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
39 class OGRWarpedLayer : public OGRLayerDecorator
40 {
41 protected:
42 OGRFeatureDefn *m_poFeatureDefn;
43 int m_iGeomField;
44
45 OGRCoordinateTransformation *m_poCT;
46 OGRCoordinateTransformation *m_poReversedCT; /* may be NULL */
47 OGRSpatialReference *m_poSRS;
48
49 OGREnvelope sStaticEnvelope;
50
51 static int ReprojectEnvelope( OGREnvelope* psEnvelope,
52 OGRCoordinateTransformation* poCT );
53
54 OGRFeature * SrcFeatureToWarpedFeature(OGRFeature* poFeature);
55 OGRFeature * WarpedFeatureToSrcFeature(OGRFeature* poFeature);
56
57 public:
58
59 OGRWarpedLayer(OGRLayer* poDecoratedLayer,
60 int iGeomField,
61 int bTakeOwnership,
62 OGRCoordinateTransformation* poCT, /* must NOT be NULL, ownership acquired by OGRWarpedLayer */
63 OGRCoordinateTransformation* poReversedCT /* may be NULL, ownership acquired by OGRWarpedLayer */);
64 virtual ~OGRWarpedLayer();
65
66 void SetExtent(double dfXMin, double dfYMin, double dfXMax, double dfYMax);
67
68 virtual void SetSpatialFilter( OGRGeometry * );
69 virtual void SetSpatialFilterRect( double dfMinX, double dfMinY,
70 double dfMaxX, double dfMaxY );
71 virtual void SetSpatialFilter( int iGeomField, OGRGeometry * );
72 virtual void SetSpatialFilterRect( int iGeomField, double dfMinX, double dfMinY,
73 double dfMaxX, double dfMaxY );
74
75 virtual OGRFeature *GetNextFeature();
76 virtual OGRFeature *GetFeature( GIntBig nFID );
77 virtual OGRErr ISetFeature( OGRFeature *poFeature );
78 virtual OGRErr ICreateFeature( OGRFeature *poFeature );
79
80 virtual OGRFeatureDefn *GetLayerDefn();
81
82 virtual OGRSpatialReference *GetSpatialRef();
83
84 virtual GIntBig GetFeatureCount( int bForce = TRUE );
85 virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);
86 virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);
87
88 virtual int TestCapability( const char * );
89 };
90
91 #endif // OGRWARPEDLAYER_H_INCLUDED
OGRWarpedLayer::GetLayerDefn
virtual OGRFeatureDefn * GetLayerDefn()
Fetch the schema information for this layer.
Definition: ogrwarpedlayer.cpp:303
OGRWarpedLayer
Definition: ogrwarpedlayer.h:39
OGRWarpedLayer::GetFeatureCount
virtual GIntBig GetFeatureCount(int bForce=TRUE)
Fetch the feature count in this layer.
Definition: ogrwarpedlayer.cpp:332
OGRLayerDecorator
Definition: ogrlayerdecorator.h:35
OGRFeatureDefn
Definition of a feature class or feature layer.
Definition: ogr_feature.h:206
OGRWarpedLayer::SetSpatialFilter
virtual void SetSpatialFilter(OGRGeometry *)
Set a new spatial filter.
Definition: ogrwarpedlayer.cpp:81
OGRWarpedLayer::GetFeature
virtual OGRFeature * GetFeature(GIntBig nFID)
Fetch a feature by its identifier.
Definition: ogrwarpedlayer.cpp:248
OGRGeometry
Abstract base class for all geometry classes.
Definition: ogr_geometry.h:104
OGRSpatialReference
This class represents an OpenGIS Spatial Reference System, and contains methods for converting betwee...
Definition: ogr_spatialref.h:129
OGRWarpedLayer::SetSpatialFilterRect
virtual void SetSpatialFilterRect(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY)
Set a new rectangular spatial filter.
Definition: ogrwarpedlayer.cpp:90
OGRWarpedLayer::ICreateFeature
virtual OGRErr ICreateFeature(OGRFeature *poFeature)
Create and write a new feature within a layer.
Definition: ogrwarpedlayer.cpp:283
OGRWarpedLayer::GetNextFeature
virtual OGRFeature * GetNextFeature()
Fetch the next available feature from this layer.
Definition: ogrwarpedlayer.cpp:222
OGREnvelope
Simple container for a bounding region.
Definition: ogr_core.h:48
OGRLayer
This class represents a layer of simple features, with access methods.
Definition: ogrsf_frmts.h:66
OGRCoordinateTransformation
Interface for transforming between coordinate systems.
Definition: ogr_spatialref.h:576
OGRFeature
A simple feature, including geometry and attributes.
Definition: ogr_feature.h:274
OGRWarpedLayer::GetExtent
virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce=TRUE)
Fetch the extent of this layer, on the specified geometry field.
Definition: ogrwarpedlayer.cpp:353
OGRWarpedLayer::GetSpatialRef
virtual OGRSpatialReference * GetSpatialRef()
Fetch the spatial reference system for this layer.
Definition: ogrwarpedlayer.cpp:320
OGRWarpedLayer::TestCapability
virtual int TestCapability(const char *)
Test if this layer supported the named capability.
Definition: ogrwarpedlayer.cpp:537
OGRWarpedLayer::ISetFeature
virtual OGRErr ISetFeature(OGRFeature *poFeature)
Rewrite an existing feature.
Definition: ogrwarpedlayer.cpp:264

Generated for GDAL by 1.8.8.