| 
    QGIS API Documentation
    2.18.21-Las Palmas (9fba24a)
    
   | 
 
Utilities for working with OGR features and layers. More...
#include <qgsogrutils.h>
Static Public Member Functions | |
| static QVariant | getOgrFeatureAttribute (OGRFeatureH ogrFet, const QgsFields &fields, int attIndex, QTextCodec *encoding, bool *ok=0) | 
| Retrieves an attribute value from an OGR feature.  More... | |
| static QgsGeometry * | ogrGeometryToQgsGeometry (OGRGeometryH geom) | 
| Converts an OGR geometry representation to a QgsGeometry object.  More... | |
| static QgsFeature | readOgrFeature (OGRFeatureH ogrFet, const QgsFields &fields, QTextCodec *encoding) | 
| Reads an OGR feature and converts it to a QgsFeature.  More... | |
| static bool | readOgrFeatureAttributes (OGRFeatureH ogrFet, const QgsFields &fields, QgsFeature &feature, QTextCodec *encoding) | 
| Reads all attributes from an OGR feature into a QgsFeature.  More... | |
| static bool | readOgrFeatureGeometry (OGRFeatureH ogrFet, QgsFeature &feature) | 
| Reads the geometry from an OGR feature into a QgsFeature.  More... | |
| static QgsFields | readOgrFields (OGRFeatureH ogrFet, QTextCodec *encoding) | 
| Reads an OGR feature and returns a corresponding fields collection.  More... | |
| static QgsFeatureList | stringToFeatureList (const QString &string, const QgsFields &fields, QTextCodec *encoding) | 
| Attempts to parse a string representing a collection of features using OGR.  More... | |
| static QgsFields | stringToFields (const QString &string, QTextCodec *encoding) | 
| Attempts to retrieve the fields from a string representing a collection of features using OGR.  More... | |
Utilities for working with OGR features and layers.
Contains helper utilities for assisting work with both OGR features and layers.
Definition at line 33 of file qgsogrutils.h.
      
  | 
  static | 
Retrieves an attribute value from an OGR feature.
| ogrFet | OGR feature handle | 
| fields | fields collection corresponding to feature | 
| attIndex | index of attribute to retrieve | 
| encoding | text encoding | 
| ok | optional storage for success of retrieval | 
Definition at line 117 of file qgsogrutils.cpp.
      
  | 
  static | 
Converts an OGR geometry representation to a QgsGeometry object.
| geom | OGR geometry handle | 
Definition at line 229 of file qgsogrutils.cpp.
      
  | 
  static | 
Reads an OGR feature and converts it to a QgsFeature.
| ogrFet | OGR feature handle | 
| fields | fields collection corresponding to feature | 
| encoding | text encoding | 
Definition at line 40 of file qgsogrutils.cpp.
      
  | 
  static | 
Reads all attributes from an OGR feature into a QgsFeature.
| ogrFet | OGR feature handle | 
| fields | fields collection corresponding to feature | 
| feature | QgsFeature to store attributes in | 
| encoding | text encoding | 
Definition at line 194 of file qgsogrutils.cpp.
      
  | 
  static | 
Reads the geometry from an OGR feature into a QgsFeature.
| ogrFet | OGR feature handle | 
| feature | QgsFeature to store geometry in | 
Definition at line 215 of file qgsogrutils.cpp.
      
  | 
  static | 
Reads an OGR feature and returns a corresponding fields collection.
| ogrFet | OGR feature handle | 
| encoding | text encoding | 
Definition at line 65 of file qgsogrutils.cpp.
      
  | 
  static | 
Attempts to parse a string representing a collection of features using OGR.
For example, this method can be used to convert a GeoJSON encoded collection to a list of QgsFeatures.
| string | string to parse | 
| fields | fields collection to use for parsed features ( | 
| encoding | text encoding | 
Definition at line 244 of file qgsogrutils.cpp.
      
  | 
  static | 
Attempts to retrieve the fields from a string representing a collection of features using OGR.
| string | string to parse | 
| encoding | text encoding | 
Definition at line 288 of file qgsogrutils.cpp.
 1.8.13