21 #include "qgis_core.h"
26 #include <gdalwarper.h>
28 #include "cpl_string.h"
47 void CORE_EXPORT
operator()( OGRDataSourceH source )
const;
60 void CORE_EXPORT
operator()( OGRGeometryH geometry )
const;
73 void CORE_EXPORT
operator()( OGRFieldDefnH definition )
const;
86 void CORE_EXPORT
operator()( OGRFeatureH feature )
const;
112 void CORE_EXPORT
operator()( GDALWarpOptions *options )
const;
174 static QVariant OGRFieldtoVariant(
const OGRField *value, OGRFieldType type );
181 static std::unique_ptr<OGRField> variantToOGRField(
const QVariant &value );
190 static QgsFeature readOgrFeature( OGRFeatureH ogrFet,
const QgsFields &fields, QTextCodec *encoding );
198 static QgsFields readOgrFields( OGRFeatureH ogrFet, QTextCodec *encoding );
210 static QVariant getOgrFeatureAttribute( OGRFeatureH ogrFet,
const QgsFields &fields,
int attIndex, QTextCodec *encoding,
bool *ok =
nullptr );
224 static QVariant getOgrFeatureAttribute( OGRFeatureH ogrFet,
const QgsField &
field,
int attIndex, QTextCodec *encoding,
bool *ok =
nullptr );
235 static bool readOgrFeatureAttributes( OGRFeatureH ogrFet,
const QgsFields &fields,
QgsFeature &feature, QTextCodec *encoding );
245 static bool readOgrFeatureGeometry( OGRFeatureH ogrFet,
QgsFeature &feature );
254 static QgsGeometry ogrGeometryToQgsGeometry( OGRGeometryH geom );
265 static QgsFeatureList stringToFeatureList(
const QString &
string,
const QgsFields &fields, QTextCodec *encoding );
274 static QgsFields stringToFields(
const QString &
string, QTextCodec *encoding );
281 static QStringList cStringListToQStringList(
char **stringList );
288 static QgsWkbTypes::Type ogrGeometryTypeToQgsWkbType( OGRwkbGeometryType ogrGeomType );
327 static QString readShapefileEncoding(
const QString &path );
338 static QString readShapefileEncodingFromCpg(
const QString &path );
349 static QString readShapefileEncodingFromLdid(
const QString &path );
356 static QVariantMap parseStyleString(
const QString &
string );
376 static void ogrFieldTypeToQVariantType( OGRFieldType ogrType, OGRFieldSubType ogrSubType, QVariant::Type &variantType, QVariant::Type &variantSubType )
SIP_SKIP;
388 static void variantTypeToOgrFieldType( QVariant::Type variantType, OGRFieldType &ogrType, OGRFieldSubType &ogrSubType )
SIP_SKIP;
397 static QVariant stringToVariant( OGRFieldType type, OGRFieldSubType subType,
const QString &
string )
SIP_SKIP;
400 #if GDAL_VERSION_NUM >= GDAL_COMPUTE_VERSION(3,3,0)
409 static std::unique_ptr< QgsFieldDomain > convertFieldDomain( OGRFieldDomainH domain );
418 static OGRFieldDomainH convertFieldDomain(
const QgsFieldDomain *domain );
423 #endif // QGSOGRUTILS_H